[NI] Add test to check how behavior will be changed after few commits
This commit is contained in:
Generated
+5
@@ -21215,6 +21215,11 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirOldFronte
|
|||||||
public void testSmartCastOnReceiver() throws Exception {
|
public void testSmartCastOnReceiver() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/smartCasts/inference/smartCastOnReceiver.kt");
|
runTest("compiler/testData/diagnostics/tests/smartCasts/inference/smartCastOnReceiver.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("stabilityOfSmartcastsAgainstGenericFunctions.kt")
|
||||||
|
public void testStabilityOfSmartcastsAgainstGenericFunctions() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/smartCasts/inference/stabilityOfSmartcastsAgainstGenericFunctions.kt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope")
|
@TestMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope")
|
||||||
|
|||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_LAMBDA_EXPRESSION -VARIABLE_WITH_REDUNDANT_INITIALIZER -UNUSED_EXPRESSION
|
||||||
|
|
||||||
|
object Test {
|
||||||
|
fun <T> foo(actual: T) {}
|
||||||
|
fun <T : Number> foo(actual: T) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun main() {
|
||||||
|
var y: Number? = null
|
||||||
|
y = 2
|
||||||
|
{ y = 1 }
|
||||||
|
Test.foo(y)
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_LAMBDA_EXPRESSION -VARIABLE_WITH_REDUNDANT_INITIALIZER -UNUSED_EXPRESSION
|
||||||
|
|
||||||
|
object Test {
|
||||||
|
fun <T> foo(actual: T) {}
|
||||||
|
fun <T : Number> foo(actual: T) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun main() {
|
||||||
|
var y: Number? = null
|
||||||
|
y = 2
|
||||||
|
{ y = 1 }
|
||||||
|
Test.foo(<!SMARTCAST_IMPOSSIBLE, SMARTCAST_IMPOSSIBLE!>y<!>)
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public fun main(): kotlin.Unit
|
||||||
|
|
||||||
|
public object Test {
|
||||||
|
private constructor Test()
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public final fun </*0*/ T> foo(/*0*/ actual: T): kotlin.Unit
|
||||||
|
public final fun </*0*/ T : kotlin.Number> foo(/*0*/ actual: T): kotlin.Unit
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
@@ -21292,6 +21292,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
|||||||
public void testSmartCastOnReceiver() throws Exception {
|
public void testSmartCastOnReceiver() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/smartCasts/inference/smartCastOnReceiver.kt");
|
runTest("compiler/testData/diagnostics/tests/smartCasts/inference/smartCastOnReceiver.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("stabilityOfSmartcastsAgainstGenericFunctions.kt")
|
||||||
|
public void testStabilityOfSmartcastsAgainstGenericFunctions() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/smartCasts/inference/stabilityOfSmartcastsAgainstGenericFunctions.kt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope")
|
@TestMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope")
|
||||||
|
|||||||
Generated
+5
@@ -21217,6 +21217,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
|||||||
public void testSmartCastOnReceiver() throws Exception {
|
public void testSmartCastOnReceiver() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/smartCasts/inference/smartCastOnReceiver.kt");
|
runTest("compiler/testData/diagnostics/tests/smartCasts/inference/smartCastOnReceiver.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("stabilityOfSmartcastsAgainstGenericFunctions.kt")
|
||||||
|
public void testStabilityOfSmartcastsAgainstGenericFunctions() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/smartCasts/inference/stabilityOfSmartcastsAgainstGenericFunctions.kt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope")
|
@TestMetadata("compiler/testData/diagnostics/tests/smartCasts/intersectionScope")
|
||||||
|
|||||||
Reference in New Issue
Block a user