[FIR-TEST] Add test with SAM conversion in constructor call

This commit is contained in:
Dmitriy Novozhilov
2019-11-27 18:00:58 +03:00
parent 71acd42727
commit 5190ff9733
3 changed files with 29 additions and 0 deletions
@@ -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<!> }
}
@@ -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>#
}
)
}
@@ -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");