Support array class literals in annotation serializer/deserializer

Note that this change brings an incompatibility: `Array<Foo>::class`
will be seen as `Foo::class` by the old deserializer. We consider this
OK because the compiler never had any logic that relied on reading class
literal arguments correctly (otherwise it wouldn't have worked because
it could only see `Array<*>::class` before this commit), and the support
of annotations on types in JVM reflection is only available in the
upcoming 1.3 release (KT-16795)

 #KT-22069 Fixed
This commit is contained in:
Alexander Udalov
2018-09-04 18:24:01 +03:00
parent f3f93ed6cc
commit f90303315d
11 changed files with 549 additions and 189 deletions
@@ -977,6 +977,11 @@ open class ProtoCompareGenerated(val oldNameResolver: NameResolver, val newNameR
if (!checkEqualsAnnotationArgumentValueArrayElement(old, new)) return false if (!checkEqualsAnnotationArgumentValueArrayElement(old, new)) return false
if (old.hasArrayDimensionCount() != new.hasArrayDimensionCount()) return false
if (old.hasArrayDimensionCount()) {
if (old.arrayDimensionCount != new.arrayDimensionCount) return false
}
if (old.hasFlags() != new.hasFlags()) return false if (old.hasFlags() != new.hasFlags()) return false
if (old.hasFlags()) { if (old.hasFlags()) {
if (old.flags != new.flags) return false if (old.flags != new.flags) return false
@@ -2166,6 +2171,10 @@ fun ProtoBuf.Annotation.Argument.Value.hashCode(stringIndexes: (Int) -> Int, fqN
hashCode = 31 * hashCode + getArrayElement(i).hashCode(stringIndexes, fqNameIndexes) hashCode = 31 * hashCode + getArrayElement(i).hashCode(stringIndexes, fqNameIndexes)
} }
if (hasArrayDimensionCount()) {
hashCode = 31 * hashCode + arrayDimensionCount
}
if (hasFlags()) { if (hasFlags()) {
hashCode = 31 * hashCode + flags hashCode = 31 * hashCode + flags
} }
@@ -2633,6 +2633,35 @@ public final class DebugProtoBuf {
org.jetbrains.kotlin.metadata.DebugProtoBuf.Annotation.Argument.ValueOrBuilder getArrayElementOrBuilder( org.jetbrains.kotlin.metadata.DebugProtoBuf.Annotation.Argument.ValueOrBuilder getArrayElementOrBuilder(
int index); int index);
/**
* <code>optional int32 array_dimension_count = 11 [default = 0];</code>
*
* <pre>
* If type = CLASS, the number of dimensions of the array of the class specified in class_id.
* E.g. if class_id = kotlin/String, this annotation argument value denotes:
* - String::class, if array_dimension_count = 0
* - Array&lt;String&gt;::class, if array_dimension_count = 1
* - Array&lt;Array&lt;String&gt;&gt;::class, if array_dimension_count = 2
* - etc.
* Other forms of array class literals are not supported by this format, see KT-26568
* </pre>
*/
boolean hasArrayDimensionCount();
/**
* <code>optional int32 array_dimension_count = 11 [default = 0];</code>
*
* <pre>
* If type = CLASS, the number of dimensions of the array of the class specified in class_id.
* E.g. if class_id = kotlin/String, this annotation argument value denotes:
* - String::class, if array_dimension_count = 0
* - Array&lt;String&gt;::class, if array_dimension_count = 1
* - Array&lt;Array&lt;String&gt;&gt;::class, if array_dimension_count = 2
* - etc.
* Other forms of array class literals are not supported by this format, see KT-26568
* </pre>
*/
int getArrayDimensionCount();
/** /**
* <code>optional int32 flags = 10 [default = 0];</code> * <code>optional int32 flags = 10 [default = 0];</code>
* *
@@ -2765,10 +2794,15 @@ public final class DebugProtoBuf {
break; break;
} }
case 80: { case 80: {
bitField0_ |= 0x00000100; bitField0_ |= 0x00000200;
flags_ = input.readInt32(); flags_ = input.readInt32();
break; break;
} }
case 88: {
bitField0_ |= 0x00000100;
arrayDimensionCount_ = input.readInt32();
break;
}
} }
} }
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
@@ -3174,6 +3208,41 @@ public final class DebugProtoBuf {
return arrayElement_.get(index); return arrayElement_.get(index);
} }
public static final int ARRAY_DIMENSION_COUNT_FIELD_NUMBER = 11;
private int arrayDimensionCount_;
/**
* <code>optional int32 array_dimension_count = 11 [default = 0];</code>
*
* <pre>
* If type = CLASS, the number of dimensions of the array of the class specified in class_id.
* E.g. if class_id = kotlin/String, this annotation argument value denotes:
* - String::class, if array_dimension_count = 0
* - Array&lt;String&gt;::class, if array_dimension_count = 1
* - Array&lt;Array&lt;String&gt;&gt;::class, if array_dimension_count = 2
* - etc.
* Other forms of array class literals are not supported by this format, see KT-26568
* </pre>
*/
public boolean hasArrayDimensionCount() {
return ((bitField0_ & 0x00000100) == 0x00000100);
}
/**
* <code>optional int32 array_dimension_count = 11 [default = 0];</code>
*
* <pre>
* If type = CLASS, the number of dimensions of the array of the class specified in class_id.
* E.g. if class_id = kotlin/String, this annotation argument value denotes:
* - String::class, if array_dimension_count = 0
* - Array&lt;String&gt;::class, if array_dimension_count = 1
* - Array&lt;Array&lt;String&gt;&gt;::class, if array_dimension_count = 2
* - etc.
* Other forms of array class literals are not supported by this format, see KT-26568
* </pre>
*/
public int getArrayDimensionCount() {
return arrayDimensionCount_;
}
public static final int FLAGS_FIELD_NUMBER = 10; public static final int FLAGS_FIELD_NUMBER = 10;
private int flags_; private int flags_;
/** /**
@@ -3184,7 +3253,7 @@ public final class DebugProtoBuf {
* </pre> * </pre>
*/ */
public boolean hasFlags() { public boolean hasFlags() {
return ((bitField0_ & 0x00000100) == 0x00000100); return ((bitField0_ & 0x00000200) == 0x00000200);
} }
/** /**
* <code>optional int32 flags = 10 [default = 0];</code> * <code>optional int32 flags = 10 [default = 0];</code>
@@ -3207,6 +3276,7 @@ public final class DebugProtoBuf {
enumValueId_ = 0; enumValueId_ = 0;
annotation_ = org.jetbrains.kotlin.metadata.DebugProtoBuf.Annotation.getDefaultInstance(); annotation_ = org.jetbrains.kotlin.metadata.DebugProtoBuf.Annotation.getDefaultInstance();
arrayElement_ = java.util.Collections.emptyList(); arrayElement_ = java.util.Collections.emptyList();
arrayDimensionCount_ = 0;
flags_ = 0; flags_ = 0;
} }
private byte memoizedIsInitialized = -1; private byte memoizedIsInitialized = -1;
@@ -3261,9 +3331,12 @@ public final class DebugProtoBuf {
for (int i = 0; i < arrayElement_.size(); i++) { for (int i = 0; i < arrayElement_.size(); i++) {
output.writeMessage(9, arrayElement_.get(i)); output.writeMessage(9, arrayElement_.get(i));
} }
if (((bitField0_ & 0x00000100) == 0x00000100)) { if (((bitField0_ & 0x00000200) == 0x00000200)) {
output.writeInt32(10, flags_); output.writeInt32(10, flags_);
} }
if (((bitField0_ & 0x00000100) == 0x00000100)) {
output.writeInt32(11, arrayDimensionCount_);
}
getUnknownFields().writeTo(output); getUnknownFields().writeTo(output);
} }
@@ -3309,10 +3382,14 @@ public final class DebugProtoBuf {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeMessageSize(9, arrayElement_.get(i)); .computeMessageSize(9, arrayElement_.get(i));
} }
if (((bitField0_ & 0x00000100) == 0x00000100)) { if (((bitField0_ & 0x00000200) == 0x00000200)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeInt32Size(10, flags_); .computeInt32Size(10, flags_);
} }
if (((bitField0_ & 0x00000100) == 0x00000100)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeInt32Size(11, arrayDimensionCount_);
}
size += getUnknownFields().getSerializedSize(); size += getUnknownFields().getSerializedSize();
memoizedSerializedSize = size; memoizedSerializedSize = size;
return size; return size;
@@ -3458,8 +3535,10 @@ public final class DebugProtoBuf {
} else { } else {
arrayElementBuilder_.clear(); arrayElementBuilder_.clear();
} }
flags_ = 0; arrayDimensionCount_ = 0;
bitField0_ = (bitField0_ & ~0x00000200); bitField0_ = (bitField0_ & ~0x00000200);
flags_ = 0;
bitField0_ = (bitField0_ & ~0x00000400);
return this; return this;
} }
@@ -3536,6 +3615,10 @@ public final class DebugProtoBuf {
if (((from_bitField0_ & 0x00000200) == 0x00000200)) { if (((from_bitField0_ & 0x00000200) == 0x00000200)) {
to_bitField0_ |= 0x00000100; to_bitField0_ |= 0x00000100;
} }
result.arrayDimensionCount_ = arrayDimensionCount_;
if (((from_bitField0_ & 0x00000400) == 0x00000400)) {
to_bitField0_ |= 0x00000200;
}
result.flags_ = flags_; result.flags_ = flags_;
result.bitField0_ = to_bitField0_; result.bitField0_ = to_bitField0_;
onBuilt(); onBuilt();
@@ -3603,6 +3686,9 @@ public final class DebugProtoBuf {
} }
} }
} }
if (other.hasArrayDimensionCount()) {
setArrayDimensionCount(other.getArrayDimensionCount());
}
if (other.hasFlags()) { if (other.hasFlags()) {
setFlags(other.getFlags()); setFlags(other.getFlags());
} }
@@ -4268,6 +4354,78 @@ public final class DebugProtoBuf {
return arrayElementBuilder_; return arrayElementBuilder_;
} }
private int arrayDimensionCount_ ;
/**
* <code>optional int32 array_dimension_count = 11 [default = 0];</code>
*
* <pre>
* If type = CLASS, the number of dimensions of the array of the class specified in class_id.
* E.g. if class_id = kotlin/String, this annotation argument value denotes:
* - String::class, if array_dimension_count = 0
* - Array&lt;String&gt;::class, if array_dimension_count = 1
* - Array&lt;Array&lt;String&gt;&gt;::class, if array_dimension_count = 2
* - etc.
* Other forms of array class literals are not supported by this format, see KT-26568
* </pre>
*/
public boolean hasArrayDimensionCount() {
return ((bitField0_ & 0x00000200) == 0x00000200);
}
/**
* <code>optional int32 array_dimension_count = 11 [default = 0];</code>
*
* <pre>
* If type = CLASS, the number of dimensions of the array of the class specified in class_id.
* E.g. if class_id = kotlin/String, this annotation argument value denotes:
* - String::class, if array_dimension_count = 0
* - Array&lt;String&gt;::class, if array_dimension_count = 1
* - Array&lt;Array&lt;String&gt;&gt;::class, if array_dimension_count = 2
* - etc.
* Other forms of array class literals are not supported by this format, see KT-26568
* </pre>
*/
public int getArrayDimensionCount() {
return arrayDimensionCount_;
}
/**
* <code>optional int32 array_dimension_count = 11 [default = 0];</code>
*
* <pre>
* If type = CLASS, the number of dimensions of the array of the class specified in class_id.
* E.g. if class_id = kotlin/String, this annotation argument value denotes:
* - String::class, if array_dimension_count = 0
* - Array&lt;String&gt;::class, if array_dimension_count = 1
* - Array&lt;Array&lt;String&gt;&gt;::class, if array_dimension_count = 2
* - etc.
* Other forms of array class literals are not supported by this format, see KT-26568
* </pre>
*/
public Builder setArrayDimensionCount(int value) {
bitField0_ |= 0x00000200;
arrayDimensionCount_ = value;
onChanged();
return this;
}
/**
* <code>optional int32 array_dimension_count = 11 [default = 0];</code>
*
* <pre>
* If type = CLASS, the number of dimensions of the array of the class specified in class_id.
* E.g. if class_id = kotlin/String, this annotation argument value denotes:
* - String::class, if array_dimension_count = 0
* - Array&lt;String&gt;::class, if array_dimension_count = 1
* - Array&lt;Array&lt;String&gt;&gt;::class, if array_dimension_count = 2
* - etc.
* Other forms of array class literals are not supported by this format, see KT-26568
* </pre>
*/
public Builder clearArrayDimensionCount() {
bitField0_ = (bitField0_ & ~0x00000200);
arrayDimensionCount_ = 0;
onChanged();
return this;
}
private int flags_ ; private int flags_ ;
/** /**
* <code>optional int32 flags = 10 [default = 0];</code> * <code>optional int32 flags = 10 [default = 0];</code>
@@ -4277,7 +4435,7 @@ public final class DebugProtoBuf {
* </pre> * </pre>
*/ */
public boolean hasFlags() { public boolean hasFlags() {
return ((bitField0_ & 0x00000200) == 0x00000200); return ((bitField0_ & 0x00000400) == 0x00000400);
} }
/** /**
* <code>optional int32 flags = 10 [default = 0];</code> * <code>optional int32 flags = 10 [default = 0];</code>
@@ -4297,7 +4455,7 @@ public final class DebugProtoBuf {
* </pre> * </pre>
*/ */
public Builder setFlags(int value) { public Builder setFlags(int value) {
bitField0_ |= 0x00000200; bitField0_ |= 0x00000400;
flags_ = value; flags_ = value;
onChanged(); onChanged();
return this; return this;
@@ -4310,7 +4468,7 @@ public final class DebugProtoBuf {
* </pre> * </pre>
*/ */
public Builder clearFlags() { public Builder clearFlags() {
bitField0_ = (bitField0_ & ~0x00000200); bitField0_ = (bitField0_ & ~0x00000400);
flags_ = 0; flags_ = 0;
onChanged(); onChanged();
return this; return this;
@@ -34137,12 +34295,12 @@ public final class DebugProtoBuf {
"name\030\002 \002(\005\022[\n\004kind\030\003 \001(\0162D.org.jetbrains" + "name\030\002 \002(\005\022[\n\004kind\030\003 \001(\0162D.org.jetbrains" +
".kotlin.metadata.QualifiedNameTable.Qual", ".kotlin.metadata.QualifiedNameTable.Qual",
"ifiedName.Kind:\007PACKAGE\")\n\004Kind\022\t\n\005CLASS" + "ifiedName.Kind:\007PACKAGE\")\n\004Kind\022\t\n\005CLASS" +
"\020\000\022\013\n\007PACKAGE\020\001\022\t\n\005LOCAL\020\002\"\364\005\n\nAnnotatio" + "\020\000\022\013\n\007PACKAGE\020\001\022\t\n\005LOCAL\020\002\"\226\006\n\nAnnotatio" +
"n\022\020\n\002id\030\001 \002(\005B\004\220\265\030\001\022D\n\010argument\030\002 \003(\01322." + "n\022\020\n\002id\030\001 \002(\005B\004\220\265\030\001\022D\n\010argument\030\002 \003(\01322." +
"org.jetbrains.kotlin.metadata.Annotation" + "org.jetbrains.kotlin.metadata.Annotation" +
".Argument\032\215\005\n\010Argument\022\025\n\007name_id\030\001 \002(\005B" + ".Argument\032\257\005\n\010Argument\022\025\n\007name_id\030\001 \002(\005B" +
"\004\210\265\030\001\022G\n\005value\030\002 \002(\01328.org.jetbrains.kot" + "\004\210\265\030\001\022G\n\005value\030\002 \002(\01328.org.jetbrains.kot" +
"lin.metadata.Annotation.Argument.Value\032\240" + "lin.metadata.Annotation.Argument.Value\032\302" +
"\004\n\005Value\022K\n\004type\030\001 \001(\0162=.org.jetbrains.k" + "\004\n\005Value\022K\n\004type\030\001 \001(\0162=.org.jetbrains.k" +
"otlin.metadata.Annotation.Argument.Value" + "otlin.metadata.Annotation.Argument.Value" +
".Type\022\021\n\tint_value\030\002 \001(\022\022\023\n\013float_value\030", ".Type\022\021\n\tint_value\030\002 \001(\022\022\023\n\013float_value\030",
@@ -34152,167 +34310,168 @@ public final class DebugProtoBuf {
"on\030\010 \001(\0132).org.jetbrains.kotlin.metadata" + "on\030\010 \001(\0132).org.jetbrains.kotlin.metadata" +
".Annotation\022O\n\rarray_element\030\t \003(\01328.org" + ".Annotation\022O\n\rarray_element\030\t \003(\01328.org" +
".jetbrains.kotlin.metadata.Annotation.Ar" + ".jetbrains.kotlin.metadata.Annotation.Ar" +
"gument.Value\022\020\n\005flags\030\n \001(\005:\0010\"\230\001\n\004Type\022" + "gument.Value\022 \n\025array_dimension_count\030\013 " +
"\010\n\004BYTE\020\000\022\010\n\004CHAR\020\001\022\t\n\005SHORT\020\002\022\007\n\003INT\020\003\022" + "\001(\005:\0010\022\020\n\005flags\030\n \001(\005:\0010\"\230\001\n\004Type\022\010\n\004BYT" +
"\010\n\004LONG\020\004\022\t\n\005FLOAT\020\005\022\n\n\006DOUBLE\020\006\022\013\n\007BOOL" + "E\020\000\022\010\n\004CHAR\020\001\022\t\n\005SHORT\020\002\022\007\n\003INT\020\003\022\010\n\004LON" +
"EAN\020\007\022\n\n\006STRING\020\010\022\t\n\005CLASS\020\t\022\010\n\004ENUM\020\n\022\016", "G\020\004\022\t\n\005FLOAT\020\005\022\n\n\006DOUBLE\020\006\022\013\n\007BOOLEAN\020\007\022",
"\n\nANNOTATION\020\013\022\t\n\005ARRAY\020\014\"\373\005\n\004Type\022>\n\010ar" + "\n\n\006STRING\020\010\022\t\n\005CLASS\020\t\022\010\n\004ENUM\020\n\022\016\n\nANNO" +
"gument\030\002 \003(\0132,.org.jetbrains.kotlin.meta" + "TATION\020\013\022\t\n\005ARRAY\020\014\"\373\005\n\004Type\022>\n\010argument" +
"data.Type.Argument\022\027\n\010nullable\030\003 \001(\010:\005fa" + "\030\002 \003(\0132,.org.jetbrains.kotlin.metadata.T" +
"lse\022+\n\035flexible_type_capabilities_id\030\004 \001" + "ype.Argument\022\027\n\010nullable\030\003 \001(\010:\005false\022+\n" +
"(\005B\004\230\265\030\001\022A\n\024flexible_upper_bound\030\005 \001(\0132#" + "\035flexible_type_capabilities_id\030\004 \001(\005B\004\230\265" +
".org.jetbrains.kotlin.metadata.Type\022\037\n\027f" + "\030\001\022A\n\024flexible_upper_bound\030\005 \001(\0132#.org.j" +
"lexible_upper_bound_id\030\010 \001(\005\022\030\n\nclass_na" + "etbrains.kotlin.metadata.Type\022\037\n\027flexibl" +
"me\030\006 \001(\005B\004\220\265\030\001\022\026\n\016type_parameter\030\007 \001(\005\022!" + "e_upper_bound_id\030\010 \001(\005\022\030\n\nclass_name\030\006 \001" +
"\n\023type_parameter_name\030\t \001(\005B\004\210\265\030\001\022\035\n\017typ" + "(\005B\004\220\265\030\001\022\026\n\016type_parameter\030\007 \001(\005\022!\n\023type" +
"e_alias_name\030\014 \001(\005B\004\220\265\030\001\0227\n\nouter_type\030\n", "_parameter_name\030\t \001(\005B\004\210\265\030\001\022\035\n\017type_alia",
"s_name\030\014 \001(\005B\004\220\265\030\001\0227\n\nouter_type\030\n \001(\0132#" +
".org.jetbrains.kotlin.metadata.Type\022\025\n\ro" +
"uter_type_id\030\013 \001(\005\022=\n\020abbreviated_type\030\r" +
" \001(\0132#.org.jetbrains.kotlin.metadata.Typ" + " \001(\0132#.org.jetbrains.kotlin.metadata.Typ" +
"e\022\025\n\router_type_id\030\013 \001(\005\022=\n\020abbreviated_" + "e\022\033\n\023abbreviated_type_id\030\016 \001(\005\022\r\n\005flags\030" +
"type\030\r \001(\0132#.org.jetbrains.kotlin.metada" + "\001 \001(\005\032\322\001\n\010Argument\022P\n\nprojection\030\001 \001(\01627" +
"ta.Type\022\033\n\023abbreviated_type_id\030\016 \001(\005\022\r\n\005" + ".org.jetbrains.kotlin.metadata.Type.Argu" +
"flags\030\001 \001(\005\032\322\001\n\010Argument\022P\n\nprojection\030\001" + "ment.Projection:\003INV\0221\n\004type\030\002 \001(\0132#.org" +
" \001(\01627.org.jetbrains.kotlin.metadata.Typ" + ".jetbrains.kotlin.metadata.Type\022\017\n\007type_" +
"e.Argument.Projection:\003INV\0221\n\004type\030\002 \001(\013" + "id\030\003 \001(\005\"0\n\nProjection\022\006\n\002IN\020\000\022\007\n\003OUT\020\001\022",
"2#.org.jetbrains.kotlin.metadata.Type\022\017\n" + "\007\n\003INV\020\002\022\010\n\004STAR\020\003*\005\010d\020\310\001\"\230\002\n\rTypeParame" +
"\007type_id\030\003 \001(\005\"0\n\nProjection\022\006\n\002IN\020\000\022\007\n\003" + "ter\022\n\n\002id\030\001 \002(\005\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001\022\026\n\007r" +
"OUT\020\001\022\007\n\003INV\020\002\022\010\n\004STAR\020\003*\005\010d\020\310\001\"\230\002\n\rType", "eified\030\003 \001(\010:\005false\022L\n\010variance\030\004 \001(\01625." +
"Parameter\022\n\n\002id\030\001 \002(\005\022\022\n\004name\030\002 \002(\005B\004\210\265\030" + "org.jetbrains.kotlin.metadata.TypeParame" +
"\001\022\026\n\007reified\030\003 \001(\010:\005false\022L\n\010variance\030\004 " + "ter.Variance:\003INV\0228\n\013upper_bound\030\005 \003(\0132#" +
"\001(\01625.org.jetbrains.kotlin.metadata.Type" + ".org.jetbrains.kotlin.metadata.Type\022\032\n\016u" +
"Parameter.Variance:\003INV\0228\n\013upper_bound\030\005" + "pper_bound_id\030\006 \003(\005B\002\020\001\"$\n\010Variance\022\006\n\002I" +
" \003(\0132#.org.jetbrains.kotlin.metadata.Typ" + "N\020\000\022\007\n\003OUT\020\001\022\007\n\003INV\020\002*\005\010d\020\350\007\"\244\007\n\005Class\022\020" +
"e\022\032\n\016upper_bound_id\030\006 \003(\005B\002\020\001\"$\n\010Varianc" + "\n\005flags\030\001 \001(\005:\0016\022\025\n\007fq_name\030\003 \002(\005B\004\220\265\030\001\022" +
"e\022\006\n\002IN\020\000\022\007\n\003OUT\020\001\022\007\n\003INV\020\002*\005\010d\020\350\007\"\244\007\n\005C" + "#\n\025companion_object_name\030\004 \001(\005B\004\210\265\030\001\022D\n\016",
"lass\022\020\n\005flags\030\001 \001(\005:\0016\022\025\n\007fq_name\030\003 \002(\005B" + "type_parameter\030\005 \003(\0132,.org.jetbrains.kot" +
"\004\220\265\030\001\022#\n\025companion_object_name\030\004 \001(\005B\004\210\265" + "lin.metadata.TypeParameter\0226\n\tsupertype\030" +
"\030\001\022D\n\016type_parameter\030\005 \003(\0132,.org.jetbrai", "\006 \003(\0132#.org.jetbrains.kotlin.metadata.Ty" +
"ns.kotlin.metadata.TypeParameter\0226\n\tsupe" + "pe\022\030\n\014supertype_id\030\002 \003(\005B\002\020\001\022!\n\021nested_c" +
"rtype\030\006 \003(\0132#.org.jetbrains.kotlin.metad" + "lass_name\030\007 \003(\005B\006\020\001\210\265\030\001\022?\n\013constructor\030\010" +
"ata.Type\022\030\n\014supertype_id\030\002 \003(\005B\002\020\001\022!\n\021ne" + " \003(\0132*.org.jetbrains.kotlin.metadata.Con" +
"sted_class_name\030\007 \003(\005B\006\020\001\210\265\030\001\022?\n\013constru" + "structor\0229\n\010function\030\t \003(\0132\'.org.jetbrai" +
"ctor\030\010 \003(\0132*.org.jetbrains.kotlin.metada" + "ns.kotlin.metadata.Function\0229\n\010property\030" +
"ta.Constructor\0229\n\010function\030\t \003(\0132\'.org.j" + "\n \003(\0132\'.org.jetbrains.kotlin.metadata.Pr" +
"etbrains.kotlin.metadata.Function\0229\n\010pro" + "operty\022<\n\ntype_alias\030\013 \003(\0132(.org.jetbrai",
"perty\030\n \003(\0132\'.org.jetbrains.kotlin.metad" + "ns.kotlin.metadata.TypeAlias\022<\n\nenum_ent" +
"ata.Property\022<\n\ntype_alias\030\013 \003(\0132(.org.j" + "ry\030\r \003(\0132(.org.jetbrains.kotlin.metadata" +
"etbrains.kotlin.metadata.TypeAlias\022<\n\nen", ".EnumEntry\022\'\n\027sealed_subclass_fq_name\030\020 " +
"um_entry\030\r \003(\0132(.org.jetbrains.kotlin.me" + "\003(\005B\006\020\001\220\265\030\001\022<\n\ntype_table\030\036 \001(\0132(.org.je" +
"tadata.EnumEntry\022\'\n\027sealed_subclass_fq_n" + "tbrains.kotlin.metadata.TypeTable\022\033\n\023ver" +
"ame\030\020 \003(\005B\006\020\001\220\265\030\001\022<\n\ntype_table\030\036 \001(\0132(." + "sion_requirement\030\037 \003(\005\022Y\n\031version_requir" +
"org.jetbrains.kotlin.metadata.TypeTable\022" + "ement_table\030 \001(\01326.org.jetbrains.kotlin" +
"\033\n\023version_requirement\030\037 \003(\005\022Y\n\031version_" + ".metadata.VersionRequirementTable\"x\n\004Kin" +
"requirement_table\030 \001(\01326.org.jetbrains." + "d\022\t\n\005CLASS\020\000\022\r\n\tINTERFACE\020\001\022\016\n\nENUM_CLAS" +
"kotlin.metadata.VersionRequirementTable\"" + "S\020\002\022\016\n\nENUM_ENTRY\020\003\022\024\n\020ANNOTATION_CLASS\020",
"x\n\004Kind\022\t\n\005CLASS\020\000\022\r\n\tINTERFACE\020\001\022\016\n\nENU" + "\004\022\n\n\006OBJECT\020\005\022\024\n\020COMPANION_OBJECT\020\006*\006\010d\020" +
"M_CLASS\020\002\022\016\n\nENUM_ENTRY\020\003\022\024\n\020ANNOTATION_" + "\270\224\001\"\335\002\n\007Package\0229\n\010function\030\003 \003(\0132\'.org." +
"CLASS\020\004\022\n\n\006OBJECT\020\005\022\024\n\020COMPANION_OBJECT\020", "jetbrains.kotlin.metadata.Function\0229\n\010pr" +
"\006*\006\010d\020\270\224\001\"\335\002\n\007Package\0229\n\010function\030\003 \003(\0132" + "operty\030\004 \003(\0132\'.org.jetbrains.kotlin.meta" +
"\'.org.jetbrains.kotlin.metadata.Function" + "data.Property\022<\n\ntype_alias\030\005 \003(\0132(.org." +
"\0229\n\010property\030\004 \003(\0132\'.org.jetbrains.kotli" + "jetbrains.kotlin.metadata.TypeAlias\022<\n\nt" +
"n.metadata.Property\022<\n\ntype_alias\030\005 \003(\0132" + "ype_table\030\036 \001(\0132(.org.jetbrains.kotlin.m" +
"(.org.jetbrains.kotlin.metadata.TypeAlia" + "etadata.TypeTable\022Y\n\031version_requirement" +
"s\022<\n\ntype_table\030\036 \001(\0132(.org.jetbrains.ko" + "_table\030 \001(\01326.org.jetbrains.kotlin.meta" +
"tlin.metadata.TypeTable\022Y\n\031version_requi" + "data.VersionRequirementTable*\005\010d\020\310\001\"Z\n\tT",
"rement_table\030 \001(\01326.org.jetbrains.kotli" + "ypeTable\0221\n\004type\030\001 \003(\0132#.org.jetbrains.k" +
"n.metadata.VersionRequirementTable*\005\010d\020\310" + "otlin.metadata.Type\022\032\n\016first_nullable\030\002 " +
"\001\"Z\n\tTypeTable\0221\n\004type\030\001 \003(\0132#.org.jetbr", "\001(\005:\002-1\"\214\001\n\013Constructor\022\020\n\005flags\030\001 \001(\005:\001" +
"ains.kotlin.metadata.Type\022\032\n\016first_nulla" + "6\022F\n\017value_parameter\030\002 \003(\0132-.org.jetbrai" +
"ble\030\002 \001(\005:\002-1\"\214\001\n\013Constructor\022\020\n\005flags\030\001" + "ns.kotlin.metadata.ValueParameter\022\033\n\023ver" +
" \001(\005:\0016\022F\n\017value_parameter\030\002 \003(\0132-.org.j" + "sion_requirement\030\037 \003(\005*\006\010d\020\270\224\001\"\232\004\n\010Funct" +
"etbrains.kotlin.metadata.ValueParameter\022" + "ion\022\020\n\005flags\030\t \001(\005:\0016\022\024\n\told_flags\030\001 \001(\005" +
"\033\n\023version_requirement\030\037 \003(\005*\006\010d\020\270\224\001\"\232\004\n" + ":\0016\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001\0228\n\013return_type\030\003" +
"\010Function\022\020\n\005flags\030\t \001(\005:\0016\022\024\n\told_flags" +
"\030\001 \001(\005:\0016\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001\0228\n\013return_" +
"type\030\003 \001(\0132#.org.jetbrains.kotlin.metada" +
"ta.Type\022\026\n\016return_type_id\030\007 \001(\005\022D\n\016type_" +
"parameter\030\004 \003(\0132,.org.jetbrains.kotlin.m",
"etadata.TypeParameter\022:\n\rreceiver_type\030\005" +
" \001(\0132#.org.jetbrains.kotlin.metadata.Typ" + " \001(\0132#.org.jetbrains.kotlin.metadata.Typ" +
"e\022\030\n\020receiver_type_id\030\010 \001(\005\022F\n\017value_par" + "e\022\026\n\016return_type_id\030\007 \001(\005\022D\n\016type_parame",
"ameter\030\006 \003(\0132-.org.jetbrains.kotlin.meta" + "ter\030\004 \003(\0132,.org.jetbrains.kotlin.metadat" +
"data.ValueParameter\022<\n\ntype_table\030\036 \001(\0132" + "a.TypeParameter\022:\n\rreceiver_type\030\005 \001(\0132#" +
"(.org.jetbrains.kotlin.metadata.TypeTabl" + ".org.jetbrains.kotlin.metadata.Type\022\030\n\020r" +
"e\022\033\n\023version_requirement\030\037 \003(\005\0229\n\010contra" + "eceiver_type_id\030\010 \001(\005\022F\n\017value_parameter" +
"ct\030 \001(\0132\'.org.jetbrains.kotlin.metadata" + "\030\006 \003(\0132-.org.jetbrains.kotlin.metadata.V" +
".Contract*\006\010d\020\270\224\001\"\331\003\n\010Property\022\022\n\005flags\030" + "alueParameter\022<\n\ntype_table\030\036 \001(\0132(.org." +
"\013 \001(\005:\003518\022\027\n\told_flags\030\001 \001(\005:\0042054\022\022\n\004n", "jetbrains.kotlin.metadata.TypeTable\022\033\n\023v" +
"ame\030\002 \002(\005B\004\210\265\030\001\0228\n\013return_type\030\003 \001(\0132#.o" + "ersion_requirement\030\037 \003(\005\0229\n\010contract\030 \001" +
"rg.jetbrains.kotlin.metadata.Type\022\026\n\016ret" + "(\0132\'.org.jetbrains.kotlin.metadata.Contr" +
"urn_type_id\030\t \001(\005\022D\n\016type_parameter\030\004 \003(" + "act*\006\010d\020\270\224\001\"\331\003\n\010Property\022\022\n\005flags\030\013 \001(\005:",
"\0132,.org.jetbrains.kotlin.metadata.TypePa" + "\003518\022\027\n\told_flags\030\001 \001(\005:\0042054\022\022\n\004name\030\002 " +
"rameter\022:\n\rreceiver_type\030\005 \001(\0132#.org.jet" + "\002(\005B\004\210\265\030\001\0228\n\013return_type\030\003 \001(\0132#.org.jet" +
"brains.kotlin.metadata.Type\022\030\n\020receiver_" + "brains.kotlin.metadata.Type\022\026\n\016return_ty" +
"type_id\030\n \001(\005\022M\n\026setter_value_parameter\030" + "pe_id\030\t \001(\005\022D\n\016type_parameter\030\004 \003(\0132,.or" +
"\006 \001(\0132-.org.jetbrains.kotlin.metadata.Va" + "g.jetbrains.kotlin.metadata.TypeParamete" +
"lueParameter\022\024\n\014getter_flags\030\007 \001(\005\022\024\n\014se" + "r\022:\n\rreceiver_type\030\005 \001(\0132#.org.jetbrains" +
"tter_flags\030\010 \001(\005\022\033\n\023version_requirement\030", ".kotlin.metadata.Type\022\030\n\020receiver_type_i" +
"\037 \003(\005*\006\010d\020\270\224\001\"\343\001\n\016ValueParameter\022\020\n\005flag" + "d\030\n \001(\005\022M\n\026setter_value_parameter\030\006 \001(\0132" +
"s\030\001 \001(\005:\0010\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001\0221\n\004type\030\003" + "-.org.jetbrains.kotlin.metadata.ValuePar" +
" \001(\0132#.org.jetbrains.kotlin.metadata.Typ" + "ameter\022\024\n\014getter_flags\030\007 \001(\005\022\024\n\014setter_f",
"e\022\017\n\007type_id\030\005 \001(\005\022@\n\023vararg_element_typ" + "lags\030\010 \001(\005\022\033\n\023version_requirement\030\037 \003(\005*" +
"e\030\004 \001(\0132#.org.jetbrains.kotlin.metadata." + "\006\010d\020\270\224\001\"\343\001\n\016ValueParameter\022\020\n\005flags\030\001 \001(" +
"Type\022\036\n\026vararg_element_type_id\030\006 \001(\005*\005\010d" + "\005:\0010\022\022\n\004name\030\002 \002(\005B\004\210\265\030\001\0221\n\004type\030\003 \001(\0132#" +
"\020\310\001\"\212\003\n\tTypeAlias\022\020\n\005flags\030\001 \001(\005:\0016\022\022\n\004n" + ".org.jetbrains.kotlin.metadata.Type\022\017\n\007t" +
"ame\030\002 \002(\005B\004\210\265\030\001\022D\n\016type_parameter\030\003 \003(\0132" + "ype_id\030\005 \001(\005\022@\n\023vararg_element_type\030\004 \001(" +
",.org.jetbrains.kotlin.metadata.TypePara" + "\0132#.org.jetbrains.kotlin.metadata.Type\022\036" +
"meter\022<\n\017underlying_type\030\004 \001(\0132#.org.jet", "\n\026vararg_element_type_id\030\006 \001(\005*\005\010d\020\310\001\"\212\003" +
"brains.kotlin.metadata.Type\022\032\n\022underlyin" + "\n\tTypeAlias\022\020\n\005flags\030\001 \001(\005:\0016\022\022\n\004name\030\002 " +
"g_type_id\030\005 \001(\005\022:\n\rexpanded_type\030\006 \001(\0132#" + "\002(\005B\004\210\265\030\001\022D\n\016type_parameter\030\003 \003(\0132,.org." +
".org.jetbrains.kotlin.metadata.Type\022\030\n\020e" + "jetbrains.kotlin.metadata.TypeParameter\022",
"xpanded_type_id\030\007 \001(\005\022=\n\nannotation\030\010 \003(" + "<\n\017underlying_type\030\004 \001(\0132#.org.jetbrains" +
"\0132).org.jetbrains.kotlin.metadata.Annota" + ".kotlin.metadata.Type\022\032\n\022underlying_type" +
"tion\022\033\n\023version_requirement\030\037 \003(\005*\005\010d\020\310\001" + "_id\030\005 \001(\005\022:\n\rexpanded_type\030\006 \001(\0132#.org.j" +
"\"&\n\tEnumEntry\022\022\n\004name\030\001 \001(\005B\004\210\265\030\001*\005\010d\020\310\001" + "etbrains.kotlin.metadata.Type\022\030\n\020expande" +
"\"\225\003\n\022VersionRequirement\022\017\n\007version\030\001 \001(\005" + "d_type_id\030\007 \001(\005\022=\n\nannotation\030\010 \003(\0132).or" +
"\022\024\n\014version_full\030\002 \001(\005\022M\n\005level\030\003 \001(\01627." + "g.jetbrains.kotlin.metadata.Annotation\022\033" +
"org.jetbrains.kotlin.metadata.VersionReq", "\n\023version_requirement\030\037 \003(\005*\005\010d\020\310\001\"&\n\tEn" +
"uirement.Level:\005ERROR\022\022\n\nerror_code\030\004 \001(" + "umEntry\022\022\n\004name\030\001 \001(\005B\004\210\265\030\001*\005\010d\020\310\001\"\225\003\n\022V" +
"\005\022\025\n\007message\030\005 \001(\005B\004\230\265\030\001\022e\n\014version_kind" + "ersionRequirement\022\017\n\007version\030\001 \001(\005\022\024\n\014ve" +
"\030\006 \001(\0162=.org.jetbrains.kotlin.metadata.V" + "rsion_full\030\002 \001(\005\022M\n\005level\030\003 \001(\01627.org.je",
"ersionRequirement.VersionKind:\020LANGUAGE_" + "tbrains.kotlin.metadata.VersionRequireme" +
"VERSION\"+\n\005Level\022\013\n\007WARNING\020\000\022\t\n\005ERROR\020\001" + "nt.Level:\005ERROR\022\022\n\nerror_code\030\004 \001(\005\022\025\n\007m" +
"\022\n\n\006HIDDEN\020\002\"J\n\013VersionKind\022\024\n\020LANGUAGE_" + "essage\030\005 \001(\005B\004\230\265\030\001\022e\n\014version_kind\030\006 \001(\016" +
"VERSION\020\000\022\024\n\020COMPILER_VERSION\020\001\022\017\n\013API_V" + "2=.org.jetbrains.kotlin.metadata.Version" +
"ERSION\020\002\"a\n\027VersionRequirementTable\022F\n\013r" + "Requirement.VersionKind:\020LANGUAGE_VERSIO" +
"equirement\030\001 \003(\01321.org.jetbrains.kotlin." + "N\"+\n\005Level\022\013\n\007WARNING\020\000\022\t\n\005ERROR\020\001\022\n\n\006HI" +
"metadata.VersionRequirement\"\217\002\n\017PackageF", "DDEN\020\002\"J\n\013VersionKind\022\024\n\020LANGUAGE_VERSIO" +
"ragment\022;\n\007strings\030\001 \001(\0132*.org.jetbrains" + "N\020\000\022\024\n\020COMPILER_VERSION\020\001\022\017\n\013API_VERSION" +
".kotlin.metadata.StringTable\022J\n\017qualifie" + "\020\002\"a\n\027VersionRequirementTable\022F\n\013require" +
"d_names\030\002 \001(\01321.org.jetbrains.kotlin.met" + "ment\030\001 \003(\01321.org.jetbrains.kotlin.metada",
"adata.QualifiedNameTable\0227\n\007package\030\003 \001(" + "ta.VersionRequirement\"\217\002\n\017PackageFragmen" +
"\0132&.org.jetbrains.kotlin.metadata.Packag" + "t\022;\n\007strings\030\001 \001(\0132*.org.jetbrains.kotli" +
"e\0223\n\005class\030\004 \003(\0132$.org.jetbrains.kotlin." + "n.metadata.StringTable\022J\n\017qualified_name" +
"metadata.Class*\005\010d\020\310\001\"A\n\010Contract\0225\n\006eff" + "s\030\002 \001(\01321.org.jetbrains.kotlin.metadata." +
"ect\030\001 \003(\0132%.org.jetbrains.kotlin.metadat" + "QualifiedNameTable\0227\n\007package\030\003 \001(\0132&.or" +
"a.Effect\"\306\003\n\006Effect\022E\n\013effect_type\030\001 \001(\016" + "g.jetbrains.kotlin.metadata.Package\0223\n\005c" +
"20.org.jetbrains.kotlin.metadata.Effect.", "lass\030\004 \003(\0132$.org.jetbrains.kotlin.metada" +
"EffectType\022N\n\033effect_constructor_argumen" + "ta.Class*\005\010d\020\310\001\"A\n\010Contract\0225\n\006effect\030\001 " +
"t\030\002 \003(\0132).org.jetbrains.kotlin.metadata." + "\003(\0132%.org.jetbrains.kotlin.metadata.Effe" +
"Expression\022S\n conclusion_of_conditional_" + "ct\"\306\003\n\006Effect\022E\n\013effect_type\030\001 \001(\01620.org",
"effect\030\003 \001(\0132).org.jetbrains.kotlin.meta" + ".jetbrains.kotlin.metadata.Effect.Effect" +
"data.Expression\022B\n\004kind\030\004 \001(\01624.org.jetb" + "Type\022N\n\033effect_constructor_argument\030\002 \003(" +
"rains.kotlin.metadata.Effect.InvocationK" + "\0132).org.jetbrains.kotlin.metadata.Expres" +
"ind\"C\n\nEffectType\022\024\n\020RETURNS_CONSTANT\020\000\022" + "sion\022S\n conclusion_of_conditional_effect" +
"\t\n\005CALLS\020\001\022\024\n\020RETURNS_NOT_NULL\020\002\"G\n\016Invo" + "\030\003 \001(\0132).org.jetbrains.kotlin.metadata.E" +
"cationKind\022\020\n\014AT_MOST_ONCE\020\000\022\020\n\014EXACTLY_" + "xpression\022B\n\004kind\030\004 \001(\01624.org.jetbrains." +
"ONCE\020\001\022\021\n\rAT_LEAST_ONCE\020\002\"\237\003\n\nExpression", "kotlin.metadata.Effect.InvocationKind\"C\n" +
"\022\020\n\005flags\030\001 \001(\005:\0010\022!\n\031value_parameter_re" + "\nEffectType\022\024\n\020RETURNS_CONSTANT\020\000\022\t\n\005CAL" +
"ference\030\002 \001(\005\022O\n\016constant_value\030\003 \001(\01627." + "LS\020\001\022\024\n\020RETURNS_NOT_NULL\020\002\"G\n\016Invocation" +
"org.jetbrains.kotlin.metadata.Expression" + "Kind\022\020\n\014AT_MOST_ONCE\020\000\022\020\n\014EXACTLY_ONCE\020\001",
".ConstantValue\022=\n\020is_instance_type\030\004 \001(\013" + "\022\021\n\rAT_LEAST_ONCE\020\002\"\237\003\n\nExpression\022\020\n\005fl" +
"2#.org.jetbrains.kotlin.metadata.Type\022\033\n" + "ags\030\001 \001(\005:\0010\022!\n\031value_parameter_referenc" +
"\023is_instance_type_id\030\005 \001(\005\022?\n\014and_argume" + "e\030\002 \001(\005\022O\n\016constant_value\030\003 \001(\01627.org.je" +
"nt\030\006 \003(\0132).org.jetbrains.kotlin.metadata" + "tbrains.kotlin.metadata.Expression.Const" +
".Expression\022>\n\013or_argument\030\007 \003(\0132).org.j" + "antValue\022=\n\020is_instance_type\030\004 \001(\0132#.org" +
"etbrains.kotlin.metadata.Expression\".\n\rC" + ".jetbrains.kotlin.metadata.Type\022\033\n\023is_in" +
"onstantValue\022\010\n\004TRUE\020\000\022\t\n\005FALSE\020\001\022\010\n\004NUL", "stance_type_id\030\005 \001(\005\022?\n\014and_argument\030\006 \003" +
"L\020\002*9\n\010Modality\022\t\n\005FINAL\020\000\022\010\n\004OPEN\020\001\022\014\n\010" + "(\0132).org.jetbrains.kotlin.metadata.Expre" +
"ABSTRACT\020\002\022\n\n\006SEALED\020\003*b\n\nVisibility\022\014\n\010" + "ssion\022>\n\013or_argument\030\007 \003(\0132).org.jetbrai" +
"INTERNAL\020\000\022\013\n\007PRIVATE\020\001\022\r\n\tPROTECTED\020\002\022\n" + "ns.kotlin.metadata.Expression\".\n\rConstan",
"\n\006PUBLIC\020\003\022\023\n\017PRIVATE_TO_THIS\020\004\022\t\n\005LOCAL" + "tValue\022\010\n\004TRUE\020\000\022\t\n\005FALSE\020\001\022\010\n\004NULL\020\002*9\n" +
"\020\005*Q\n\nMemberKind\022\017\n\013DECLARATION\020\000\022\021\n\rFAK" + "\010Modality\022\t\n\005FINAL\020\000\022\010\n\004OPEN\020\001\022\014\n\010ABSTRA" +
"E_OVERRIDE\020\001\022\016\n\nDELEGATION\020\002\022\017\n\013SYNTHESI" + "CT\020\002\022\n\n\006SEALED\020\003*b\n\nVisibility\022\014\n\010INTERN" +
"ZED\020\003B\017B\rDebugProtoBuf" "AL\020\000\022\013\n\007PRIVATE\020\001\022\r\n\tPROTECTED\020\002\022\n\n\006PUBL" +
"IC\020\003\022\023\n\017PRIVATE_TO_THIS\020\004\022\t\n\005LOCAL\020\005*Q\n\n" +
"MemberKind\022\017\n\013DECLARATION\020\000\022\021\n\rFAKE_OVER" +
"RIDE\020\001\022\016\n\nDELEGATION\020\002\022\017\n\013SYNTHESIZED\020\003B" +
"\017B\rDebugProtoBuf"
}; };
org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { new org.jetbrains.kotlin.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
@@ -34362,7 +34521,7 @@ public final class DebugProtoBuf {
internal_static_org_jetbrains_kotlin_metadata_Annotation_Argument_Value_fieldAccessorTable = new internal_static_org_jetbrains_kotlin_metadata_Annotation_Argument_Value_fieldAccessorTable = new
org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable( org.jetbrains.kotlin.protobuf.GeneratedMessage.FieldAccessorTable(
internal_static_org_jetbrains_kotlin_metadata_Annotation_Argument_Value_descriptor, internal_static_org_jetbrains_kotlin_metadata_Annotation_Argument_Value_descriptor,
new java.lang.String[] { "Type", "IntValue", "FloatValue", "DoubleValue", "StringValue", "ClassId", "EnumValueId", "Annotation", "ArrayElement", "Flags", }); new java.lang.String[] { "Type", "IntValue", "FloatValue", "DoubleValue", "StringValue", "ClassId", "EnumValueId", "Annotation", "ArrayElement", "ArrayDimensionCount", "Flags", });
internal_static_org_jetbrains_kotlin_metadata_Type_descriptor = internal_static_org_jetbrains_kotlin_metadata_Type_descriptor =
getDescriptor().getMessageTypes().get(3); getDescriptor().getMessageTypes().get(3);
internal_static_org_jetbrains_kotlin_metadata_Type_fieldAccessorTable = new internal_static_org_jetbrains_kotlin_metadata_Type_fieldAccessorTable = new
@@ -16,6 +16,7 @@
package org.jetbrains.kotlin.serialization package org.jetbrains.kotlin.serialization
import org.jetbrains.kotlin.builtins.KotlinBuiltIns
import org.jetbrains.kotlin.descriptors.ClassDescriptor import org.jetbrains.kotlin.descriptors.ClassDescriptor
import org.jetbrains.kotlin.descriptors.annotations.AnnotationArgumentVisitor import org.jetbrains.kotlin.descriptors.annotations.AnnotationArgumentVisitor
import org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor import org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor
@@ -99,11 +100,23 @@ class AnnotationSerializer(private val stringTable: DescriptorAwareStringTable)
} }
override fun visitKClassValue(value: KClassValue, data: Unit) { override fun visitKClassValue(value: KClassValue, data: Unit) {
val descriptor = value.value.constructor.declarationDescriptor as? ClassDescriptor var kotlinType = value.value
?: throw UnsupportedOperationException("Class literal annotation argument should be a class: $value") var arrayDimensions = 0
while (KotlinBuiltIns.isArray(kotlinType)) {
// We only support invariant projections and non-null array element types, see KT-26568
kotlinType = kotlinType.arguments.single().type
arrayDimensions++
}
val descriptor = kotlinType.constructor.declarationDescriptor as? ClassDescriptor
?: throw UnsupportedOperationException("Class literal annotation argument should be a class: $value")
type = Type.CLASS type = Type.CLASS
classId = stringTable.getFqNameIndex(descriptor) classId = stringTable.getFqNameIndex(descriptor)
if (arrayDimensions > 0) {
arrayDimensionCount = arrayDimensions
}
} }
override fun visitLongValue(value: LongValue, data: Unit) { override fun visitLongValue(value: LongValue, data: Unit) {
@@ -11,6 +11,13 @@ class A {
fun simple(s: @Ann(Simple::class) String) {} fun simple(s: @Ann(Simple::class) String) {}
fun generic(s: @Ann(Generic::class) String) {} fun generic(s: @Ann(Generic::class) String) {}
fun innerGeneric(s: @Ann(InnerGeneric.Inner::class) String) {} fun innerGeneric(s: @Ann(InnerGeneric.Inner::class) String) {}
fun arrays(
s: @Ann(Array<Int>::class) Array<Int>,
t: @Ann(Array<IntArray>::class) Array<IntArray>,
u: @Ann(Array<Array<Int>>::class) Array<Array<Int>>,
v: @Ann(Array<Array<Array<String>>>::class) Array<Array<Array<String>>>
) {}
} }
class Simple class Simple
@@ -2,6 +2,7 @@ package test
public final class A { public final class A {
/*primary*/ public constructor A() /*primary*/ public constructor A()
public final fun arrays(/*0*/ s: @test.Ann(klass = kotlin.Array<kotlin.Int>::class) kotlin.Array<kotlin.Int>, /*1*/ t: @test.Ann(klass = kotlin.Array<kotlin.IntArray>::class) kotlin.Array<kotlin.IntArray>, /*2*/ u: @test.Ann(klass = kotlin.Array<kotlin.Array<kotlin.Int>>::class) kotlin.Array<kotlin.Array<kotlin.Int>>, /*3*/ v: @test.Ann(klass = kotlin.Array<kotlin.Array<kotlin.Array<kotlin.String>>>::class) kotlin.Array<kotlin.Array<kotlin.Array<kotlin.String>>>): kotlin.Unit
public final fun generic(/*0*/ s: @test.Ann(klass = test.Generic<*>::class) kotlin.String): kotlin.Unit public final fun generic(/*0*/ s: @test.Ann(klass = test.Generic<*>::class) kotlin.String): kotlin.Unit
public final fun innerGeneric(/*0*/ s: @test.Ann(klass = test.InnerGeneric<*, *>.Inner<*, *>::class) kotlin.String): kotlin.Unit public final fun innerGeneric(/*0*/ s: @test.Ann(klass = test.InnerGeneric<*, *>.Inner<*, *>::class) kotlin.String): kotlin.Unit
public final fun simple(/*0*/ s: @test.Ann(klass = test.Simple::class) kotlin.String): kotlin.Unit public final fun simple(/*0*/ s: @test.Ann(klass = test.Simple::class) kotlin.String): kotlin.Unit
@@ -33,7 +33,7 @@ class JsMetadataVersion(vararg numbers: Int) : BinaryVersion(*numbers) {
companion object { companion object {
@JvmField @JvmField
val INSTANCE = JsMetadataVersion(1, 2, 4) val INSTANCE = JsMetadataVersion(1, 2, 5)
@JvmField @JvmField
val INVALID_VERSION = JsMetadataVersion() val INVALID_VERSION = JsMetadataVersion()
@@ -79,7 +79,7 @@ class AnnotationDeserializer(private val module: ModuleDescriptor, private val n
StringValue(nameResolver.getString(value.stringValue)) StringValue(nameResolver.getString(value.stringValue))
} }
Type.CLASS -> { Type.CLASS -> {
resolveClassLiteralValue(nameResolver.getClassId(value.classId)) resolveClassLiteralValue(nameResolver.getClassId(value.classId), value.arrayDimensionCount)
} }
Type.ENUM -> { Type.ENUM -> {
EnumValue(nameResolver.getClassId(value.classId), nameResolver.getName(value.enumValueId)) EnumValue(nameResolver.getClassId(value.classId), nameResolver.getName(value.enumValueId))
@@ -128,13 +128,17 @@ class AnnotationDeserializer(private val module: ModuleDescriptor, private val n
private inline fun <T, R> T.letIf(predicate: Boolean, f: (T) -> R, g: (T) -> R): R = private inline fun <T, R> T.letIf(predicate: Boolean, f: (T) -> R, g: (T) -> R): R =
if (predicate) f(this) else g(this) if (predicate) f(this) else g(this)
private fun resolveClassLiteralValue(classId: ClassId): ConstantValue<*> { private fun resolveClassLiteralValue(classId: ClassId, arrayDimensions: Int): ConstantValue<*> {
// If value refers to a class named test.Foo.Bar where both Foo and Bar have generic type parameters, // If value refers to a class named test.Foo.Bar where both Foo and Bar have generic type parameters,
// we're constructing a type `KClass<test.Foo<*>.Bar<*>>` below // we're constructing a type `KClass<test.Foo<*>.Bar<*>>` below
val starProjectedType = resolveClass(classId).defaultType.replaceArgumentsWithStarProjections() var type = resolveClass(classId).defaultType.replaceArgumentsWithStarProjections()
repeat(arrayDimensions) {
// We only support invariant projections and non-null array element types, see KT-26568
type = builtIns.getArrayType(Variance.INVARIANT, type)
}
val kClass = resolveClass(ClassId.topLevel(KotlinBuiltIns.FQ_NAMES.kClass.toSafe())) val kClass = resolveClass(ClassId.topLevel(KotlinBuiltIns.FQ_NAMES.kClass.toSafe()))
val type = KotlinTypeFactory.simpleNotNullType(Annotations.EMPTY, kClass, listOf(TypeProjectionImpl(starProjectedType))) return KClassValue(KotlinTypeFactory.simpleNotNullType(Annotations.EMPTY, kClass, listOf(TypeProjectionImpl(type))))
return KClassValue(type)
} }
private fun resolveArrayElementType(value: Value, nameResolver: NameResolver): SimpleType = private fun resolveArrayElementType(value: Value, nameResolver: NameResolver): SimpleType =
@@ -20,7 +20,7 @@ class JvmMetadataVersion(vararg numbers: Int) : BinaryVersion(*numbers) {
companion object { companion object {
@JvmField @JvmField
val INSTANCE = JvmMetadataVersion(1, 1, 12) val INSTANCE = JvmMetadataVersion(1, 1, 13)
@JvmField @JvmField
val INVALID_VERSION = JvmMetadataVersion() val INVALID_VERSION = JvmMetadataVersion()
+9
View File
@@ -84,6 +84,15 @@ message Annotation {
repeated Value array_element = 9; repeated Value array_element = 9;
// If type = CLASS, the number of dimensions of the array of the class specified in class_id.
// E.g. if class_id = kotlin/String, this annotation argument value denotes:
// - String::class, if array_dimension_count = 0
// - Array<String>::class, if array_dimension_count = 1
// - Array<Array<String>>::class, if array_dimension_count = 2
// - etc.
// Other forms of array class literals are not supported by this format, see KT-26568
optional int32 array_dimension_count = 11 [default = 0];
/* /*
isUnsigned isUnsigned
*/ */
@@ -2201,6 +2201,35 @@ public final class ProtoBuf {
*/ */
int getArrayElementCount(); int getArrayElementCount();
/**
* <code>optional int32 array_dimension_count = 11 [default = 0];</code>
*
* <pre>
* If type = CLASS, the number of dimensions of the array of the class specified in class_id.
* E.g. if class_id = kotlin/String, this annotation argument value denotes:
* - String::class, if array_dimension_count = 0
* - Array&lt;String&gt;::class, if array_dimension_count = 1
* - Array&lt;Array&lt;String&gt;&gt;::class, if array_dimension_count = 2
* - etc.
* Other forms of array class literals are not supported by this format, see KT-26568
* </pre>
*/
boolean hasArrayDimensionCount();
/**
* <code>optional int32 array_dimension_count = 11 [default = 0];</code>
*
* <pre>
* If type = CLASS, the number of dimensions of the array of the class specified in class_id.
* E.g. if class_id = kotlin/String, this annotation argument value denotes:
* - String::class, if array_dimension_count = 0
* - Array&lt;String&gt;::class, if array_dimension_count = 1
* - Array&lt;Array&lt;String&gt;&gt;::class, if array_dimension_count = 2
* - etc.
* Other forms of array class literals are not supported by this format, see KT-26568
* </pre>
*/
int getArrayDimensionCount();
/** /**
* <code>optional int32 flags = 10 [default = 0];</code> * <code>optional int32 flags = 10 [default = 0];</code>
* *
@@ -2332,10 +2361,15 @@ public final class ProtoBuf {
break; break;
} }
case 80: { case 80: {
bitField0_ |= 0x00000100; bitField0_ |= 0x00000200;
flags_ = input.readInt32(); flags_ = input.readInt32();
break; break;
} }
case 88: {
bitField0_ |= 0x00000100;
arrayDimensionCount_ = input.readInt32();
break;
}
} }
} }
} catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) { } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
@@ -2703,6 +2737,41 @@ public final class ProtoBuf {
return arrayElement_.get(index); return arrayElement_.get(index);
} }
public static final int ARRAY_DIMENSION_COUNT_FIELD_NUMBER = 11;
private int arrayDimensionCount_;
/**
* <code>optional int32 array_dimension_count = 11 [default = 0];</code>
*
* <pre>
* If type = CLASS, the number of dimensions of the array of the class specified in class_id.
* E.g. if class_id = kotlin/String, this annotation argument value denotes:
* - String::class, if array_dimension_count = 0
* - Array&lt;String&gt;::class, if array_dimension_count = 1
* - Array&lt;Array&lt;String&gt;&gt;::class, if array_dimension_count = 2
* - etc.
* Other forms of array class literals are not supported by this format, see KT-26568
* </pre>
*/
public boolean hasArrayDimensionCount() {
return ((bitField0_ & 0x00000100) == 0x00000100);
}
/**
* <code>optional int32 array_dimension_count = 11 [default = 0];</code>
*
* <pre>
* If type = CLASS, the number of dimensions of the array of the class specified in class_id.
* E.g. if class_id = kotlin/String, this annotation argument value denotes:
* - String::class, if array_dimension_count = 0
* - Array&lt;String&gt;::class, if array_dimension_count = 1
* - Array&lt;Array&lt;String&gt;&gt;::class, if array_dimension_count = 2
* - etc.
* Other forms of array class literals are not supported by this format, see KT-26568
* </pre>
*/
public int getArrayDimensionCount() {
return arrayDimensionCount_;
}
public static final int FLAGS_FIELD_NUMBER = 10; public static final int FLAGS_FIELD_NUMBER = 10;
private int flags_; private int flags_;
/** /**
@@ -2713,7 +2782,7 @@ public final class ProtoBuf {
* </pre> * </pre>
*/ */
public boolean hasFlags() { public boolean hasFlags() {
return ((bitField0_ & 0x00000100) == 0x00000100); return ((bitField0_ & 0x00000200) == 0x00000200);
} }
/** /**
* <code>optional int32 flags = 10 [default = 0];</code> * <code>optional int32 flags = 10 [default = 0];</code>
@@ -2736,6 +2805,7 @@ public final class ProtoBuf {
enumValueId_ = 0; enumValueId_ = 0;
annotation_ = org.jetbrains.kotlin.metadata.ProtoBuf.Annotation.getDefaultInstance(); annotation_ = org.jetbrains.kotlin.metadata.ProtoBuf.Annotation.getDefaultInstance();
arrayElement_ = java.util.Collections.emptyList(); arrayElement_ = java.util.Collections.emptyList();
arrayDimensionCount_ = 0;
flags_ = 0; flags_ = 0;
} }
private byte memoizedIsInitialized = -1; private byte memoizedIsInitialized = -1;
@@ -2790,9 +2860,12 @@ public final class ProtoBuf {
for (int i = 0; i < arrayElement_.size(); i++) { for (int i = 0; i < arrayElement_.size(); i++) {
output.writeMessage(9, arrayElement_.get(i)); output.writeMessage(9, arrayElement_.get(i));
} }
if (((bitField0_ & 0x00000100) == 0x00000100)) { if (((bitField0_ & 0x00000200) == 0x00000200)) {
output.writeInt32(10, flags_); output.writeInt32(10, flags_);
} }
if (((bitField0_ & 0x00000100) == 0x00000100)) {
output.writeInt32(11, arrayDimensionCount_);
}
output.writeRawBytes(unknownFields); output.writeRawBytes(unknownFields);
} }
@@ -2838,10 +2911,14 @@ public final class ProtoBuf {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeMessageSize(9, arrayElement_.get(i)); .computeMessageSize(9, arrayElement_.get(i));
} }
if (((bitField0_ & 0x00000100) == 0x00000100)) { if (((bitField0_ & 0x00000200) == 0x00000200)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeInt32Size(10, flags_); .computeInt32Size(10, flags_);
} }
if (((bitField0_ & 0x00000100) == 0x00000100)) {
size += org.jetbrains.kotlin.protobuf.CodedOutputStream
.computeInt32Size(11, arrayDimensionCount_);
}
size += unknownFields.size(); size += unknownFields.size();
memoizedSerializedSize = size; memoizedSerializedSize = size;
return size; return size;
@@ -2954,8 +3031,10 @@ public final class ProtoBuf {
bitField0_ = (bitField0_ & ~0x00000080); bitField0_ = (bitField0_ & ~0x00000080);
arrayElement_ = java.util.Collections.emptyList(); arrayElement_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000100); bitField0_ = (bitField0_ & ~0x00000100);
flags_ = 0; arrayDimensionCount_ = 0;
bitField0_ = (bitField0_ & ~0x00000200); bitField0_ = (bitField0_ & ~0x00000200);
flags_ = 0;
bitField0_ = (bitField0_ & ~0x00000400);
return this; return this;
} }
@@ -3019,6 +3098,10 @@ public final class ProtoBuf {
if (((from_bitField0_ & 0x00000200) == 0x00000200)) { if (((from_bitField0_ & 0x00000200) == 0x00000200)) {
to_bitField0_ |= 0x00000100; to_bitField0_ |= 0x00000100;
} }
result.arrayDimensionCount_ = arrayDimensionCount_;
if (((from_bitField0_ & 0x00000400) == 0x00000400)) {
to_bitField0_ |= 0x00000200;
}
result.flags_ = flags_; result.flags_ = flags_;
result.bitField0_ = to_bitField0_; result.bitField0_ = to_bitField0_;
return result; return result;
@@ -3060,6 +3143,9 @@ public final class ProtoBuf {
} }
} }
if (other.hasArrayDimensionCount()) {
setArrayDimensionCount(other.getArrayDimensionCount());
}
if (other.hasFlags()) { if (other.hasFlags()) {
setFlags(other.getFlags()); setFlags(other.getFlags());
} }
@@ -3555,6 +3641,78 @@ public final class ProtoBuf {
return this; return this;
} }
private int arrayDimensionCount_ ;
/**
* <code>optional int32 array_dimension_count = 11 [default = 0];</code>
*
* <pre>
* If type = CLASS, the number of dimensions of the array of the class specified in class_id.
* E.g. if class_id = kotlin/String, this annotation argument value denotes:
* - String::class, if array_dimension_count = 0
* - Array&lt;String&gt;::class, if array_dimension_count = 1
* - Array&lt;Array&lt;String&gt;&gt;::class, if array_dimension_count = 2
* - etc.
* Other forms of array class literals are not supported by this format, see KT-26568
* </pre>
*/
public boolean hasArrayDimensionCount() {
return ((bitField0_ & 0x00000200) == 0x00000200);
}
/**
* <code>optional int32 array_dimension_count = 11 [default = 0];</code>
*
* <pre>
* If type = CLASS, the number of dimensions of the array of the class specified in class_id.
* E.g. if class_id = kotlin/String, this annotation argument value denotes:
* - String::class, if array_dimension_count = 0
* - Array&lt;String&gt;::class, if array_dimension_count = 1
* - Array&lt;Array&lt;String&gt;&gt;::class, if array_dimension_count = 2
* - etc.
* Other forms of array class literals are not supported by this format, see KT-26568
* </pre>
*/
public int getArrayDimensionCount() {
return arrayDimensionCount_;
}
/**
* <code>optional int32 array_dimension_count = 11 [default = 0];</code>
*
* <pre>
* If type = CLASS, the number of dimensions of the array of the class specified in class_id.
* E.g. if class_id = kotlin/String, this annotation argument value denotes:
* - String::class, if array_dimension_count = 0
* - Array&lt;String&gt;::class, if array_dimension_count = 1
* - Array&lt;Array&lt;String&gt;&gt;::class, if array_dimension_count = 2
* - etc.
* Other forms of array class literals are not supported by this format, see KT-26568
* </pre>
*/
public Builder setArrayDimensionCount(int value) {
bitField0_ |= 0x00000200;
arrayDimensionCount_ = value;
return this;
}
/**
* <code>optional int32 array_dimension_count = 11 [default = 0];</code>
*
* <pre>
* If type = CLASS, the number of dimensions of the array of the class specified in class_id.
* E.g. if class_id = kotlin/String, this annotation argument value denotes:
* - String::class, if array_dimension_count = 0
* - Array&lt;String&gt;::class, if array_dimension_count = 1
* - Array&lt;Array&lt;String&gt;&gt;::class, if array_dimension_count = 2
* - etc.
* Other forms of array class literals are not supported by this format, see KT-26568
* </pre>
*/
public Builder clearArrayDimensionCount() {
bitField0_ = (bitField0_ & ~0x00000200);
arrayDimensionCount_ = 0;
return this;
}
private int flags_ ; private int flags_ ;
/** /**
* <code>optional int32 flags = 10 [default = 0];</code> * <code>optional int32 flags = 10 [default = 0];</code>
@@ -3564,7 +3722,7 @@ public final class ProtoBuf {
* </pre> * </pre>
*/ */
public boolean hasFlags() { public boolean hasFlags() {
return ((bitField0_ & 0x00000200) == 0x00000200); return ((bitField0_ & 0x00000400) == 0x00000400);
} }
/** /**
* <code>optional int32 flags = 10 [default = 0];</code> * <code>optional int32 flags = 10 [default = 0];</code>
@@ -3584,7 +3742,7 @@ public final class ProtoBuf {
* </pre> * </pre>
*/ */
public Builder setFlags(int value) { public Builder setFlags(int value) {
bitField0_ |= 0x00000200; bitField0_ |= 0x00000400;
flags_ = value; flags_ = value;
return this; return this;
@@ -3597,7 +3755,7 @@ public final class ProtoBuf {
* </pre> * </pre>
*/ */
public Builder clearFlags() { public Builder clearFlags() {
bitField0_ = (bitField0_ & ~0x00000200); bitField0_ = (bitField0_ & ~0x00000400);
flags_ = 0; flags_ = 0;
return this; return this;
@@ -19,7 +19,7 @@ class BuiltInsBinaryVersion(vararg numbers: Int) : BinaryVersion(*numbers) {
companion object { companion object {
@JvmField @JvmField
val INSTANCE = BuiltInsBinaryVersion(1, 0, 5) val INSTANCE = BuiltInsBinaryVersion(1, 0, 6)
@JvmField @JvmField
val INVALID_VERSION = BuiltInsBinaryVersion() val INVALID_VERSION = BuiltInsBinaryVersion()