Fix FIR IDE highlighting tests
This commit is contained in:
+2
-2
@@ -1,8 +1,8 @@
|
||||
@file:kotlin.Deprecated("message")
|
||||
<error descr="[WRONG_ANNOTATION_TARGET_WITH_USE_SITE_TARGET] This annotation is not applicable to target 'file' and use site target '@file'">@file:kotlin.Deprecated("message")</error>
|
||||
@file:Suppress(<error descr="[UNRESOLVED_REFERENCE] Unresolved reference: BAR">BAR</error>)
|
||||
@file:Suppress(BAZ)
|
||||
|
||||
@<error descr="Expecting \"file:\" prefix for file annotations">k</error>otlin.Deprecated("message")
|
||||
<error descr="[WRONG_ANNOTATION_TARGET] This annotation is not applicable to target 'file'">@<error descr="Expecting \"file:\" prefix for file annotations">k</error>otlin.Deprecated("message")</error>
|
||||
@<error descr="Expecting \"file:\" prefix for file annotations">S</error>uppress(<error descr="[UNRESOLVED_REFERENCE] Unresolved reference: BAR">BAR</error>)
|
||||
@<error descr="Expecting \"file:\" prefix for file annotations">S</error>uppress(BAZ)
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ fun f(): Unit {
|
||||
x in 1..2
|
||||
|
||||
val y : Boolean? = true
|
||||
false || y
|
||||
y && true
|
||||
y && 1
|
||||
false || <error descr="[CONDITION_TYPE_MISMATCH] Condition type mismatch: inferred type is kotlin/Boolean? but Boolean was expected">y</error>
|
||||
<error descr="[CONDITION_TYPE_MISMATCH] Condition type mismatch: inferred type is kotlin/Boolean? but Boolean was expected">y</error> && true
|
||||
<error descr="[CONDITION_TYPE_MISMATCH] Condition type mismatch: inferred type is kotlin/Boolean? but Boolean was expected">y</error> && <error descr="[CONDITION_TYPE_MISMATCH] Condition type mismatch: inferred type is kotlin/Int but Boolean was expected">1</error>
|
||||
}
|
||||
|
||||
+2
-2
@@ -72,9 +72,9 @@ fun test(notRange1: NotRange1, notRange2: NotRange2, notRange3: NotRange3, notRa
|
||||
for (i in <error descr="[HAS_NEXT_MISSING] "><error descr="[NEXT_MISSING] ">notRange2</error></error>);
|
||||
for (i in <error descr="[NEXT_MISSING] ">notRange3</error>);
|
||||
for (i in <error descr="[HAS_NEXT_MISSING] ">notRange4</error>);
|
||||
for (i in notRange5);
|
||||
<error descr="[CONDITION_TYPE_MISMATCH] Condition type mismatch: inferred type is kotlin/Int but Boolean was expected">for (i in notRange5)</error>;
|
||||
for (i in notRange6);
|
||||
for (i in notRange7);
|
||||
<error descr="[CONDITION_TYPE_MISMATCH] Condition type mismatch: inferred type is kotlin/Int but Boolean was expected">for (i in notRange7)</error>;
|
||||
for (i in range0);
|
||||
for (i in range1);
|
||||
|
||||
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
// RUNTIME
|
||||
@JvmStatic
|
||||
<error descr="[WRONG_ANNOTATION_TARGET] This annotation is not applicable to target 'class'">@JvmStatic</error>
|
||||
class A {
|
||||
@JvmStatic
|
||||
<error descr="[WRONG_ANNOTATION_TARGET] This annotation is not applicable to target 'companion object'">@JvmStatic</error>
|
||||
companion object {
|
||||
@JvmStatic fun a1() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
<error descr="[WRONG_ANNOTATION_TARGET] This annotation is not applicable to target 'object'">@JvmStatic</error>
|
||||
object A {
|
||||
@JvmStatic fun a2() {
|
||||
|
||||
@@ -28,7 +28,7 @@ class A {
|
||||
}
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
<error descr="[WRONG_ANNOTATION_TARGET] This annotation is not applicable to target 'interface'">@JvmStatic</error>
|
||||
interface B {
|
||||
companion object {
|
||||
@JvmStatic fun a1() {
|
||||
|
||||
+2
-2
@@ -107,7 +107,7 @@ fun t7() : Int {
|
||||
return 1
|
||||
2
|
||||
}
|
||||
catch (<error descr="[TYPE_MISMATCH] Type mismatch: inferred type is kotlin/Any but kotlin/Throwable was expected">e : Any</error>) {
|
||||
catch (<error descr="[THROWABLE_TYPE_MISMATCH] Throwable type mismatch: actual type is kotlin/Any">e : Any</error>) {
|
||||
2
|
||||
}
|
||||
return 1 // this is OK, like in Java
|
||||
@@ -118,7 +118,7 @@ fun t8() : Int {
|
||||
return 1
|
||||
2
|
||||
}
|
||||
catch (<error descr="[TYPE_MISMATCH] Type mismatch: inferred type is kotlin/Any but kotlin/Throwable was expected">e : Any</error>) {
|
||||
catch (<error descr="[THROWABLE_TYPE_MISMATCH] Throwable type mismatch: actual type is kotlin/Any">e : Any</error>) {
|
||||
return 1
|
||||
2
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
fun <K, V> intercept(block: (@A K, (K) -> V) -> V) {
|
||||
fun <K, V> intercept(block: (<error descr="[WRONG_ANNOTATION_TARGET] This annotation is not applicable to target 'type usage'">@A</error> K, (K) -> V) -> V) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user