FIR: support WRONG_ANNOTATION_TARGET on expressions

This commit is contained in:
Mikhail Glukhikh
2021-05-13 16:12:02 +03:00
parent 92ab600081
commit d11092ae3c
23 changed files with 103 additions and 44 deletions
@@ -0,0 +1,17 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-313
* PRIMARY LINKS: expressions, when-expression -> paragraph 9 -> sentence 2
* expressions, when-expression -> paragraph 5 -> sentence 1
* expressions, when-expression -> paragraph 6 -> sentence 5
* annotations, annotation-targets -> paragraph 1 -> sentence 1
*/
fun foo(a: Int) {
<!WRONG_ANNOTATION_TARGET!>@ann<!>
when (a) {
1 -> {}
}
}
annotation class ann
@@ -1,4 +1,3 @@
// FIR_IDENTICAL
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*