Add tests for type enhancement uncluding with compiled java

This commit is contained in:
Victor Petukhov
2020-12-09 15:37:22 +03:00
parent 71ca18e937
commit 9693ea19fb
33 changed files with 639 additions and 58 deletions
@@ -1,4 +1,4 @@
// !LANGUAGE:
// !LANGUAGE: -ImprovementsAroundTypeEnhancement
package test;
@@ -0,0 +1,14 @@
package test
public open class Basic_DisabledImprovements {
public constructor Basic_DisabledImprovements()
public/*package*/ open fun </*0*/ R : kotlin.Any!, /*1*/ @org.jetbrains.annotations.NotNull _A : R!, /*2*/ @org.jetbrains.annotations.Nullable K : kotlin.Any!> foo(/*0*/ r: R!): kotlin.Unit
public interface G</*0*/ @org.jetbrains.annotations.NotNull T : kotlin.Any!> {
public abstract fun </*0*/ @org.jetbrains.annotations.NotNull R : kotlin.Any!> foo(/*0*/ r: R!): kotlin.Unit
}
public interface G1</*0*/ T : kotlin.Any!, /*1*/ E : T!, /*2*/ @org.jetbrains.annotations.NotNull X : kotlin.Any!> {
public abstract fun </*0*/ R : kotlin.Any!, /*1*/ @org.jetbrains.annotations.Nullable _A : R!> foo(/*0*/ r: R!): kotlin.Unit
}
}
@@ -5,15 +5,14 @@ package test;
import org.jetbrains.annotations.*;
public class Basic {
interface G<T> {
}
public class Basic<T extends @NotNull Object> implements G2<@NotNull T, @NotNull String> {
interface G<T> { }
interface G2<A, B> {
}
interface G2<A, B> { }
public interface MyClass<TT> {
void f(G<@NotNull String> p);
void f(G2<@Nullable String, @NotNull Integer> p);
void f1(G<@NotNull String> p);
G2<@Nullable String, @NotNull Integer> f2();
<T extends @NotNull Object> void f3(@NotNull T x) { };
}
}
@@ -1,7 +1,7 @@
package test
public open class Basic {
public constructor Basic()
public open class Basic</*0*/ T : @org.jetbrains.annotations.NotNull kotlin.Any> : G2 {
public constructor Basic</*0*/ T : @org.jetbrains.annotations.NotNull kotlin.Any>()
public/*package*/ interface G</*0*/ T : kotlin.Any!> {
}
@@ -10,7 +10,8 @@ public open class Basic {
}
public interface MyClass</*0*/ TT : kotlin.Any!> {
public abstract fun f(/*0*/ p: test.Basic.G2<@org.jetbrains.annotations.Nullable kotlin.String?, @org.jetbrains.annotations.NotNull kotlin.Int>!): kotlin.Unit
public abstract fun f(/*0*/ p: test.Basic.G<@org.jetbrains.annotations.NotNull kotlin.String>!): kotlin.Unit
public abstract fun f1(/*0*/ p: test.Basic.G<@org.jetbrains.annotations.NotNull kotlin.String>!): kotlin.Unit
public abstract fun f2(): test.Basic.G2<@org.jetbrains.annotations.Nullable kotlin.String?, @org.jetbrains.annotations.NotNull kotlin.Int>!
public abstract fun </*0*/ T : @org.jetbrains.annotations.NotNull kotlin.Any> f3(/*0*/ @org.jetbrains.annotations.NotNull x: @org.jetbrains.annotations.NotNull T): kotlin.Unit
}
}
@@ -26,7 +26,7 @@ public open class Basic_DisabledImprovements</*0*/ T : @org.jetbrains.annotation
public abstract fun f5(/*0*/ p: test.Basic_DisabledImprovements.G<*>!): kotlin.Unit
public abstract fun f6(/*0*/ p: test.Basic_DisabledImprovements.G<out @org.jetbrains.annotations.Nullable kotlin.Any?>!): kotlin.Unit
public abstract fun f7(/*0*/ p: test.Basic_DisabledImprovements.G<@org.jetbrains.annotations.NotNull test.Basic_DisabledImprovements.A.B<*, *>>!): kotlin.Unit
public abstract fun f8(): test.Basic_DisabledImprovements.G<test.Basic_DisabledImprovements.A.B<*, *>!>!
public abstract fun f81(): test.Basic_DisabledImprovements.G<test.Basic_DisabledImprovements.A.B<*, *>!>!
public abstract fun f9(): test.Basic_DisabledImprovements.G<@org.jetbrains.annotations.Nullable test.Basic_DisabledImprovements.A.B<*, *>?>!
}
}