FIR: Add test for constructor
This commit is contained in:
@@ -0,0 +1,7 @@
|
|||||||
|
class C {
|
||||||
|
|
||||||
|
fun create() = C()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo() = C()
|
||||||
|
fun bar() = foo().create()
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
FILE: constructor.kt
|
||||||
|
public final class C {
|
||||||
|
public constructor(): super<R|kotlin/Any|>()
|
||||||
|
|
||||||
|
public final fun create(): R|C| {
|
||||||
|
^create R|/C.C|()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
public final fun foo(): R|C| {
|
||||||
|
^foo R|/C.C|()
|
||||||
|
}
|
||||||
|
public final fun bar(): R|C| {
|
||||||
|
^bar R|/foo|().R|/C.create|()
|
||||||
|
}
|
||||||
+5
@@ -159,6 +159,11 @@ public class FirResolveTestCaseGenerated extends AbstractFirResolveTestCase {
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/fir/resolve/testData/resolve/expresssions"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/fir/resolve/testData/resolve/expresssions"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("constructor.kt")
|
||||||
|
public void testConstructor() throws Exception {
|
||||||
|
runTest("compiler/fir/resolve/testData/resolve/expresssions/constructor.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("dispatchReceiver.kt")
|
@TestMetadata("dispatchReceiver.kt")
|
||||||
public void testDispatchReceiver() throws Exception {
|
public void testDispatchReceiver() throws Exception {
|
||||||
runTest("compiler/fir/resolve/testData/resolve/expresssions/dispatchReceiver.kt");
|
runTest("compiler/fir/resolve/testData/resolve/expresssions/dispatchReceiver.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user