[FIR TEST] Add test for unresolved reference in default argument
See KT-36905
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
fun test(
|
||||
val f: String.() -> Int = { <!UNRESOLVED_REFERENCE!>length<!> }
|
||||
): Int {
|
||||
return "".f()
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
FILE: extensionLambdaInDefaultArgument.kt
|
||||
public final fun test(f: R|kotlin/String.() -> kotlin/Int| = fun R|kotlin/String|.<anonymous>(): R|ERROR CLASS: Unresolved name: length| {
|
||||
^ <Unresolved name: length>#
|
||||
}
|
||||
): R|kotlin/Int| {
|
||||
^test R|<local>/f|.R|FakeOverride<kotlin/Function1.invoke: R|kotlin/Int|>|(String())
|
||||
}
|
||||
+5
@@ -1299,6 +1299,11 @@ public class FirDiagnosticsTestGenerated extends AbstractFirDiagnosticsTest {
|
||||
runTest("compiler/fir/resolve/testData/resolve/problems/definitelyNotNullAndOriginalType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionLambdaInDefaultArgument.kt")
|
||||
public void testExtensionLambdaInDefaultArgument() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/problems/extensionLambdaInDefaultArgument.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("javaAccessorConversion.kt")
|
||||
public void testJavaAccessorConversion() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/problems/javaAccessorConversion.kt");
|
||||
|
||||
Generated
+5
@@ -1299,6 +1299,11 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos
|
||||
runTest("compiler/fir/resolve/testData/resolve/problems/definitelyNotNullAndOriginalType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionLambdaInDefaultArgument.kt")
|
||||
public void testExtensionLambdaInDefaultArgument() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/problems/extensionLambdaInDefaultArgument.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("javaAccessorConversion.kt")
|
||||
public void testJavaAccessorConversion() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/problems/javaAccessorConversion.kt");
|
||||
|
||||
Reference in New Issue
Block a user