[FIR-TEST] Add test with SAM conversion in constructor call
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
// FILE: Condition.java
|
||||
|
||||
public interface Condition {
|
||||
boolean value(boolean t);
|
||||
}
|
||||
|
||||
// FILE: Foo.java
|
||||
|
||||
public class Foo {
|
||||
public Foo(Condition filter) {}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
fun test() {
|
||||
<!INAPPLICABLE_CANDIDATE!>Foo<!> { <!UNRESOLVED_REFERENCE!>it<!> }
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
FILE: main.kt
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
<Inapplicable(INAPPLICABLE): [/Foo.Foo]>#(<L> = Foo@fun <anonymous>(): <ERROR TYPE REF: Unresolved name: it> {
|
||||
<Unresolved name: it>#
|
||||
}
|
||||
)
|
||||
}
|
||||
+5
@@ -913,6 +913,11 @@ public class FirDiagnosticsTestGenerated extends AbstractFirDiagnosticsTest {
|
||||
runTest("compiler/fir/resolve/testData/resolve/problems/receiverWithCapturedType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("samConversionInConstructorCall.kt")
|
||||
public void testSamConversionInConstructorCall() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/problems/samConversionInConstructorCall.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("syntheticsVsNormalProperties.kt")
|
||||
public void testSyntheticsVsNormalProperties() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/problems/syntheticsVsNormalProperties.kt");
|
||||
|
||||
Reference in New Issue
Block a user