Do not load annotations on value parameter if there are none
Also fix an error in the doc in descriptors.proto
This commit is contained in:
@@ -22202,8 +22202,8 @@ public final class DebugProtoBuf {
|
||||
* <code>optional int32 flags = 1 [default = 0];</code>
|
||||
*
|
||||
* <pre>
|
||||
*declaresDefault
|
||||
*hasAnnotations
|
||||
*declaresDefault
|
||||
*isCrossinline
|
||||
*isNoinline
|
||||
* </pre>
|
||||
@@ -22213,8 +22213,8 @@ public final class DebugProtoBuf {
|
||||
* <code>optional int32 flags = 1 [default = 0];</code>
|
||||
*
|
||||
* <pre>
|
||||
*declaresDefault
|
||||
*hasAnnotations
|
||||
*declaresDefault
|
||||
*isCrossinline
|
||||
*isNoinline
|
||||
* </pre>
|
||||
@@ -22419,8 +22419,8 @@ public final class DebugProtoBuf {
|
||||
* <code>optional int32 flags = 1 [default = 0];</code>
|
||||
*
|
||||
* <pre>
|
||||
*declaresDefault
|
||||
*hasAnnotations
|
||||
*declaresDefault
|
||||
*isCrossinline
|
||||
*isNoinline
|
||||
* </pre>
|
||||
@@ -22432,8 +22432,8 @@ public final class DebugProtoBuf {
|
||||
* <code>optional int32 flags = 1 [default = 0];</code>
|
||||
*
|
||||
* <pre>
|
||||
*declaresDefault
|
||||
*hasAnnotations
|
||||
*declaresDefault
|
||||
*isCrossinline
|
||||
*isNoinline
|
||||
* </pre>
|
||||
@@ -22913,8 +22913,8 @@ public final class DebugProtoBuf {
|
||||
* <code>optional int32 flags = 1 [default = 0];</code>
|
||||
*
|
||||
* <pre>
|
||||
*declaresDefault
|
||||
*hasAnnotations
|
||||
*declaresDefault
|
||||
*isCrossinline
|
||||
*isNoinline
|
||||
* </pre>
|
||||
@@ -22926,8 +22926,8 @@ public final class DebugProtoBuf {
|
||||
* <code>optional int32 flags = 1 [default = 0];</code>
|
||||
*
|
||||
* <pre>
|
||||
*declaresDefault
|
||||
*hasAnnotations
|
||||
*declaresDefault
|
||||
*isCrossinline
|
||||
*isNoinline
|
||||
* </pre>
|
||||
@@ -22939,8 +22939,8 @@ public final class DebugProtoBuf {
|
||||
* <code>optional int32 flags = 1 [default = 0];</code>
|
||||
*
|
||||
* <pre>
|
||||
*declaresDefault
|
||||
*hasAnnotations
|
||||
*declaresDefault
|
||||
*isCrossinline
|
||||
*isNoinline
|
||||
* </pre>
|
||||
@@ -22955,8 +22955,8 @@ public final class DebugProtoBuf {
|
||||
* <code>optional int32 flags = 1 [default = 0];</code>
|
||||
*
|
||||
* <pre>
|
||||
*declaresDefault
|
||||
*hasAnnotations
|
||||
*declaresDefault
|
||||
*isCrossinline
|
||||
*isNoinline
|
||||
* </pre>
|
||||
|
||||
@@ -342,8 +342,8 @@ message Property {
|
||||
|
||||
message ValueParameter {
|
||||
/*
|
||||
declaresDefault
|
||||
hasAnnotations
|
||||
declaresDefault
|
||||
isCrossinline
|
||||
isNoinline
|
||||
*/
|
||||
|
||||
@@ -17089,8 +17089,8 @@ public final class ProtoBuf {
|
||||
* <code>optional int32 flags = 1 [default = 0];</code>
|
||||
*
|
||||
* <pre>
|
||||
*declaresDefault
|
||||
*hasAnnotations
|
||||
*declaresDefault
|
||||
*isCrossinline
|
||||
*isNoinline
|
||||
* </pre>
|
||||
@@ -17100,8 +17100,8 @@ public final class ProtoBuf {
|
||||
* <code>optional int32 flags = 1 [default = 0];</code>
|
||||
*
|
||||
* <pre>
|
||||
*declaresDefault
|
||||
*hasAnnotations
|
||||
*declaresDefault
|
||||
*isCrossinline
|
||||
*isNoinline
|
||||
* </pre>
|
||||
@@ -17290,8 +17290,8 @@ public final class ProtoBuf {
|
||||
* <code>optional int32 flags = 1 [default = 0];</code>
|
||||
*
|
||||
* <pre>
|
||||
*declaresDefault
|
||||
*hasAnnotations
|
||||
*declaresDefault
|
||||
*isCrossinline
|
||||
*isNoinline
|
||||
* </pre>
|
||||
@@ -17303,8 +17303,8 @@ public final class ProtoBuf {
|
||||
* <code>optional int32 flags = 1 [default = 0];</code>
|
||||
*
|
||||
* <pre>
|
||||
*declaresDefault
|
||||
*hasAnnotations
|
||||
*declaresDefault
|
||||
*isCrossinline
|
||||
*isNoinline
|
||||
* </pre>
|
||||
@@ -17715,8 +17715,8 @@ public final class ProtoBuf {
|
||||
* <code>optional int32 flags = 1 [default = 0];</code>
|
||||
*
|
||||
* <pre>
|
||||
*declaresDefault
|
||||
*hasAnnotations
|
||||
*declaresDefault
|
||||
*isCrossinline
|
||||
*isNoinline
|
||||
* </pre>
|
||||
@@ -17728,8 +17728,8 @@ public final class ProtoBuf {
|
||||
* <code>optional int32 flags = 1 [default = 0];</code>
|
||||
*
|
||||
* <pre>
|
||||
*declaresDefault
|
||||
*hasAnnotations
|
||||
*declaresDefault
|
||||
*isCrossinline
|
||||
*isNoinline
|
||||
* </pre>
|
||||
@@ -17741,8 +17741,8 @@ public final class ProtoBuf {
|
||||
* <code>optional int32 flags = 1 [default = 0];</code>
|
||||
*
|
||||
* <pre>
|
||||
*declaresDefault
|
||||
*hasAnnotations
|
||||
*declaresDefault
|
||||
*isCrossinline
|
||||
*isNoinline
|
||||
* </pre>
|
||||
@@ -17757,8 +17757,8 @@ public final class ProtoBuf {
|
||||
* <code>optional int32 flags = 1 [default = 0];</code>
|
||||
*
|
||||
* <pre>
|
||||
*declaresDefault
|
||||
*hasAnnotations
|
||||
*declaresDefault
|
||||
*isCrossinline
|
||||
*isNoinline
|
||||
* </pre>
|
||||
|
||||
+7
-5
@@ -253,13 +253,15 @@ class MemberDeserializer(private val c: DeserializationContext) {
|
||||
|
||||
return valueParameters.mapIndexed { i, proto ->
|
||||
val flags = if (proto.hasFlags()) proto.flags else 0
|
||||
val annotations = if (containerOfCallable != null && Flags.HAS_ANNOTATIONS.get(flags)) {
|
||||
DeserializedAnnotations(c.storageManager) {
|
||||
c.components.annotationAndConstantLoader.loadValueParameterAnnotations(containerOfCallable, callable, kind, i, proto)
|
||||
}
|
||||
}
|
||||
else Annotations.EMPTY
|
||||
ValueParameterDescriptorImpl(
|
||||
callableDescriptor, null, i,
|
||||
containerOfCallable?.let { container ->
|
||||
DeserializedAnnotations(c.storageManager) {
|
||||
c.components.annotationAndConstantLoader.loadValueParameterAnnotations(container, callable, kind, i, proto)
|
||||
}
|
||||
} ?: Annotations.EMPTY,
|
||||
annotations,
|
||||
c.nameResolver.getName(proto.name),
|
||||
c.typeDeserializer.type(proto.type(c.typeTable)),
|
||||
Flags.DECLARES_DEFAULT_VALUE.get(flags),
|
||||
|
||||
Reference in New Issue
Block a user