FIR: Add test for KT-37478
^KT-37478 Fixed
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
class A
|
||||
|
||||
class B {
|
||||
val memberVal: A = A()
|
||||
fun memberFun(): A = A()
|
||||
}
|
||||
|
||||
val B.extensionVal: A
|
||||
get() = A()
|
||||
|
||||
fun B.extensionFun(): A = A()
|
||||
|
||||
fun test_1() {
|
||||
val extensionValRef = B::extensionVal
|
||||
val extensionFunRef = B::extensionFun
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
FILE: extensionCallableReferences.kt
|
||||
public final class A : R|kotlin/Any| {
|
||||
public constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final class B : R|kotlin/Any| {
|
||||
public constructor(): R|B| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val memberVal: R|A| = R|/A.A|()
|
||||
public get(): R|A|
|
||||
|
||||
public final fun memberFun(): R|A| {
|
||||
^memberFun R|/A.A|()
|
||||
}
|
||||
|
||||
}
|
||||
public final val R|B|.extensionVal: R|A|
|
||||
public get(): R|A| {
|
||||
^ R|/A.A|()
|
||||
}
|
||||
public final fun R|B|.extensionFun(): R|A| {
|
||||
^extensionFun R|/A.A|()
|
||||
}
|
||||
public final fun test_1(): R|kotlin/Unit| {
|
||||
lval extensionValRef: R|kotlin/reflect/KProperty1<B, A>| = Q|B|::R|/extensionVal|
|
||||
lval extensionFunRef: R|kotlin/reflect/KFunction1<B, A>| = Q|B|::R|/extensionFun|
|
||||
}
|
||||
+5
@@ -1235,6 +1235,11 @@ public class FirDiagnosticsTestGenerated extends AbstractFirDiagnosticsTest {
|
||||
runTest("compiler/fir/resolve/testData/resolve/inference/definitelyNotNullIntersectionType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionCallableReferences.kt")
|
||||
public void testExtensionCallableReferences() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/inference/extensionCallableReferences.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lambdaAsReturnStatementOfLambda.kt")
|
||||
public void testLambdaAsReturnStatementOfLambda() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/inference/lambdaAsReturnStatementOfLambda.kt");
|
||||
|
||||
Generated
+5
@@ -1235,6 +1235,11 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos
|
||||
runTest("compiler/fir/resolve/testData/resolve/inference/definitelyNotNullIntersectionType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("extensionCallableReferences.kt")
|
||||
public void testExtensionCallableReferences() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/inference/extensionCallableReferences.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("lambdaAsReturnStatementOfLambda.kt")
|
||||
public void testLambdaAsReturnStatementOfLambda() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/inference/lambdaAsReturnStatementOfLambda.kt");
|
||||
|
||||
Reference in New Issue
Block a user