Serializing information about star projections
This commit is contained in:
@@ -3,8 +3,8 @@ package test
|
||||
public trait RawTypeWithUpperBound {
|
||||
|
||||
public trait Bar {
|
||||
public abstract fun f(/*0*/ p0: test.RawTypeWithUpperBound.Foo<out kotlin.CharSequence!>!): kotlin.Unit
|
||||
public abstract fun g(/*0*/ p0: kotlin.(Mutable)List<test.RawTypeWithUpperBound.Foo<out kotlin.CharSequence!>!>!): kotlin.Unit
|
||||
public abstract fun f(/*0*/ p0: test.RawTypeWithUpperBound.Foo<*>!): kotlin.Unit
|
||||
public abstract fun g(/*0*/ p0: kotlin.(Mutable)List<test.RawTypeWithUpperBound.Foo<*>!>!): kotlin.Unit
|
||||
}
|
||||
|
||||
public trait Foo</*0*/ T : kotlin.CharSequence!> {
|
||||
|
||||
@@ -4,11 +4,11 @@ public open class ClassObjectArrayInParam {
|
||||
public constructor ClassObjectArrayInParam()
|
||||
|
||||
public final annotation class Anno : kotlin.Annotation {
|
||||
public constructor Anno(/*0*/ vararg value: java.lang.Class<out kotlin.Any?> /*kotlin.Array<out java.lang.Class<out kotlin.Any?>>*/)
|
||||
public abstract fun value(): kotlin.Array<java.lang.Class<out kotlin.Any?>>
|
||||
public constructor Anno(/*0*/ vararg value: java.lang.Class<*> /*kotlin.Array<out java.lang.Class<*>>*/)
|
||||
public abstract fun value(): kotlin.Array<java.lang.Class<*>>
|
||||
}
|
||||
|
||||
test.ClassObjectArrayInParam.Anno(value = {test.ClassObjectArrayInParam.class, test.ClassObjectArrayInParam.Nested.class, kotlin.String.class}: kotlin.Array<out java.lang.Class<out kotlin.Any?>>) public open class Nested {
|
||||
test.ClassObjectArrayInParam.Anno(value = {test.ClassObjectArrayInParam.class, test.ClassObjectArrayInParam.Nested.class, kotlin.String.class}: kotlin.Array<out java.lang.Class<*>>) public open class Nested {
|
||||
public constructor Nested()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ public open class ClassObjectInParam {
|
||||
public constructor ClassObjectInParam()
|
||||
|
||||
public final annotation class Anno : kotlin.Annotation {
|
||||
public constructor Anno(/*0*/ value: java.lang.Class<out kotlin.Any?>)
|
||||
public abstract fun value(): java.lang.Class<out kotlin.Any?>
|
||||
public constructor Anno(/*0*/ value: java.lang.Class<*>)
|
||||
public abstract fun value(): java.lang.Class<*>
|
||||
}
|
||||
|
||||
test.ClassObjectInParam.Anno(value = test.ClassObjectInParam.class: java.lang.Class<test.ClassObjectInParam>) public open class Nested {
|
||||
|
||||
@@ -2,7 +2,7 @@ package test
|
||||
|
||||
public final class StarProjection {
|
||||
public constructor StarProjection()
|
||||
public final fun foo(): test.StarProjection.MyClass<out kotlin.CharSequence!>!
|
||||
public final fun foo(): test.StarProjection.MyClass<*>!
|
||||
|
||||
public trait MyClass</*0*/ T : kotlin.CharSequence!> {
|
||||
}
|
||||
|
||||
@@ -42,16 +42,16 @@ public open class Rendering {
|
||||
}
|
||||
|
||||
public/*package*/ trait H_Raw {
|
||||
public abstract fun foo1(/*0*/ p0: (kotlin.MutableList<out kotlin.Any?>..kotlin.List<kotlin.Any?>?)): kotlin.Unit
|
||||
public abstract fun foo2(/*0*/ p0: test.Rendering.D_SuperG<out kotlin.Any?>!): kotlin.Unit
|
||||
public abstract fun foo1(/*0*/ p0: kotlin.(Mutable)List<*>!): kotlin.Unit
|
||||
public abstract fun foo2(/*0*/ p0: test.Rendering.D_SuperG<*>!): kotlin.Unit
|
||||
}
|
||||
|
||||
public/*package*/ trait I_Wildcard {
|
||||
public abstract fun foo1(/*0*/ p0: (kotlin.MutableList<out kotlin.String!>..kotlin.List<kotlin.String!>?)): kotlin.Unit
|
||||
public abstract fun foo2(/*0*/ p0: kotlin.(Mutable)List<in kotlin.String!>!): kotlin.Unit
|
||||
public abstract fun foo3(/*0*/ p0: (kotlin.MutableList<out kotlin.Any?>..kotlin.List<kotlin.Any?>?)): kotlin.Unit
|
||||
public abstract fun foo3(/*0*/ p0: kotlin.(Mutable)List<*>!): kotlin.Unit
|
||||
public abstract fun foo4(/*0*/ p0: test.Rendering.D_SuperG<out kotlin.String!>!): kotlin.Unit
|
||||
public abstract fun foo5(/*0*/ p0: test.Rendering.D_SuperG<in kotlin.String!>!): kotlin.Unit
|
||||
public abstract fun foo6(/*0*/ p0: test.Rendering.D_SuperG<out kotlin.Any?>!): kotlin.Unit
|
||||
public abstract fun foo6(/*0*/ p0: test.Rendering.D_SuperG<*>!): kotlin.Unit
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,5 +8,5 @@ public open class NonTrivialFunctionType {
|
||||
public open fun foo(/*0*/ p0: java.util.Comparator<kotlin.String!>!): kotlin.Unit
|
||||
public final /*synthesized*/ fun wildcardBound(/*0*/ p0: ((kotlin.CharSequence!, kotlin.CharSequence!) -> kotlin.Int)!): kotlin.Unit
|
||||
public open fun wildcardBound(/*0*/ p0: java.util.Comparator<in kotlin.CharSequence!>!): kotlin.Unit
|
||||
public open fun wildcardUnbound(/*0*/ p0: java.util.Comparator<out kotlin.Any?>!): kotlin.Unit
|
||||
public open fun wildcardUnbound(/*0*/ p0: java.util.Comparator<*>!): kotlin.Unit
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package test
|
||||
public open class RawSuperType {
|
||||
public constructor RawSuperType()
|
||||
|
||||
public open inner class Derived : test.RawSuperType.Super<kotlin.Any?> {
|
||||
public open inner class Derived : test.RawSuperType.Super<*> {
|
||||
public constructor Derived()
|
||||
public open override /*1*/ fun dummy(): kotlin.Unit
|
||||
public open override /*1*/ fun foo(/*0*/ p0: kotlin.Any!): kotlin.Unit
|
||||
|
||||
+7
-7
@@ -4,23 +4,23 @@ public trait SubclassWithRawType {
|
||||
|
||||
public trait Sub : test.SubclassWithRawType.Super {
|
||||
public abstract override /*1*/ fun array1(): kotlin.Array<(out) kotlin.(Mutable)List<kotlin.String!>!>!
|
||||
public abstract override /*1*/ fun array2(): kotlin.Array<(out) (kotlin.MutableList<out kotlin.Any?>..kotlin.List<kotlin.Any?>?)>!
|
||||
public abstract override /*1*/ fun array2(): kotlin.Array<(out) kotlin.(Mutable)List<*>!>!
|
||||
public abstract override /*1*/ fun boundWildcard1(): (kotlin.MutableList<out kotlin.(Mutable)List<kotlin.String!>!>..kotlin.List<kotlin.(Mutable)List<kotlin.String!>!>?)
|
||||
public abstract override /*1*/ fun boundWildcard2(): kotlin.(Mutable)List<in (kotlin.MutableList<out kotlin.Any?>..kotlin.List<kotlin.Any?>?)>!
|
||||
public abstract override /*1*/ fun simple1(): kotlin.(Mutable)List<kotlin.String!>!
|
||||
public abstract override /*1*/ fun simple2(): kotlin.(Mutable)List<kotlin.(Mutable)List<kotlin.String!>!>!
|
||||
public abstract override /*1*/ fun simple3(): (kotlin.MutableList<out kotlin.Any?>..kotlin.List<kotlin.Any?>?)
|
||||
public abstract override /*1*/ fun wildcard(): (kotlin.MutableList<out kotlin.Any?>..kotlin.List<kotlin.Any?>?)
|
||||
public abstract override /*1*/ fun simple3(): kotlin.(Mutable)List<*>!
|
||||
public abstract override /*1*/ fun wildcard(): kotlin.(Mutable)List<*>!
|
||||
}
|
||||
|
||||
public trait Super {
|
||||
public abstract fun array1(): kotlin.Array<(out) (kotlin.MutableList<out kotlin.Any?>..kotlin.List<kotlin.Any?>?)>!
|
||||
public abstract fun array1(): kotlin.Array<(out) kotlin.(Mutable)List<*>!>!
|
||||
public abstract fun array2(): kotlin.Array<(out) kotlin.(Mutable)List<kotlin.String!>!>!
|
||||
public abstract fun boundWildcard1(): (kotlin.MutableList<out (kotlin.MutableList<out kotlin.Any?>..kotlin.List<kotlin.Any?>?)>..kotlin.List<(kotlin.MutableList<out kotlin.Any?>..kotlin.List<kotlin.Any?>?)>?)
|
||||
public abstract fun boundWildcard2(): kotlin.(Mutable)List<in kotlin.(Mutable)List<kotlin.String!>!>!
|
||||
public abstract fun simple1(): (kotlin.MutableList<out kotlin.Any?>..kotlin.List<kotlin.Any?>?)
|
||||
public abstract fun simple2(): (kotlin.MutableList<out kotlin.Any?>..kotlin.List<kotlin.Any?>?)
|
||||
public abstract fun simple1(): kotlin.(Mutable)List<*>!
|
||||
public abstract fun simple2(): kotlin.(Mutable)List<*>!
|
||||
public abstract fun simple3(): kotlin.(Mutable)List<kotlin.String!>!
|
||||
public abstract fun wildcard(): (kotlin.MutableList<out kotlin.Any?>..kotlin.List<kotlin.Any?>?)
|
||||
public abstract fun wildcard(): kotlin.(Mutable)List<*>!
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package test
|
||||
|
||||
public final class UnboundWildcard {
|
||||
/*primary*/ public constructor UnboundWildcard()
|
||||
public final fun foo(): test.UnboundWildcard.MyClass<out kotlin.CharSequence?>?
|
||||
public final fun foo(): test.UnboundWildcard.MyClass<*>?
|
||||
|
||||
public trait MyClass</*0*/ T : kotlin.CharSequence?> {
|
||||
}
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ package test
|
||||
|
||||
public final class StarProjection {
|
||||
/*primary*/ public constructor StarProjection()
|
||||
public final fun foo(): test.StarProjection.MyClass<out kotlin.CharSequence?>
|
||||
public final fun foo(): test.StarProjection.MyClass<*>
|
||||
|
||||
public trait MyClass</*0*/ T : kotlin.CharSequence?> {
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ internal final class C : java.util.ArrayList<kotlin.String> {
|
||||
public open override /*1*/ /*fake_override*/ fun add(/*0*/ e: kotlin.String!): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun addAll(/*0*/ c: (kotlin.MutableCollection<out kotlin.String!>..kotlin.Collection<kotlin.String!>?)): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun addAll(/*0*/ index: kotlin.Int, /*1*/ c: (kotlin.MutableCollection<out kotlin.String!>..kotlin.Collection<kotlin.String!>?)): kotlin.Boolean
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun batchRemove(/*0*/ p0: (kotlin.MutableCollection<out kotlin.Any?>..kotlin.Collection<kotlin.Any?>?), /*1*/ p1: kotlin.Boolean): kotlin.Boolean
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun batchRemove(/*0*/ p0: kotlin.(Mutable)Collection<*>!, /*1*/ p1: kotlin.Boolean): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun clear(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun clone(): kotlin.Any!
|
||||
public open override /*1*/ /*fake_override*/ fun contains(/*0*/ o: kotlin.Any!): kotlin.Boolean
|
||||
@@ -32,9 +32,9 @@ internal final class C : java.util.ArrayList<kotlin.String> {
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun readObject(/*0*/ p0: java.io.ObjectInputStream!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun remove(/*0*/ o: kotlin.Any!): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun remove(/*0*/ index: kotlin.Int): kotlin.String!
|
||||
public open override /*1*/ /*fake_override*/ fun removeAll(/*0*/ c: (kotlin.MutableCollection<out kotlin.Any?>..kotlin.Collection<kotlin.Any?>?)): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun removeAll(/*0*/ c: kotlin.(Mutable)Collection<*>!): kotlin.Boolean
|
||||
protected/*protected and package*/ open override /*1*/ /*fake_override*/ fun removeRange(/*0*/ p0: kotlin.Int, /*1*/ p1: kotlin.Int): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun retainAll(/*0*/ c: (kotlin.MutableCollection<out kotlin.Any?>..kotlin.Collection<kotlin.Any?>?)): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun retainAll(/*0*/ c: kotlin.(Mutable)Collection<*>!): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun set(/*0*/ index: kotlin.Int, /*1*/ element: kotlin.String!): kotlin.String!
|
||||
public open override /*1*/ /*fake_override*/ fun size(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun subList(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.(Mutable)List<kotlin.String!>!
|
||||
|
||||
@@ -9,7 +9,7 @@ internal final class C : java.util.ArrayList<kotlin.String?> {
|
||||
public open override /*1*/ /*fake_override*/ fun add(/*0*/ e: kotlin.String?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun addAll(/*0*/ c: (kotlin.MutableCollection<out kotlin.String?>..kotlin.Collection<kotlin.String?>?)): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun addAll(/*0*/ index: kotlin.Int, /*1*/ c: (kotlin.MutableCollection<out kotlin.String?>..kotlin.Collection<kotlin.String?>?)): kotlin.Boolean
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun batchRemove(/*0*/ p0: (kotlin.MutableCollection<out kotlin.Any?>..kotlin.Collection<kotlin.Any?>?), /*1*/ p1: kotlin.Boolean): kotlin.Boolean
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun batchRemove(/*0*/ p0: kotlin.(Mutable)Collection<*>!, /*1*/ p1: kotlin.Boolean): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun clear(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun clone(): kotlin.Any!
|
||||
public open override /*1*/ /*fake_override*/ fun contains(/*0*/ o: kotlin.Any!): kotlin.Boolean
|
||||
@@ -32,9 +32,9 @@ internal final class C : java.util.ArrayList<kotlin.String?> {
|
||||
invisible_fake open override /*1*/ /*fake_override*/ fun readObject(/*0*/ p0: java.io.ObjectInputStream!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun remove(/*0*/ o: kotlin.Any!): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun remove(/*0*/ index: kotlin.Int): kotlin.String?
|
||||
public open override /*1*/ /*fake_override*/ fun removeAll(/*0*/ c: (kotlin.MutableCollection<out kotlin.Any?>..kotlin.Collection<kotlin.Any?>?)): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun removeAll(/*0*/ c: kotlin.(Mutable)Collection<*>!): kotlin.Boolean
|
||||
protected/*protected and package*/ open override /*1*/ /*fake_override*/ fun removeRange(/*0*/ p0: kotlin.Int, /*1*/ p1: kotlin.Int): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun retainAll(/*0*/ c: (kotlin.MutableCollection<out kotlin.Any?>..kotlin.Collection<kotlin.Any?>?)): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun retainAll(/*0*/ c: kotlin.(Mutable)Collection<*>!): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun set(/*0*/ index: kotlin.Int, /*1*/ element: kotlin.String?): kotlin.String?
|
||||
public open override /*1*/ /*fake_override*/ fun size(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun subList(/*0*/ fromIndex: kotlin.Int, /*1*/ toIndex: kotlin.Int): kotlin.(Mutable)List<kotlin.String?>!
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package test
|
||||
|
||||
internal val kotlin.Collection<kotlin.Any?>.anotherSize: kotlin.Int
|
||||
internal fun kotlin.Collection<kotlin.Any?>.<get-anotherSize>(): kotlin.Int
|
||||
internal val kotlin.Collection<*>.anotherSize: kotlin.Int
|
||||
internal fun kotlin.Collection<*>.<get-anotherSize>(): kotlin.Int
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
package test
|
||||
|
||||
internal fun listOfStar(): kotlin.List<kotlin.Any?>
|
||||
internal fun listOfStar(): kotlin.List<*>
|
||||
|
||||
@@ -5,7 +5,7 @@ public trait ReturnNotSubtype {
|
||||
public trait Sub : test.ReturnNotSubtype.Super<kotlin.Boolean!> {
|
||||
public abstract override /*1*/ fun _void(): kotlin.Boolean
|
||||
public abstract override /*1*/ fun array(): kotlin.Array<(out) java.lang.Void!>!
|
||||
public abstract override /*1*/ fun klass(): java.lang.Class<out kotlin.Any?>!
|
||||
public abstract override /*1*/ fun klass(): java.lang.Class<*>!
|
||||
public abstract override /*1*/ fun string1(): kotlin.Unit
|
||||
public abstract override /*1*/ fun string2(): kotlin.(Mutable)List<kotlin.Boolean!>!
|
||||
public abstract override /*1*/ fun t(): java.lang.Void!
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package test
|
||||
|
||||
public trait WrongNumberOfGenericParameters {
|
||||
public abstract fun o0(): test.WrongNumberOfGenericParameters.One<out kotlin.Any?>!
|
||||
public abstract fun o0(): test.WrongNumberOfGenericParameters.One<*>!
|
||||
public abstract fun o2(): test.WrongNumberOfGenericParameters.One<[ERROR : T]>!
|
||||
public abstract fun t1(): test.WrongNumberOfGenericParameters.Two<out kotlin.Any?, out kotlin.Any?>!
|
||||
public abstract fun t1(): test.WrongNumberOfGenericParameters.Two<*, *>!
|
||||
public abstract fun z(): test.WrongNumberOfGenericParameters.Zero!
|
||||
|
||||
public trait One</*0*/ T> {
|
||||
|
||||
@@ -6370,6 +6370,10 @@ public final class DebugProtoBuf {
|
||||
* <code>INV = 2;</code>
|
||||
*/
|
||||
INV(2, 2),
|
||||
/**
|
||||
* <code>STAR = 3;</code>
|
||||
*/
|
||||
STAR(3, 3),
|
||||
;
|
||||
|
||||
/**
|
||||
@@ -6384,6 +6388,10 @@ public final class DebugProtoBuf {
|
||||
* <code>INV = 2;</code>
|
||||
*/
|
||||
public static final int INV_VALUE = 2;
|
||||
/**
|
||||
* <code>STAR = 3;</code>
|
||||
*/
|
||||
public static final int STAR_VALUE = 3;
|
||||
|
||||
|
||||
public final int getNumber() { return value; }
|
||||
@@ -6393,6 +6401,7 @@ public final class DebugProtoBuf {
|
||||
case 0: return IN;
|
||||
case 1: return OUT;
|
||||
case 2: return INV;
|
||||
case 3: return STAR;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
@@ -17720,7 +17729,7 @@ public final class DebugProtoBuf {
|
||||
"HAR\020\001\022\t\n\005SHORT\020\002\022\007\n\003INT\020\003\022\010\n\004LONG\020\004\022\t\n\005F" +
|
||||
"LOAT\020\005\022\n\n\006DOUBLE\020\006\022\013\n\007BOOLEAN\020\007\022\n\n\006STRIN" +
|
||||
"G\020\010\022\t\n\005CLASS\020\t\022\010\n\004ENUM\020\n\022\016\n\nANNOTATION\020\013" +
|
||||
"\022\t\n\005ARRAY\020\014\"\365\004\n\004Type\022I\n\013constructor\030\001 \002(",
|
||||
"\022\t\n\005ARRAY\020\014\"\377\004\n\004Type\022I\n\013constructor\030\001 \002(",
|
||||
"\01324.org.jetbrains.kotlin.serialization.T" +
|
||||
"ype.Constructor\022C\n\010argument\030\002 \003(\01321.org." +
|
||||
"jetbrains.kotlin.serialization.Type.Argu" +
|
||||
@@ -17731,61 +17740,62 @@ public final class DebugProtoBuf {
|
||||
"kind\030\001 \001(\01629.org.jetbrains.kotlin.serial" +
|
||||
"ization.Type.Constructor.Kind:\005CLASS\022\n\n\002" +
|
||||
"id\030\002 \002(\005\"%\n\004Kind\022\t\n\005CLASS\020\000\022\022\n\016TYPE_PARA",
|
||||
"METER\020\001\032\301\001\n\010Argument\022U\n\nprojection\030\001 \001(\016" +
|
||||
"METER\020\001\032\313\001\n\010Argument\022U\n\nprojection\030\001 \001(\016" +
|
||||
"2<.org.jetbrains.kotlin.serialization.Ty" +
|
||||
"pe.Argument.Projection:\003INV\0226\n\004type\030\002 \002(" +
|
||||
"\0132(.org.jetbrains.kotlin.serialization.T" +
|
||||
"ype\"&\n\nProjection\022\006\n\002IN\020\000\022\007\n\003OUT\020\001\022\007\n\003IN" +
|
||||
"V\020\002\"\371\001\n\rTypeParameter\022\n\n\002id\030\001 \002(\005\022\014\n\004nam" +
|
||||
"e\030\002 \002(\005\022\026\n\007reified\030\003 \001(\010:\005false\022Q\n\010varia" +
|
||||
"nce\030\004 \001(\0162:.org.jetbrains.kotlin.seriali" +
|
||||
"zation.TypeParameter.Variance:\003INV\022=\n\013up" +
|
||||
"per_bound\030\005 \003(\0132(.org.jetbrains.kotlin.s",
|
||||
"erialization.Type\"$\n\010Variance\022\006\n\002IN\020\000\022\007\n" +
|
||||
"\003OUT\020\001\022\007\n\003INV\020\002\"\364\005\n\005Class\022\020\n\005flags\030\001 \001(\005" +
|
||||
":\0010\022\030\n\020extra_visibility\030\002 \001(\t\022\017\n\007fq_name" +
|
||||
"\030\003 \002(\005\022K\n\014class_object\030\004 \001(\01325.org.jetbr" +
|
||||
"ains.kotlin.serialization.Class.ClassObj" +
|
||||
"ect\022I\n\016type_parameter\030\005 \003(\01321.org.jetbra" +
|
||||
"ins.kotlin.serialization.TypeParameter\022;" +
|
||||
"\n\tsupertype\030\006 \003(\0132(.org.jetbrains.kotlin" +
|
||||
".serialization.Type\022\031\n\021nested_class_name" +
|
||||
"\030\007 \003(\005\022<\n\006member\030\013 \003(\0132,.org.jetbrains.k",
|
||||
"otlin.serialization.Callable\022\022\n\nenum_ent" +
|
||||
"ry\030\014 \003(\005\022Y\n\023primary_constructor\030\r \001(\0132<." +
|
||||
"org.jetbrains.kotlin.serialization.Class" +
|
||||
".PrimaryConstructor\032F\n\013ClassObject\0227\n\004da" +
|
||||
"ta\030\001 \001(\0132).org.jetbrains.kotlin.serializ" +
|
||||
"ation.Class\032P\n\022PrimaryConstructor\022:\n\004dat" +
|
||||
"a\030\001 \001(\0132,.org.jetbrains.kotlin.serializa" +
|
||||
"tion.Callable\"p\n\004Kind\022\t\n\005CLASS\020\000\022\t\n\005TRAI" +
|
||||
"T\020\001\022\016\n\nENUM_CLASS\020\002\022\016\n\nENUM_ENTRY\020\003\022\024\n\020A" +
|
||||
"NNOTATION_CLASS\020\004\022\n\n\006OBJECT\020\005\022\020\n\014CLASS_O",
|
||||
"BJECT\020\006*\005\010d\020\310\001\"N\n\007Package\022<\n\006member\030\001 \003(" +
|
||||
"\0132,.org.jetbrains.kotlin.serialization.C" +
|
||||
"allable*\005\010d\020\310\001\"\332\005\n\010Callable\022\r\n\005flags\030\001 \001" +
|
||||
"(\005\022\030\n\020extra_visibility\030\002 \001(\t\022\024\n\014getter_f" +
|
||||
"lags\030\t \001(\005\022\024\n\014setter_flags\030\n \001(\005\022I\n\016type" +
|
||||
"_parameter\030\004 \003(\01321.org.jetbrains.kotlin." +
|
||||
"serialization.TypeParameter\022?\n\rreceiver_" +
|
||||
"type\030\005 \001(\0132(.org.jetbrains.kotlin.serial" +
|
||||
"ization.Type\022\014\n\004name\030\006 \002(\005\022T\n\017value_para" +
|
||||
"meter\030\007 \003(\0132;.org.jetbrains.kotlin.seria",
|
||||
"lization.Callable.ValueParameter\022=\n\013retu" +
|
||||
"rn_type\030\010 \002(\0132(.org.jetbrains.kotlin.ser" +
|
||||
"ialization.Type\032\263\001\n\016ValueParameter\022\r\n\005fl" +
|
||||
"ags\030\001 \001(\005\022\014\n\004name\030\002 \002(\005\0226\n\004type\030\003 \002(\0132(." +
|
||||
"org.jetbrains.kotlin.serialization.Type\022" +
|
||||
"E\n\023vararg_element_type\030\004 \001(\0132(.org.jetbr" +
|
||||
"ains.kotlin.serialization.Type*\005\010d\020\310\001\"Q\n" +
|
||||
"\nMemberKind\022\017\n\013DECLARATION\020\000\022\021\n\rFAKE_OVE" +
|
||||
"RRIDE\020\001\022\016\n\nDELEGATION\020\002\022\017\n\013SYNTHESIZED\020\003" +
|
||||
"\":\n\014CallableKind\022\007\n\003FUN\020\000\022\007\n\003VAL\020\001\022\007\n\003VA",
|
||||
"R\020\002\022\017\n\013CONSTRUCTOR\020\003*\005\010d\020\310\001*-\n\010Modality\022" +
|
||||
"\t\n\005FINAL\020\000\022\010\n\004OPEN\020\001\022\014\n\010ABSTRACT\020\002*b\n\nVi" +
|
||||
"sibility\022\014\n\010INTERNAL\020\000\022\013\n\007PRIVATE\020\001\022\r\n\tP" +
|
||||
"ROTECTED\020\002\022\n\n\006PUBLIC\020\003\022\023\n\017PRIVATE_TO_THI" +
|
||||
"S\020\004\022\t\n\005EXTRA\020\005B\022B\rDebugProtoBuf\210\001\000"
|
||||
"ype\"0\n\nProjection\022\006\n\002IN\020\000\022\007\n\003OUT\020\001\022\007\n\003IN" +
|
||||
"V\020\002\022\010\n\004STAR\020\003\"\371\001\n\rTypeParameter\022\n\n\002id\030\001 " +
|
||||
"\002(\005\022\014\n\004name\030\002 \002(\005\022\026\n\007reified\030\003 \001(\010:\005fals" +
|
||||
"e\022Q\n\010variance\030\004 \001(\0162:.org.jetbrains.kotl" +
|
||||
"in.serialization.TypeParameter.Variance:" +
|
||||
"\003INV\022=\n\013upper_bound\030\005 \003(\0132(.org.jetbrain",
|
||||
"s.kotlin.serialization.Type\"$\n\010Variance\022" +
|
||||
"\006\n\002IN\020\000\022\007\n\003OUT\020\001\022\007\n\003INV\020\002\"\364\005\n\005Class\022\020\n\005f" +
|
||||
"lags\030\001 \001(\005:\0010\022\030\n\020extra_visibility\030\002 \001(\t\022" +
|
||||
"\017\n\007fq_name\030\003 \002(\005\022K\n\014class_object\030\004 \001(\01325" +
|
||||
".org.jetbrains.kotlin.serialization.Clas" +
|
||||
"s.ClassObject\022I\n\016type_parameter\030\005 \003(\01321." +
|
||||
"org.jetbrains.kotlin.serialization.TypeP" +
|
||||
"arameter\022;\n\tsupertype\030\006 \003(\0132(.org.jetbra" +
|
||||
"ins.kotlin.serialization.Type\022\031\n\021nested_" +
|
||||
"class_name\030\007 \003(\005\022<\n\006member\030\013 \003(\0132,.org.j",
|
||||
"etbrains.kotlin.serialization.Callable\022\022" +
|
||||
"\n\nenum_entry\030\014 \003(\005\022Y\n\023primary_constructo" +
|
||||
"r\030\r \001(\0132<.org.jetbrains.kotlin.serializa" +
|
||||
"tion.Class.PrimaryConstructor\032F\n\013ClassOb" +
|
||||
"ject\0227\n\004data\030\001 \001(\0132).org.jetbrains.kotli" +
|
||||
"n.serialization.Class\032P\n\022PrimaryConstruc" +
|
||||
"tor\022:\n\004data\030\001 \001(\0132,.org.jetbrains.kotlin" +
|
||||
".serialization.Callable\"p\n\004Kind\022\t\n\005CLASS" +
|
||||
"\020\000\022\t\n\005TRAIT\020\001\022\016\n\nENUM_CLASS\020\002\022\016\n\nENUM_EN" +
|
||||
"TRY\020\003\022\024\n\020ANNOTATION_CLASS\020\004\022\n\n\006OBJECT\020\005\022",
|
||||
"\020\n\014CLASS_OBJECT\020\006*\005\010d\020\310\001\"N\n\007Package\022<\n\006m" +
|
||||
"ember\030\001 \003(\0132,.org.jetbrains.kotlin.seria" +
|
||||
"lization.Callable*\005\010d\020\310\001\"\332\005\n\010Callable\022\r\n" +
|
||||
"\005flags\030\001 \001(\005\022\030\n\020extra_visibility\030\002 \001(\t\022\024" +
|
||||
"\n\014getter_flags\030\t \001(\005\022\024\n\014setter_flags\030\n \001" +
|
||||
"(\005\022I\n\016type_parameter\030\004 \003(\01321.org.jetbrai" +
|
||||
"ns.kotlin.serialization.TypeParameter\022?\n" +
|
||||
"\rreceiver_type\030\005 \001(\0132(.org.jetbrains.kot" +
|
||||
"lin.serialization.Type\022\014\n\004name\030\006 \002(\005\022T\n\017" +
|
||||
"value_parameter\030\007 \003(\0132;.org.jetbrains.ko",
|
||||
"tlin.serialization.Callable.ValueParamet" +
|
||||
"er\022=\n\013return_type\030\010 \002(\0132(.org.jetbrains." +
|
||||
"kotlin.serialization.Type\032\263\001\n\016ValueParam" +
|
||||
"eter\022\r\n\005flags\030\001 \001(\005\022\014\n\004name\030\002 \002(\005\0226\n\004typ" +
|
||||
"e\030\003 \002(\0132(.org.jetbrains.kotlin.serializa" +
|
||||
"tion.Type\022E\n\023vararg_element_type\030\004 \001(\0132(" +
|
||||
".org.jetbrains.kotlin.serialization.Type" +
|
||||
"*\005\010d\020\310\001\"Q\n\nMemberKind\022\017\n\013DECLARATION\020\000\022\021" +
|
||||
"\n\rFAKE_OVERRIDE\020\001\022\016\n\nDELEGATION\020\002\022\017\n\013SYN" +
|
||||
"THESIZED\020\003\":\n\014CallableKind\022\007\n\003FUN\020\000\022\007\n\003V",
|
||||
"AL\020\001\022\007\n\003VAR\020\002\022\017\n\013CONSTRUCTOR\020\003*\005\010d\020\310\001*-\n" +
|
||||
"\010Modality\022\t\n\005FINAL\020\000\022\010\n\004OPEN\020\001\022\014\n\010ABSTRA" +
|
||||
"CT\020\002*b\n\nVisibility\022\014\n\010INTERNAL\020\000\022\013\n\007PRIV" +
|
||||
"ATE\020\001\022\r\n\tPROTECTED\020\002\022\n\n\006PUBLIC\020\003\022\023\n\017PRIV" +
|
||||
"ATE_TO_THIS\020\004\022\t\n\005EXTRA\020\005B\022B\rDebugProtoBu" +
|
||||
"f\210\001\000"
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
|
||||
|
||||
@@ -116,6 +116,7 @@ message Type {
|
||||
IN = 0;
|
||||
OUT = 1;
|
||||
INV = 2;
|
||||
STAR = 3;
|
||||
}
|
||||
|
||||
optional Projection projection = 1 [default = INV];
|
||||
|
||||
+10
-4
@@ -373,11 +373,17 @@ public class DescriptorSerializer {
|
||||
@NotNull
|
||||
private ProtoBuf.Type.Argument.Builder typeArgument(@NotNull TypeProjection typeProjection) {
|
||||
ProtoBuf.Type.Argument.Builder builder = ProtoBuf.Type.Argument.newBuilder();
|
||||
ProtoBuf.Type.Argument.Projection projection = projection(typeProjection.getProjectionKind());
|
||||
|
||||
// to avoid storing a default
|
||||
if (projection != ProtoBuf.Type.Argument.Projection.INV) {
|
||||
builder.setProjection(projection);
|
||||
if (typeProjection.isStarProjection()) {
|
||||
builder.setProjection(ProtoBuf.Type.Argument.Projection.STAR);
|
||||
}
|
||||
else {
|
||||
ProtoBuf.Type.Argument.Projection projection = projection(typeProjection.getProjectionKind());
|
||||
|
||||
// to avoid storing a default
|
||||
if (projection != ProtoBuf.Type.Argument.Projection.INV) {
|
||||
builder.setProjection(projection);
|
||||
}
|
||||
}
|
||||
|
||||
builder.setType(type(typeProjection.getType()));
|
||||
|
||||
@@ -5121,6 +5121,10 @@ public final class ProtoBuf {
|
||||
* <code>INV = 2;</code>
|
||||
*/
|
||||
INV(2, 2),
|
||||
/**
|
||||
* <code>STAR = 3;</code>
|
||||
*/
|
||||
STAR(3, 3),
|
||||
;
|
||||
|
||||
/**
|
||||
@@ -5135,6 +5139,10 @@ public final class ProtoBuf {
|
||||
* <code>INV = 2;</code>
|
||||
*/
|
||||
public static final int INV_VALUE = 2;
|
||||
/**
|
||||
* <code>STAR = 3;</code>
|
||||
*/
|
||||
public static final int STAR_VALUE = 3;
|
||||
|
||||
|
||||
public final int getNumber() { return value; }
|
||||
@@ -5144,6 +5152,7 @@ public final class ProtoBuf {
|
||||
case 0: return IN;
|
||||
case 1: return OUT;
|
||||
case 2: return INV;
|
||||
case 3: return STAR;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -95,7 +95,10 @@ public class TypeDeserializer(
|
||||
|
||||
fun typeArguments(protos: List<ProtoBuf.Type.Argument>): List<TypeProjection> =
|
||||
protos.map { proto ->
|
||||
TypeProjectionImpl(variance(proto.getProjection()), type(proto.getType()))
|
||||
val type = type(proto.getType())
|
||||
if (proto.getProjection() == ProtoBuf.Type.Argument.Projection.STAR)
|
||||
StarProjectionImpl(type)
|
||||
else TypeProjectionImpl(variance(proto.getProjection()), type)
|
||||
}.toReadOnlyList()
|
||||
|
||||
override fun toString() = debugName + (if (parent == null) "" else ". Child of ${parent.debugName}")
|
||||
|
||||
+1
@@ -66,4 +66,5 @@ fun variance(variance: ProtoBuf.Type.Argument.Projection) = when (variance) {
|
||||
ProtoBuf.Type.Argument.Projection.IN -> Variance.IN_VARIANCE
|
||||
ProtoBuf.Type.Argument.Projection.OUT -> Variance.OUT_VARIANCE
|
||||
ProtoBuf.Type.Argument.Projection.INV -> Variance.INVARIANT
|
||||
else -> throw IllegalArgumentException("Only IN, OUT and INV are supported. Actual argument: $variance")
|
||||
}
|
||||
|
||||
+6
-3
@@ -97,9 +97,11 @@ class TypeClsStubBuilder(private val c: ClsStubBuilderContext) {
|
||||
typeArgumentProtoList.forEach { typeArgumentProto ->
|
||||
val projectionKind = typeArgumentProto.getProjection().toProjectionKind()
|
||||
val typeProjection = KotlinTypeProjectionStubImpl(typeArgumentsListStub, projectionKind.ordinal())
|
||||
val modifierKeywordToken = projectionKind.getToken() as? JetModifierKeywordToken
|
||||
createModifierListStub(typeProjection, modifierKeywordToken.singletonOrEmptyList())
|
||||
createTypeReferenceStub(typeProjection, typeArgumentProto.getType())
|
||||
if (projectionKind != JetProjectionKind.STAR) {
|
||||
val modifierKeywordToken = projectionKind.getToken() as? JetModifierKeywordToken
|
||||
createModifierListStub(typeProjection, modifierKeywordToken.singletonOrEmptyList())
|
||||
createTypeReferenceStub(typeProjection, typeArgumentProto.getType())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,6 +109,7 @@ class TypeClsStubBuilder(private val c: ClsStubBuilderContext) {
|
||||
Projection.IN -> JetProjectionKind.IN
|
||||
Projection.OUT -> JetProjectionKind.OUT
|
||||
Projection.INV -> JetProjectionKind.NONE
|
||||
Projection.STAR -> JetProjectionKind.STAR
|
||||
}
|
||||
|
||||
private fun createFunctionTypeStub(parent: StubElement<out PsiElement>, type: Type, isExtensionFunctionType: Boolean) {
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
PsiJetFileStubImpl[package=]
|
||||
PACKAGE_DIRECTIVE:
|
||||
PROPERTY:[fqName=v, hasDelegate=false, hasDelegateExpression=false, hasInitializer=false, hasReceiverTypeRef=false, hasReturnTypeRef=true, isProbablyNothingType=false, isTopLevel=true, isVar=false, name=v]
|
||||
TYPE_REFERENCE:
|
||||
USER_TYPE:[isAbsoluteInRootPackage=false]
|
||||
REFERENCE_EXPRESSION:[referencedName=Foo]
|
||||
TYPE_ARGUMENT_LIST:
|
||||
TYPE_PROJECTION:[projectionKind=STAR]
|
||||
@@ -0,0 +1 @@
|
||||
val v: Foo<*>
|
||||
@@ -221,4 +221,10 @@ public class StubBuilderTestGenerated extends AbstractStubBuilderTest {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/stubs/SimpleEnumBuild.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("StarProjection.kt")
|
||||
public void testStarProjection() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/stubs/StarProjection.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user