[FIR] Render dot-separated FQNs instead of slash-separated ones in diagnostics
^KT-62030 fixed
This commit is contained in:
committed by
Space Team
parent
b119b4de02
commit
d98da87278
+1
-1
@@ -1,4 +1,4 @@
|
||||
compiler/testData/cli/jvm/compatqualUsage.kt:2:11: error: null cannot be a value of a non-null type 'kotlin/String'.
|
||||
compiler/testData/cli/jvm/compatqualUsage.kt:2:11: error: null cannot be a value of a non-null type 'kotlin.String'.
|
||||
b.foo(null)
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
compiler/testData/cli/jvm/compatqualUsage.kt:2:11: error: null cannot be a value of a non-null type 'kotlin/String'.
|
||||
compiler/testData/cli/jvm/compatqualUsage.kt:2:11: error: null cannot be a value of a non-null type 'kotlin.String'.
|
||||
b.foo(null)
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
compiler/testData/cli/jvm/conflictingProjection.kt:10:19: error: projection is conflicting with variance of the corresponding type parameter of 'Out<in kotlin/Int>'. Remove the projection or replace it with '*'.
|
||||
compiler/testData/cli/jvm/conflictingProjection.kt:10:19: error: projection is conflicting with variance of the corresponding type parameter of 'Out<in kotlin.Int>'. Remove the projection or replace it with '*'.
|
||||
fun a8(value: Out<in Int>) {}
|
||||
^
|
||||
compiler/testData/cli/jvm/conflictingProjection.kt:17:15: error: variance annotations are only allowed for type parameters of classes and interfaces.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
compiler/testData/cli/jvm/firFriendlyErrorIfNoJdkOptionIsSet.kt:2:11: error: unresolved reference 'NullPointerException'.
|
||||
throw NullPointerException()
|
||||
^
|
||||
compiler/testData/cli/jvm/firFriendlyErrorIfNoJdkOptionIsSet.kt:2:11: error: type mismatch: inferred type is 'ERROR CLASS: Unresolved name: NullPointerException', but 'kotlin/Throwable' was expected.
|
||||
compiler/testData/cli/jvm/firFriendlyErrorIfNoJdkOptionIsSet.kt:2:11: error: type mismatch: inferred type is 'ERROR CLASS: Unresolved name: NullPointerException', but 'kotlin.Throwable' was expected.
|
||||
throw NullPointerException()
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ compiler/testData/cli/jvm/firLightTree.kt:3:15: error: classifier 'class System
|
||||
compiler/testData/cli/jvm/firLightTree.kt:3:15: error: variable expected.
|
||||
java.lang.System = null
|
||||
^
|
||||
compiler/testData/cli/jvm/firLightTree.kt:3:24: error: null cannot be a value of a non-null type 'kotlin/Unit'.
|
||||
compiler/testData/cli/jvm/firLightTree.kt:3:24: error: null cannot be a value of a non-null type 'kotlin.Unit'.
|
||||
java.lang.System = null
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ compiler/testData/cli/jvm/firLightTree.kt:3:15: error: classifier 'class System
|
||||
compiler/testData/cli/jvm/firLightTree.kt:3:15: error: variable expected.
|
||||
java.lang.System = null
|
||||
^
|
||||
compiler/testData/cli/jvm/firLightTree.kt:3:24: error: null cannot be a value of a non-null type 'kotlin/Unit'.
|
||||
compiler/testData/cli/jvm/firLightTree.kt:3:24: error: null cannot be a value of a non-null type 'kotlin.Unit'.
|
||||
java.lang.System = null
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
@@ -10,7 +10,7 @@ compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:2:74: error: cannot a
|
||||
compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:7:20: error: 'this' is not defined in this context.
|
||||
class B(other: B = this)
|
||||
^
|
||||
compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:10:32: error: argument type mismatch: actual type is 'kotlin/Function0<ERROR CLASS: Unknown return lambda parameter type>', but 'kotlin/Int' was expected.
|
||||
compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:10:32: error: argument type mismatch: actual type is 'kotlin.Function0<ERROR CLASS: Unknown return lambda parameter type>', but 'kotlin.Int' was expected.
|
||||
constructor(x: Int) : this({
|
||||
^
|
||||
compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:12:9: error: cannot access '<this>' before the instance has been initialized.
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
compiler/testData/cli/jvm/jspecifyUsage.kt:2:11: error: null cannot be a value of a non-null type 'kotlin/String'.
|
||||
compiler/testData/cli/jvm/jspecifyUsage.kt:2:11: error: null cannot be a value of a non-null type 'kotlin.String'.
|
||||
a.foo(null)
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
compiler/testData/cli/jvm/jspecifyUsage.kt:2:11: error: null cannot be a value of a non-null type 'kotlin/String'.
|
||||
compiler/testData/cli/jvm/jspecifyUsage.kt:2:11: error: null cannot be a value of a non-null type 'kotlin.String'.
|
||||
a.foo(null)
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
compiler/testData/cli/jvm/jsr305DefaultMigration.kt:2:19: error: null cannot be a value of a non-null type 'kotlin/String'.
|
||||
compiler/testData/cli/jvm/jsr305DefaultMigration.kt:2:19: error: null cannot be a value of a non-null type 'kotlin.String'.
|
||||
annotated.foo(null)
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
warning: argument -Xjsr305-annotations is deprecated. Please use -Xjsr305 instead
|
||||
warning: option 'enable' for -Xjsr305 flag is deprecated. Please use 'strict' instead
|
||||
compiler/testData/cli/jvm/jsr305Usage.kt:2:11: error: null cannot be a value of a non-null type 'kotlin/String'.
|
||||
compiler/testData/cli/jvm/jsr305Usage.kt:2:11: error: null cannot be a value of a non-null type 'kotlin.String'.
|
||||
a.foo(null)
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
compiler/testData/cli/jvm/jsr305Migration.kt:3:19: error: null cannot be a value of a non-null type 'kotlin/String'.
|
||||
compiler/testData/cli/jvm/jsr305Migration.kt:3:19: error: null cannot be a value of a non-null type 'kotlin.String'.
|
||||
annotated.bar(null)
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
compiler/testData/cli/jvm/jsr305Migration.kt:2:19: error: null cannot be a value of a non-null type 'kotlin/String'.
|
||||
compiler/testData/cli/jvm/jsr305Migration.kt:2:19: error: null cannot be a value of a non-null type 'kotlin.String'.
|
||||
annotated.foo(null)
|
||||
^
|
||||
compiler/testData/cli/jvm/jsr305Migration.kt:3:19: error: null cannot be a value of a non-null type 'kotlin/String'.
|
||||
compiler/testData/cli/jvm/jsr305Migration.kt:3:19: error: null cannot be a value of a non-null type 'kotlin.String'.
|
||||
annotated.bar(null)
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
compiler/testData/cli/jvm/jsr305Migration.kt:3:19: error: null cannot be a value of a non-null type 'kotlin/String'.
|
||||
compiler/testData/cli/jvm/jsr305Migration.kt:3:19: error: null cannot be a value of a non-null type 'kotlin.String'.
|
||||
annotated.bar(null)
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
compiler/testData/cli/jvm/jsr305Usage.kt:2:11: error: null cannot be a value of a non-null type 'kotlin/String'.
|
||||
compiler/testData/cli/jvm/jsr305Usage.kt:2:11: error: null cannot be a value of a non-null type 'kotlin.String'.
|
||||
a.foo(null)
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
compiler/testData/cli/jvm/severalAnnotations.kt:2:11: error: null cannot be a value of a non-null type 'kotlin/String'.
|
||||
compiler/testData/cli/jvm/severalAnnotations.kt:2:11: error: null cannot be a value of a non-null type 'kotlin.String'.
|
||||
a.foo(null)
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
compiler/testData/cli/jvm/reportInternalDiagnosticNames.kt:2:21: error: [INITIALIZER_TYPE_MISMATCH] Initializer type mismatch: expected 'kotlin/String', actual 'kotlin/Int'.
|
||||
compiler/testData/cli/jvm/reportInternalDiagnosticNames.kt:2:21: error: [INITIALIZER_TYPE_MISMATCH] Initializer type mismatch: expected 'kotlin.String', actual 'kotlin.Int'.
|
||||
val x: String = 1
|
||||
^
|
||||
compiler/testData/cli/jvm/reportInternalDiagnosticNames.kt:3:1: error: [NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY] A 'return' expression is required in a function with a block body ('{...}').
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
compiler/testData/cli/jvm/werrorWithExplicitError.kt:4:6: error: only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'kotlin/String?'.
|
||||
compiler/testData/cli/jvm/werrorWithExplicitError.kt:4:6: error: only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'kotlin.String?'.
|
||||
t.length
|
||||
^
|
||||
COMPILATION_ERROR
|
||||
|
||||
@@ -9,5 +9,5 @@ class Foo(val a: Int, b: Int) {
|
||||
val e: Int
|
||||
get() = <!UNRESOLVED_REFERENCE!>b<!>
|
||||
|
||||
val map: Map<String, Int> = <!INITIALIZER_TYPE_MISMATCH, TYPE_MISMATCH("kotlin/String; kotlin/Int"), TYPE_MISMATCH("kotlin/String; kotlin/Int"), TYPE_MISMATCH("kotlin/Int; kotlin/String"), TYPE_MISMATCH("kotlin/String; kotlin/Int"), TYPE_MISMATCH("kotlin/Int; kotlin/String")!>mapOf(1 to "hello")<!>
|
||||
val map: Map<String, Int> = <!INITIALIZER_TYPE_MISMATCH, TYPE_MISMATCH("kotlin.String; kotlin.Int"), TYPE_MISMATCH("kotlin.String; kotlin.Int"), TYPE_MISMATCH("kotlin.Int; kotlin.String"), TYPE_MISMATCH("kotlin.String; kotlin.Int"), TYPE_MISMATCH("kotlin.Int; kotlin.String")!>mapOf(1 to "hello")<!>
|
||||
}
|
||||
|
||||
+3
-3
@@ -12,14 +12,14 @@ annotation class Ann
|
||||
fun <@Ann R : @Ann Any> f3(a: Array<@Ann R>): Array<@Ann R?> = null!!
|
||||
|
||||
fun test2(a: @Ann Array<in @Ann Int>) {
|
||||
val r: Array<in Int?> = f3(<!ARGUMENT_TYPE_MISMATCH("kotlin/Array<@Ann() R>; @Ann() kotlin/Array<CapturedType(in @Ann() kotlin/Int)>")!>a<!>)
|
||||
val r: Array<in Int?> = f3(<!ARGUMENT_TYPE_MISMATCH("kotlin.Array<@Ann() R>; @Ann() kotlin.Array<CapturedType(in @Ann() kotlin.Int)>")!>a<!>)
|
||||
}
|
||||
|
||||
|
||||
var test3: Int = 0
|
||||
set(s: <!WRONG_SETTER_PARAMETER_TYPE("kotlin/Int; @Ann() kotlin/String")!>@Ann String<!>) {}
|
||||
set(s: <!WRONG_SETTER_PARAMETER_TYPE("kotlin.Int; @Ann() kotlin.String")!>@Ann String<!>) {}
|
||||
|
||||
|
||||
fun f4(fn: (@Ann Int, @Ann Int) -> Unit) {}
|
||||
|
||||
val test4 = f4 <!ARGUMENT_TYPE_MISMATCH("kotlin/Function2<@Ann() kotlin/Int, @Ann() kotlin/Int, kotlin/Unit>; kotlin/Function1<@Ann() kotlin/Int, kotlin/Unit>")!>{ single -> }<!>
|
||||
val test4 = f4 <!ARGUMENT_TYPE_MISMATCH("kotlin.Function2<@Ann() kotlin.Int, @Ann() kotlin.Int, kotlin.Unit>; kotlin.Function1<@Ann() kotlin.Int, kotlin.Unit>")!>{ single -> }<!>
|
||||
|
||||
+1
-1
@@ -11,5 +11,5 @@ class C<T> {
|
||||
}
|
||||
|
||||
fun test(a: C<out CharSequence>) {
|
||||
a[1] = <!ARGUMENT_TYPE_MISMATCH("@A() CapturedType(out kotlin/CharSequence); kotlin/Int")!>25<!>
|
||||
a[1] = <!ARGUMENT_TYPE_MISMATCH("@A() CapturedType(out kotlin.CharSequence); kotlin.Int")!>25<!>
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -13,5 +13,5 @@ class C<T> {
|
||||
class Out<out F>
|
||||
|
||||
fun test(a: C<out CharSequence>, y: Out<CharSequence>) {
|
||||
a + <!ARGUMENT_TYPE_MISMATCH("Out<@A() CapturedType(out kotlin/CharSequence)>; Out<kotlin/CharSequence>")!>y<!>
|
||||
a + <!ARGUMENT_TYPE_MISMATCH("Out<@A() CapturedType(out kotlin.CharSequence)>; Out<kotlin.CharSequence>")!>y<!>
|
||||
}
|
||||
|
||||
+2
-2
@@ -30,7 +30,7 @@ fun testYield() {
|
||||
val buildee = build {
|
||||
yield { val x: UserKlass = <!UNRESOLVED_REFERENCE!>it<!> }
|
||||
}
|
||||
checkExactType<Buildee<(UserKlass) -> Unit>>(<!ARGUMENT_TYPE_MISMATCH("Buildee<kotlin/Function1<UserKlass, kotlin/Unit>>; Buildee<kotlin/Function0<kotlin/Unit>>")!>buildee<!>)
|
||||
checkExactType<Buildee<(UserKlass) -> Unit>>(<!ARGUMENT_TYPE_MISMATCH("Buildee<kotlin.Function1<UserKlass, kotlin.Unit>>; Buildee<kotlin.Function0<kotlin.Unit>>")!>buildee<!>)
|
||||
}
|
||||
|
||||
// test 2: PTV is in producing position (materialize-case)
|
||||
@@ -42,5 +42,5 @@ fun testMaterialize() {
|
||||
materialize()
|
||||
)
|
||||
}
|
||||
checkExactType<Buildee<(UserKlass) -> Unit>>(<!ARGUMENT_TYPE_MISMATCH("Buildee<kotlin/Function1<UserKlass, kotlin/Unit>>; Buildee<kotlin/Function0<kotlin/Unit>>")!>buildee<!>)
|
||||
checkExactType<Buildee<(UserKlass) -> Unit>>(<!ARGUMENT_TYPE_MISMATCH("Buildee<kotlin.Function1<UserKlass, kotlin.Unit>>; Buildee<kotlin.Function0<kotlin.Unit>>")!>buildee<!>)
|
||||
}
|
||||
|
||||
+2
-2
@@ -30,7 +30,7 @@ fun testYield() {
|
||||
val buildee = build {
|
||||
yield { val x: UserKlass = this<!UNRESOLVED_LABEL!>@yield<!> }
|
||||
}
|
||||
checkExactType<Buildee<UserKlass.() -> Unit>>(<!ARGUMENT_TYPE_MISMATCH("Buildee<kotlin/Function1<UserKlass, kotlin/Unit>>; Buildee<kotlin/Function0<kotlin/Unit>>")!>buildee<!>)
|
||||
checkExactType<Buildee<UserKlass.() -> Unit>>(<!ARGUMENT_TYPE_MISMATCH("Buildee<kotlin.Function1<UserKlass, kotlin.Unit>>; Buildee<kotlin.Function0<kotlin.Unit>>")!>buildee<!>)
|
||||
}
|
||||
|
||||
// test 2: PTV is in producing position (materialize-case)
|
||||
@@ -42,5 +42,5 @@ fun testMaterialize() {
|
||||
materialize()
|
||||
)
|
||||
}
|
||||
checkExactType<Buildee<UserKlass.() -> Unit>>(<!ARGUMENT_TYPE_MISMATCH("Buildee<kotlin/Function1<UserKlass, kotlin/Unit>>; Buildee<kotlin/Function0<kotlin/Unit>>")!>buildee<!>)
|
||||
checkExactType<Buildee<UserKlass.() -> Unit>>(<!ARGUMENT_TYPE_MISMATCH("Buildee<kotlin.Function1<UserKlass, kotlin.Unit>>; Buildee<kotlin.Function0<kotlin.Unit>>")!>buildee<!>)
|
||||
}
|
||||
|
||||
+1
-1
@@ -27,5 +27,5 @@ fun testMaterialize() {
|
||||
val buildee = build {
|
||||
shareTypeInfo(null, materialize())
|
||||
}
|
||||
checkExactType<Buildee<Nothing?>>(<!ARGUMENT_TYPE_MISMATCH("Buildee<kotlin/Nothing?>; Buildee<kotlin/Nothing>")!>buildee<!>)
|
||||
checkExactType<Buildee<Nothing?>>(<!ARGUMENT_TYPE_MISMATCH("Buildee<kotlin.Nothing?>; Buildee<kotlin.Nothing>")!>buildee<!>)
|
||||
}
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
/kt45461.kt:(245,252): warning: Type argument for type parameter 'S' cannot be inferred because it has incompatible upper bounds: kotlin/String, kotlin/Int (multiple incompatible classes). This will become an error in Kotlin 2.0.
|
||||
/kt45461.kt:(245,252): warning: Type argument for type parameter 'S' cannot be inferred because it has incompatible upper bounds: kotlin.String, kotlin.Int (multiple incompatible classes). This will become an error in Kotlin 2.0.
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
/kt45461_12.kt:(296,303): warning: Type argument for type parameter 'S' cannot be inferred because it has incompatible upper bounds: kotlin/String, K (multiple incompatible classes: kotlin/String, kotlin/Number). This will become an error in Kotlin 2.0.
|
||||
/kt45461_12.kt:(296,303): warning: Type argument for type parameter 'S' cannot be inferred because it has incompatible upper bounds: kotlin.String, K (multiple incompatible classes: kotlin/String, kotlin/Number). This will become an error in Kotlin 2.0.
|
||||
|
||||
Vendored
+2
-2
@@ -1,3 +1,3 @@
|
||||
/kt45461_2.kt:(198,201): warning: Type 'kotlin/Int' is final, so the value of the type parameter is predetermined.
|
||||
/kt45461_2.kt:(198,201): warning: Type 'kotlin.Int' is final, so the value of the type parameter is predetermined.
|
||||
|
||||
/kt45461_2.kt:(253,260): warning: Type argument for type parameter 'S' cannot be inferred because it has incompatible upper bounds: kotlin/String, K (multiple incompatible classes: kotlin/String, kotlin/Int). This will become an error in Kotlin 2.0.
|
||||
/kt45461_2.kt:(253,260): warning: Type argument for type parameter 'S' cannot be inferred because it has incompatible upper bounds: kotlin.String, K (multiple incompatible classes: kotlin/String, kotlin/Int). This will become an error in Kotlin 2.0.
|
||||
|
||||
Vendored
+3
-3
@@ -1,5 +1,5 @@
|
||||
/kt45461_25.fir.kt:(176,180): warning: Unchecked cast of 'kotlin/Nothing?' to 'S'.
|
||||
/kt45461_25.fir.kt:(176,180): warning: Unchecked cast of 'kotlin.Nothing?' to 'S'.
|
||||
|
||||
/kt45461_25.fir.kt:(206,209): warning: Type 'kotlin/Int' is final, so the value of the type parameter is predetermined.
|
||||
/kt45461_25.fir.kt:(206,209): warning: Type 'kotlin.Int' is final, so the value of the type parameter is predetermined.
|
||||
|
||||
/kt45461_25.fir.kt:(276,283): error: Type argument for type parameter 'S' cannot be inferred because it has incompatible upper bounds: kotlin/String, K (multiple incompatible classes: kotlin/String, kotlin/Int).
|
||||
/kt45461_25.fir.kt:(276,283): error: Type argument for type parameter 'S' cannot be inferred because it has incompatible upper bounds: kotlin.String, K (multiple incompatible classes: kotlin/String, kotlin/Int).
|
||||
|
||||
+1
-1
@@ -8,5 +8,5 @@ class Bar<T> {
|
||||
|
||||
fun <K : L, L : N, N: <!FINAL_UPPER_BOUND!>Int<!>> main() {
|
||||
val foo = Foo<K>()
|
||||
val x: Float = Bar<String>().<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION_ERROR("S; kotlin/String, K; multiple incompatible classes; : kotlin/String, kotlin/Int")!>takeFoo<!>(foo) // error in 1.3.72, no error in 1.4.31
|
||||
val x: Float = Bar<String>().<!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION_ERROR("S; kotlin.String, K; multiple incompatible classes; : kotlin/String, kotlin/Int")!>takeFoo<!>(foo) // error in 1.3.72, no error in 1.4.31
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -1,3 +1,3 @@
|
||||
/kt45461_26.fir.kt:(176,180): warning: Unchecked cast of 'kotlin/Nothing?' to 'S'.
|
||||
/kt45461_26.fir.kt:(176,180): warning: Unchecked cast of 'kotlin.Nothing?' to 'S'.
|
||||
|
||||
/kt45461_26.fir.kt:(224,232): warning: Type 'Out<kotlin/Int>' is final, so the value of the type parameter is predetermined.
|
||||
/kt45461_26.fir.kt:(224,232): warning: Type 'Out<kotlin.Int>' is final, so the value of the type parameter is predetermined.
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
/kt45461_5.kt:(269,276): warning: Type argument for type parameter 'S' cannot be inferred because it has incompatible upper bounds: kotlin/String, K (multiple incompatible classes: kotlin/String, kotlin/Number). This will become an error in Kotlin 2.0.
|
||||
/kt45461_5.kt:(269,276): warning: Type argument for type parameter 'S' cannot be inferred because it has incompatible upper bounds: kotlin.String, K (multiple incompatible classes: kotlin/String, kotlin/Number). This will become an error in Kotlin 2.0.
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
/kt48765.kt:(282,285): warning: Type argument for type parameter 'T' cannot be inferred because it has incompatible upper bounds: kotlin/String, kotlin/Number (multiple incompatible classes). This will become an error in Kotlin 2.0.
|
||||
/kt48765.kt:(282,285): warning: Type argument for type parameter 'T' cannot be inferred because it has incompatible upper bounds: kotlin.String, kotlin.Number (multiple incompatible classes). This will become an error in Kotlin 2.0.
|
||||
|
||||
/kt48765.kt:(345,351): warning: Type 'kotlin/String' is final, so the value of the type parameter is predetermined.
|
||||
/kt48765.kt:(345,351): warning: Type 'kotlin.String' is final, so the value of the type parameter is predetermined.
|
||||
|
||||
/kt48765.kt:(379,383): warning: Unchecked cast of 'kotlin/String' to 'T'.
|
||||
/kt48765.kt:(379,383): warning: Unchecked cast of 'kotlin.String' to 'T'.
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
/kt49661.fir.kt:(243,244): warning: Type argument for type parameter 'T' cannot be inferred because it has incompatible upper bounds: Foo, kotlin/Int (multiple incompatible classes). This will become an error in Kotlin 2.0.
|
||||
/kt49661.fir.kt:(243,244): warning: Type argument for type parameter 'T' cannot be inferred because it has incompatible upper bounds: Foo, kotlin.Int (multiple incompatible classes). This will become an error in Kotlin 2.0.
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
/main.kt:(98,103): error: Argument type mismatch: actual type is 'V', but 'V & Any' was expected.
|
||||
|
||||
/main.kt:(119,120): error: Argument type mismatch: actual type is 'kotlin/collections/List<V>', but 'kotlin/collections/(Mutable)List<@NotNull() V & Any>' was expected.
|
||||
/main.kt:(119,120): error: Argument type mismatch: actual type is 'kotlin.collections.List<V>', but 'kotlin.collections.(Mutable)List<@NotNull() V & Any>' was expected.
|
||||
|
||||
/main.kt:(133,138): error: Argument type mismatch: actual type is 'V', but 'E & Any' was expected.
|
||||
|
||||
/main.kt:(154,155): error: Argument type mismatch: actual type is 'kotlin/collections/List<V>', but 'kotlin/collections/(Mutable)List<@NotNull() E & Any>' was expected.
|
||||
/main.kt:(154,155): error: Argument type mismatch: actual type is 'kotlin.collections.List<V>', but 'kotlin.collections.(Mutable)List<@NotNull() E & Any>' was expected.
|
||||
|
||||
@@ -7,6 +7,6 @@ fun main(args: Array<String>) {
|
||||
var intVar: Int? = 1
|
||||
var byteVar: Byte? = 1
|
||||
|
||||
intFun(<!ARGUMENT_TYPE_MISMATCH("kotlin/Int; kotlin/Int?")!>intVar?.toInt()<!>)
|
||||
byteFun(<!ARGUMENT_TYPE_MISMATCH("kotlin/Byte; kotlin/Byte?")!>byteVar?.toByte()<!>)
|
||||
intFun(<!ARGUMENT_TYPE_MISMATCH("kotlin.Int; kotlin.Int?")!>intVar?.toInt()<!>)
|
||||
byteFun(<!ARGUMENT_TYPE_MISMATCH("kotlin.Byte; kotlin.Byte?")!>byteVar?.toByte()<!>)
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ class A() {
|
||||
field = <!ASSIGNMENT_TYPE_MISMATCH!>value<!>
|
||||
}
|
||||
val y: Int
|
||||
get(): <!WRONG_GETTER_RETURN_TYPE("kotlin/Int; kotlin/String")!>String<!> = "s"
|
||||
get(): <!WRONG_GETTER_RETURN_TYPE("kotlin.Int; kotlin.String")!>String<!> = "s"
|
||||
val z: Int
|
||||
get() {
|
||||
return <!RETURN_TYPE_MISMATCH!>"s"<!>
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ fun testElvis(a: Int?, b: Int?) {
|
||||
if (a != null) {
|
||||
doInt(b ?: a)
|
||||
}
|
||||
<!INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION("T; a/A, kotlin/Int; final class and interface")!>doList<!>(getList() ?: emptyListOfA()) //should be an error
|
||||
<!INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION("T; a.A, kotlin.Int; final class and interface")!>doList<!>(getList() ?: emptyListOfA()) //should be an error
|
||||
doList(getList() ?: strangeList { doInt(it) }) //lambda was not analyzed
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ fun <T: A> emptyNullableListOfA(): List<T>? = null
|
||||
//-------------------------------
|
||||
|
||||
fun testExclExcl() {
|
||||
<!INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION("T; a/A, kotlin/Int; final class and interface")!>doList<!>(emptyNullableListOfA()!!) //should be an error here
|
||||
<!INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION("T; a.A, kotlin.Int; final class and interface")!>doList<!>(emptyNullableListOfA()!!) //should be an error here
|
||||
val l: List<Int> = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.List<a.A & kotlin.Int>")!>id(<!INFERRED_TYPE_VARIABLE_INTO_POSSIBLE_EMPTY_INTERSECTION!>emptyNullableListOfA<!>()!!)<!>
|
||||
|
||||
doList(strangeNullableList { doInt(it) }!!) //lambda should be analyzed (at completion phase)
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
/B.kt:(133,134): error: Smart cast to 'kotlin/String' is impossible, because 'x' is a public API property declared in different module.
|
||||
/B.kt:(133,134): error: Smart cast to 'kotlin.String' is impossible, because 'x' is a public API property declared in different module.
|
||||
|
||||
/B.kt:(265,268): error: Smart cast to 'kotlin/String' is impossible, because 'x' is a public API property declared in different module.
|
||||
/B.kt:(265,268): error: Smart cast to 'kotlin.String' is impossible, because 'x' is a public API property declared in different module.
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
fun <T> foo(it: @kotlin.internal.Exact T) {}
|
||||
|
||||
fun main() {
|
||||
foo<Any>(<!ARGUMENT_TYPE_MISMATCH("kotlin/Any; kotlin/String")!>""<!>)
|
||||
foo<Any>(<!ARGUMENT_TYPE_MISMATCH("kotlin.Any; kotlin.String")!>""<!>)
|
||||
}
|
||||
|
||||
interface I
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
/upperBoundViolated2.fir.kt:(111,123): error: Type argument is not within its bounds: should be subtype of 'kotlin/collections/List<kotlin/CharSequence>'.
|
||||
/upperBoundViolated2.fir.kt:(111,123): error: Type argument is not within its bounds: should be subtype of 'kotlin.collections.List<kotlin.CharSequence>'.
|
||||
|
||||
+2
-2
@@ -5,10 +5,10 @@ build:
|
||||
[mkdir] Created dir: [Temp]/classes
|
||||
[javac] Compiling 2 source files to [Temp]/classes
|
||||
[javac] Compiling [[TestData]] => [[Temp]/classes]
|
||||
[javac] [TestData]/literals.kt:6:9: error: argument type mismatch: actual type is 'kotlin/FloatArray', but 'kotlin/IntArray' was expected.
|
||||
[javac] [TestData]/literals.kt:6:9: error: argument type mismatch: actual type is 'kotlin.FloatArray', but 'kotlin.IntArray' was expected.
|
||||
[javac] @AnnInt([1, 2])
|
||||
[javac] ^
|
||||
[javac] [TestData]/literals.kt:9:9: error: argument type mismatch: actual type is 'kotlin/FloatArray', but 'kotlin/IntArray' was expected.
|
||||
[javac] [TestData]/literals.kt:9:9: error: argument type mismatch: actual type is 'kotlin.FloatArray', but 'kotlin.IntArray' was expected.
|
||||
[javac] @AnnInt(intArrayOf(1, 2))
|
||||
[javac] ^
|
||||
|
||||
|
||||
Reference in New Issue
Block a user