Find Nothing only in own arguments of generic type to make type raw and generate ''?" for contravariant position instead of use raw type

This commit is contained in:
Zalim Bashorov
2015-12-07 16:20:06 +03:00
parent fa77808319
commit 1e0b133e19
3 changed files with 47 additions and 23 deletions
+10 -3
View File
@@ -1,6 +1,13 @@
class C<T>
fun f(p: Nothing?, p1: C<Nothing?>, p2: C<C<Nothing?>>, p3: C<C<Nothing?>>?): Nothing? = throw Exception()
class I<in A, B>
class Z<A, B>
fun f(
p: Nothing?, p1: C<Nothing?>, p2: C<C<Nothing?>>, p3: C<C<Nothing?>>?,
p4: I<Nothing?, Int>, p5: C<I<Nothing?, String>>, p6: C<in Nothing?>,
p7: Z<Nothing?, String>, p8: Z<String, in Nothing?>, p9: I<Nothing?, Nothing>
): Nothing? = throw Exception()
// method: NullableNothingKt::f
// jvm signature: (Ljava/lang/Void;LC;LC;LC;)Ljava/lang/Void;
// generic signature: null
// jvm signature: (Ljava/lang/Void;LC;LC;LC;LI;LC;LC;LZ;LZ;LI;)Ljava/lang/Void;
// generic signature: (Ljava/lang/Void;LC;LC<LC;>;LC<LC;>;LI;LC<LI;>;LC;LZ;LZ;LI;)Ljava/lang/Void;