[AA FIR] add tests on implicit type in delegated scope
^KT-58727
This commit is contained in:
committed by
Space Team
parent
6a8981372b
commit
4472e1ae4e
+3
@@ -0,0 +1,3 @@
|
||||
public final class ClassWithGenericBase /* test.ClassWithGenericBase*/ extends test.Base<test.Foo> {
|
||||
public ClassWithGenericBase();// .ctor()
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// test.ClassWithGenericBase
|
||||
|
||||
package test
|
||||
|
||||
class Foo
|
||||
|
||||
abstract class Base<T> {
|
||||
fun noGeneric() = 42
|
||||
fun noGenericWithExplicitType(): Int = 24
|
||||
fun withOuterGeneric(t: T) = "str"
|
||||
fun withOuterGenericWithExplicitType(t: T): String = "rts"
|
||||
fun <TT> withOwnGeneric(tt: TT) = true
|
||||
fun <TT> withOwnGenericWithExplicitType(tt: TT): Boolean = false
|
||||
fun <TT> withOuterAndOwnGeneric(t: T, tt: TT) = 4L
|
||||
fun <TT> withOuterAndOwnGenericWithExplicitType(t: T, tt: TT): Long = 1L
|
||||
}
|
||||
|
||||
class ClassWithGenericBase : Base<Foo>()
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
public final class A /* one.A*/ implements one.I {
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
private final one.I p;
|
||||
|
||||
public A(@org.jetbrains.annotations.NotNull() one.I);// .ctor(one.I)
|
||||
|
||||
public int bar();// bar()
|
||||
|
||||
public int foo();// foo()
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
public final class A /* one.A*/ implements one.I {
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
private final one.I p;
|
||||
|
||||
@java.lang.Override()
|
||||
public error.NonExistentClass foo();// foo()
|
||||
|
||||
@java.lang.Override()
|
||||
public int bar();// bar()
|
||||
|
||||
public A(@org.jetbrains.annotations.NotNull() one.I);// .ctor(one.I)
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// one.A
|
||||
|
||||
package one
|
||||
|
||||
interface I {
|
||||
fun foo() = 4
|
||||
fun bar(): Int = 42
|
||||
}
|
||||
|
||||
class A(
|
||||
private val p: I
|
||||
) : I by p
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
public final class A /* one.A*/ implements one.I {
|
||||
@org.jetbrains.annotations.NotNull()
|
||||
private final one.I p;
|
||||
|
||||
public A(@org.jetbrains.annotations.NotNull() one.I);// .ctor(one.I)
|
||||
|
||||
public int bar();// bar()
|
||||
|
||||
public int foo();// foo()
|
||||
}
|
||||
+10
@@ -244,6 +244,11 @@ public class CompilerLightClassTestGenerated extends AbstractCompilerLightClassT
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByFqName/StubOrderForOverloads.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("SubstitutionOverride.kt")
|
||||
public void testSubstitutionOverride() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByFqName/SubstitutionOverride.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("Throws.kt")
|
||||
public void testThrows() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByFqName/Throws.kt");
|
||||
@@ -403,6 +408,11 @@ public class CompilerLightClassTestGenerated extends AbstractCompilerLightClassT
|
||||
public void testProperty() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByFqName/delegation/Property.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("WithImplicitType.kt")
|
||||
public void testWithImplicitType() throws Exception {
|
||||
runTest("compiler/testData/asJava/lightClasses/lightClassByFqName/delegation/WithImplicitType.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/asJava/lightClasses/lightClassByFqName/facades")
|
||||
|
||||
Reference in New Issue
Block a user