[FIR TEST] Add test for erroneous callable reference resolve
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
class Your {
|
||||||
|
class Nested
|
||||||
|
}
|
||||||
|
|
||||||
|
class My {
|
||||||
|
fun foo() {
|
||||||
|
val x = ::Nested // Should be error
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun Your.foo() {
|
||||||
|
val x = ::Nested // Still should be error
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
FILE: errCallable.kt
|
||||||
|
public final class Your : R|kotlin/Any| {
|
||||||
|
public constructor(): R|Your| {
|
||||||
|
super<R|kotlin/Any|>()
|
||||||
|
}
|
||||||
|
|
||||||
|
public final class Nested : R|kotlin/Any| {
|
||||||
|
public constructor(): R|Your.Nested| {
|
||||||
|
super<R|kotlin/Any|>()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
public final class My : R|kotlin/Any| {
|
||||||
|
public constructor(): R|My| {
|
||||||
|
super<R|kotlin/Any|>()
|
||||||
|
}
|
||||||
|
|
||||||
|
public final fun foo(): R|kotlin/Unit| {
|
||||||
|
lval x: <ERROR TYPE REF: No result type for initializer> = ::Nested#
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
public final fun R|Your|.foo(): R|kotlin/Unit| {
|
||||||
|
lval x: <ERROR TYPE REF: No result type for initializer> = ::Nested#
|
||||||
|
}
|
||||||
+5
@@ -459,6 +459,11 @@ public class FirDiagnosticsTestGenerated extends AbstractFirDiagnosticsTest {
|
|||||||
runTest("compiler/fir/resolve/testData/resolve/expresssions/enumValues.kt");
|
runTest("compiler/fir/resolve/testData/resolve/expresssions/enumValues.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("errCallable.kt")
|
||||||
|
public void testErrCallable() throws Exception {
|
||||||
|
runTest("compiler/fir/resolve/testData/resolve/expresssions/errCallable.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("extensionPropertyInLambda.kt")
|
@TestMetadata("extensionPropertyInLambda.kt")
|
||||||
public void testExtensionPropertyInLambda() throws Exception {
|
public void testExtensionPropertyInLambda() throws Exception {
|
||||||
runTest("compiler/fir/resolve/testData/resolve/expresssions/extensionPropertyInLambda.kt");
|
runTest("compiler/fir/resolve/testData/resolve/expresssions/extensionPropertyInLambda.kt");
|
||||||
|
|||||||
Generated
+5
@@ -459,6 +459,11 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos
|
|||||||
runTest("compiler/fir/resolve/testData/resolve/expresssions/enumValues.kt");
|
runTest("compiler/fir/resolve/testData/resolve/expresssions/enumValues.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("errCallable.kt")
|
||||||
|
public void testErrCallable() throws Exception {
|
||||||
|
runTest("compiler/fir/resolve/testData/resolve/expresssions/errCallable.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("extensionPropertyInLambda.kt")
|
@TestMetadata("extensionPropertyInLambda.kt")
|
||||||
public void testExtensionPropertyInLambda() throws Exception {
|
public void testExtensionPropertyInLambda() throws Exception {
|
||||||
runTest("compiler/fir/resolve/testData/resolve/expresssions/extensionPropertyInLambda.kt");
|
runTest("compiler/fir/resolve/testData/resolve/expresssions/extensionPropertyInLambda.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user