[FIR] KT-56876: Ensure inner type classifiers are resolved in contracts
^KT-56876 Fixed
This commit is contained in:
committed by
Space Team
parent
c156dfe855
commit
5cbe699fc4
+6
@@ -525,6 +525,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
||||
runTest("compiler/testData/diagnostics/tests/kt56769.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt56876.kt")
|
||||
public void testKt56876() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/kt56876.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt56877.kt")
|
||||
public void testKt56877() throws Exception {
|
||||
|
||||
+6
@@ -525,6 +525,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
runTest("compiler/testData/diagnostics/tests/kt56769.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt56876.kt")
|
||||
public void testKt56876() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/kt56876.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt56877.kt")
|
||||
public void testKt56877() throws Exception {
|
||||
|
||||
+6
@@ -525,6 +525,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
runTest("compiler/testData/diagnostics/tests/kt56769.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt56876.kt")
|
||||
public void testKt56876() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/kt56876.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt56877.kt")
|
||||
public void testKt56877() throws Exception {
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
// FIR_IDENTICAL
|
||||
|
||||
@file:OptIn(ExperimentalContracts::class)
|
||||
|
||||
import kotlin.contracts.*
|
||||
|
||||
open class Result {
|
||||
class Success : Result()
|
||||
|
||||
fun isSuccess1(arg: Result): Boolean {
|
||||
contract {
|
||||
returns(true) implies (arg is Success)
|
||||
}
|
||||
return arg is Success
|
||||
}
|
||||
}
|
||||
|
||||
fun Result.isSuccess2(arg: Result): Boolean {
|
||||
contract {
|
||||
returns(true) implies (arg is <!UNRESOLVED_REFERENCE!>Success<!>)
|
||||
}
|
||||
return arg is <!UNRESOLVED_REFERENCE!>Success<!>
|
||||
}
|
||||
Generated
+6
@@ -525,6 +525,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/kt56769.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt56876.kt")
|
||||
public void testKt56876() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/kt56876.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt56877.kt")
|
||||
public void testKt56877() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user