[FE 1.0] Add test for KT-45970
This commit is contained in:
committed by
Space Team
parent
3cffb33ab7
commit
a979960e63
+6
@@ -22266,6 +22266,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
|||||||
runTest("compiler/testData/diagnostics/tests/numbers/kt41679.kt");
|
runTest("compiler/testData/diagnostics/tests/numbers/kt41679.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt45970.kt")
|
||||||
|
public void testKt45970() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/numbers/kt45970.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt47447.kt")
|
@TestMetadata("kt47447.kt")
|
||||||
public void testKt47447() throws Exception {
|
public void testKt47447() throws Exception {
|
||||||
|
|||||||
+6
@@ -22272,6 +22272,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
|||||||
runTest("compiler/testData/diagnostics/tests/numbers/kt41679.kt");
|
runTest("compiler/testData/diagnostics/tests/numbers/kt41679.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt45970.kt")
|
||||||
|
public void testKt45970() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/numbers/kt45970.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt47447.kt")
|
@TestMetadata("kt47447.kt")
|
||||||
public void testKt47447() throws Exception {
|
public void testKt47447() throws Exception {
|
||||||
|
|||||||
+6
@@ -22266,6 +22266,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
|
|||||||
runTest("compiler/testData/diagnostics/tests/numbers/kt41679.kt");
|
runTest("compiler/testData/diagnostics/tests/numbers/kt41679.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt45970.kt")
|
||||||
|
public void testKt45970() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/numbers/kt45970.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt47447.kt")
|
@TestMetadata("kt47447.kt")
|
||||||
public void testKt47447() throws Exception {
|
public void testKt47447() throws Exception {
|
||||||
|
|||||||
@@ -0,0 +1,59 @@
|
|||||||
|
// ISSUE: KT-45970
|
||||||
|
|
||||||
|
val a_1: Byte = 1
|
||||||
|
var a_2: Byte = 1
|
||||||
|
val b_1: Short = 1
|
||||||
|
var b_2: Short = 1
|
||||||
|
val c_1: Int = 1
|
||||||
|
var c_2: Int = 1
|
||||||
|
val d_1: Long = 1
|
||||||
|
var d_2: Long = 1
|
||||||
|
|
||||||
|
val e_1: Byte = <!TYPE_MISMATCH!>1 + 2<!>
|
||||||
|
var e_2: Byte = <!TYPE_MISMATCH!>1 + 2<!>
|
||||||
|
val f_1: Short = <!TYPE_MISMATCH!>1 + 2<!>
|
||||||
|
var f_2: Short = <!TYPE_MISMATCH!>1 + 2<!>
|
||||||
|
val g_1: Int = 1 + 2
|
||||||
|
var g_2: Int = 1 + 2
|
||||||
|
val h_1: Long = 1 + 2
|
||||||
|
var h_2: Long = 1 + 2
|
||||||
|
|
||||||
|
fun local() {
|
||||||
|
val a_1: Byte = 1
|
||||||
|
var a_2: Byte = 1
|
||||||
|
val b_1: Short = 1
|
||||||
|
var b_2: Short = 1
|
||||||
|
val c_1: Int = 1
|
||||||
|
var c_2: Int = 1
|
||||||
|
val d_1: Long = 1
|
||||||
|
var d_2: Long = 1
|
||||||
|
|
||||||
|
val e_1: Byte = <!TYPE_MISMATCH!>1 + 2<!>
|
||||||
|
var e_2: Byte = <!TYPE_MISMATCH!>1 + 2<!>
|
||||||
|
val f_1: Short = <!TYPE_MISMATCH!>1 + 2<!>
|
||||||
|
var f_2: Short = <!TYPE_MISMATCH!>1 + 2<!>
|
||||||
|
val g_1: Int = 1 + 2
|
||||||
|
var g_2: Int = 1 + 2
|
||||||
|
val h_1: Long = 1 + 2
|
||||||
|
var h_2: Long = 1 + 2
|
||||||
|
}
|
||||||
|
|
||||||
|
class Member {
|
||||||
|
val a_1: Byte = 1
|
||||||
|
var a_2: Byte = 1
|
||||||
|
val b_1: Short = 1
|
||||||
|
var b_2: Short = 1
|
||||||
|
val c_1: Int = 1
|
||||||
|
var c_2: Int = 1
|
||||||
|
val d_1: Long = 1
|
||||||
|
var d_2: Long = 1
|
||||||
|
|
||||||
|
val e_1: Byte = <!TYPE_MISMATCH!>1 + 2<!>
|
||||||
|
var e_2: Byte = <!TYPE_MISMATCH!>1 + 2<!>
|
||||||
|
val f_1: Short = <!TYPE_MISMATCH!>1 + 2<!>
|
||||||
|
var f_2: Short = <!TYPE_MISMATCH!>1 + 2<!>
|
||||||
|
val g_1: Int = 1 + 2
|
||||||
|
var g_2: Int = 1 + 2
|
||||||
|
val h_1: Long = 1 + 2
|
||||||
|
var h_2: Long = 1 + 2
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
// ISSUE: KT-45970
|
||||||
|
|
||||||
|
val a_1: Byte = 1
|
||||||
|
var a_2: Byte = 1
|
||||||
|
val b_1: Short = 1
|
||||||
|
var b_2: Short = 1
|
||||||
|
val c_1: Int = 1
|
||||||
|
var c_2: Int = 1
|
||||||
|
val d_1: Long = 1
|
||||||
|
var d_2: Long = 1
|
||||||
|
|
||||||
|
val e_1: Byte = <!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1 + 2<!>
|
||||||
|
var e_2: Byte = 1 + 2
|
||||||
|
val f_1: Short = <!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1 + 2<!>
|
||||||
|
var f_2: Short = 1 + 2
|
||||||
|
val g_1: Int = 1 + 2
|
||||||
|
var g_2: Int = 1 + 2
|
||||||
|
val h_1: Long = 1 + 2
|
||||||
|
var h_2: Long = 1 + 2
|
||||||
|
|
||||||
|
fun local() {
|
||||||
|
val a_1: Byte = 1
|
||||||
|
var a_2: Byte = 1
|
||||||
|
val b_1: Short = 1
|
||||||
|
var b_2: Short = 1
|
||||||
|
val c_1: Int = 1
|
||||||
|
var c_2: Int = 1
|
||||||
|
val d_1: Long = 1
|
||||||
|
var d_2: Long = 1
|
||||||
|
|
||||||
|
val e_1: Byte = 1 + 2
|
||||||
|
var e_2: Byte = 1 + 2
|
||||||
|
val f_1: Short = 1 + 2
|
||||||
|
var f_2: Short = 1 + 2
|
||||||
|
val g_1: Int = 1 + 2
|
||||||
|
var g_2: Int = 1 + 2
|
||||||
|
val h_1: Long = 1 + 2
|
||||||
|
var h_2: Long = 1 + 2
|
||||||
|
}
|
||||||
|
|
||||||
|
class Member {
|
||||||
|
val a_1: Byte = 1
|
||||||
|
var a_2: Byte = 1
|
||||||
|
val b_1: Short = 1
|
||||||
|
var b_2: Short = 1
|
||||||
|
val c_1: Int = 1
|
||||||
|
var c_2: Int = 1
|
||||||
|
val d_1: Long = 1
|
||||||
|
var d_2: Long = 1
|
||||||
|
|
||||||
|
val e_1: Byte = <!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1 + 2<!>
|
||||||
|
var e_2: Byte = 1 + 2
|
||||||
|
val f_1: Short = <!INTEGER_OPERATOR_RESOLVE_WILL_CHANGE!>1 + 2<!>
|
||||||
|
var f_2: Short = 1 + 2
|
||||||
|
val g_1: Int = 1 + 2
|
||||||
|
var g_2: Int = 1 + 2
|
||||||
|
val h_1: Long = 1 + 2
|
||||||
|
var h_2: Long = 1 + 2
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public val a_1: kotlin.Byte = 1.toByte()
|
||||||
|
public var a_2: kotlin.Byte
|
||||||
|
public val b_1: kotlin.Short = 1.toShort()
|
||||||
|
public var b_2: kotlin.Short
|
||||||
|
public val c_1: kotlin.Int = 1
|
||||||
|
public var c_2: kotlin.Int
|
||||||
|
public val d_1: kotlin.Long = 1.toLong()
|
||||||
|
public var d_2: kotlin.Long
|
||||||
|
public val e_1: kotlin.Byte = 3.toByte()
|
||||||
|
public var e_2: kotlin.Byte
|
||||||
|
public val f_1: kotlin.Short = 3.toShort()
|
||||||
|
public var f_2: kotlin.Short
|
||||||
|
public val g_1: kotlin.Int = 3
|
||||||
|
public var g_2: kotlin.Int
|
||||||
|
public val h_1: kotlin.Long = 3.toLong()
|
||||||
|
public var h_2: kotlin.Long
|
||||||
|
public fun local(): kotlin.Unit
|
||||||
|
|
||||||
|
public final class Member {
|
||||||
|
public constructor Member()
|
||||||
|
public final val a_1: kotlin.Byte = 1.toByte()
|
||||||
|
public final var a_2: kotlin.Byte
|
||||||
|
public final val b_1: kotlin.Short = 1.toShort()
|
||||||
|
public final var b_2: kotlin.Short
|
||||||
|
public final val c_1: kotlin.Int = 1
|
||||||
|
public final var c_2: kotlin.Int
|
||||||
|
public final val d_1: kotlin.Long = 1.toLong()
|
||||||
|
public final var d_2: kotlin.Long
|
||||||
|
public final val e_1: kotlin.Byte = 3.toByte()
|
||||||
|
public final var e_2: kotlin.Byte
|
||||||
|
public final val f_1: kotlin.Short = 3.toShort()
|
||||||
|
public final var f_2: kotlin.Short
|
||||||
|
public final val g_1: kotlin.Int = 3
|
||||||
|
public final var g_2: kotlin.Int
|
||||||
|
public final val h_1: kotlin.Long = 3.toLong()
|
||||||
|
public final var h_2: kotlin.Long
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
|
||||||
Generated
+6
@@ -22272,6 +22272,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/numbers/kt41679.kt");
|
runTest("compiler/testData/diagnostics/tests/numbers/kt41679.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt45970.kt")
|
||||||
|
public void testKt45970() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/numbers/kt45970.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt47447.kt")
|
@TestMetadata("kt47447.kt")
|
||||||
public void testKt47447() throws Exception {
|
public void testKt47447() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user