K2: build SAM-based function type for a given captured type properly
Before this commit, we assumed (erroneously) that a captured type cannot have an associated SAM-based function type. In this commit we changed this assumption, replacing a captured type with its lower type for this purpose #KT-63379 Fixed
This commit is contained in:
committed by
Space Team
parent
8588588760
commit
a02cf76d6c
+6
@@ -13927,6 +13927,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
public void testUnitInContravariantPosition() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/funInterface/unitInContravariantPosition.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unitInCovariantPosition.kt")
|
||||
public void testUnitInCovariantPosition() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/funInterface/unitInCovariantPosition.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
||||
+6
@@ -13927,6 +13927,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
public void testUnitInContravariantPosition() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/funInterface/unitInContravariantPosition.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unitInCovariantPosition.kt")
|
||||
public void testUnitInCovariantPosition() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/funInterface/unitInCovariantPosition.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
||||
Reference in New Issue
Block a user