Fix FIR IDE highlighting tests

This commit is contained in:
Mikhail Glukhikh
2021-05-19 16:40:12 +03:00
parent 6dd41b617a
commit eac6da62d6
6 changed files with 14 additions and 14 deletions
+2 -2
View File
@@ -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(<error descr="[UNRESOLVED_REFERENCE] Unresolved reference: BAR">BAR</error>)
@file:Suppress(BAZ) @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(<error descr="[UNRESOLVED_REFERENCE] Unresolved reference: BAR">BAR</error>)
@<error descr="Expecting \"file:\" prefix for file annotations">S</error>uppress(BAZ) @<error descr="Expecting \"file:\" prefix for file annotations">S</error>uppress(BAZ)
+3 -3
View File
@@ -25,7 +25,7 @@ fun f(): Unit {
x in 1..2 x in 1..2
val y : Boolean? = true val y : Boolean? = true
false || y false || <error descr="[CONDITION_TYPE_MISMATCH] Condition type mismatch: inferred type is kotlin/Boolean? but Boolean was expected">y</error>
y && true <error descr="[CONDITION_TYPE_MISMATCH] Condition type mismatch: inferred type is kotlin/Boolean? but Boolean was expected">y</error> && true
y && 1 <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
View File
@@ -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="[HAS_NEXT_MISSING] "><error descr="[NEXT_MISSING] ">notRange2</error></error>);
for (i in <error descr="[NEXT_MISSING] ">notRange3</error>); for (i in <error descr="[NEXT_MISSING] ">notRange3</error>);
for (i in <error descr="[HAS_NEXT_MISSING] ">notRange4</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 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 range0);
for (i in range1); for (i in range1);
+4 -4
View File
@@ -1,14 +1,14 @@
// RUNTIME // RUNTIME
@JvmStatic <error descr="[WRONG_ANNOTATION_TARGET] This annotation is not applicable to target 'class'">@JvmStatic</error>
class A { class A {
@JvmStatic <error descr="[WRONG_ANNOTATION_TARGET] This annotation is not applicable to target 'companion object'">@JvmStatic</error>
companion object { companion object {
@JvmStatic fun a1() { @JvmStatic fun a1() {
} }
} }
@JvmStatic <error descr="[WRONG_ANNOTATION_TARGET] This annotation is not applicable to target 'object'">@JvmStatic</error>
object A { object A {
@JvmStatic fun a2() { @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 { interface B {
companion object { companion object {
@JvmStatic fun a1() { @JvmStatic fun a1() {
+2 -2
View File
@@ -107,7 +107,7 @@ fun t7() : Int {
return 1 return 1
2 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 2
} }
return 1 // this is OK, like in Java return 1 // this is OK, like in Java
@@ -118,7 +118,7 @@ fun t8() : Int {
return 1 return 1
2 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 return 1
2 2
} }
@@ -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) {
} }