[FE 1.0] Keep the same type attributes during union or intersection type attributes
^KT-51317 Fixed
This commit is contained in:
+6
@@ -11472,6 +11472,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
||||
runTest("compiler/testData/diagnostics/tests/functionLiterals/kt47493.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt51317.kt")
|
||||
public void testKt51317() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/functionLiterals/kt51317.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt6541_extensionForExtensionFunction.kt")
|
||||
public void testKt6541_extensionForExtensionFunction() throws Exception {
|
||||
|
||||
+6
@@ -11472,6 +11472,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
|
||||
runTest("compiler/testData/diagnostics/tests/functionLiterals/kt47493.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt51317.kt")
|
||||
public void testKt51317() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/functionLiterals/kt51317.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt6541_extensionForExtensionFunction.kt")
|
||||
public void testKt6541_extensionForExtensionFunction() throws Exception {
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
val f: (String.() -> String)? = null
|
||||
|
||||
fun box(): String {
|
||||
val g = when {
|
||||
f != null -> f
|
||||
else -> {
|
||||
{ this + "K" }
|
||||
}
|
||||
}
|
||||
return g("O")
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
val f: (String.() -> String)? = null
|
||||
|
||||
fun box(): String {
|
||||
val g = when {
|
||||
f != null -> <!DEBUG_INFO_SMARTCAST!>f<!>
|
||||
else -> {
|
||||
{ this + "K" }
|
||||
}
|
||||
}
|
||||
return g("O")
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package
|
||||
|
||||
public val f: (kotlin.String.() -> kotlin.String)? = null
|
||||
public fun box(): kotlin.String
|
||||
Generated
+6
@@ -11478,6 +11478,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/functionLiterals/kt47493.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt51317.kt")
|
||||
public void testKt51317() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/functionLiterals/kt51317.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt6541_extensionForExtensionFunction.kt")
|
||||
public void testKt6541_extensionForExtensionFunction() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user