UnusedUnaryOperatorInspection: shouldn't report on annotation entry

#KT-37294 Fixed
This commit is contained in:
Dmitry Gridin
2020-03-12 15:32:24 +07:00
parent fded6fb494
commit 80caa063b3
6 changed files with 53 additions and 0 deletions
@@ -0,0 +1,6 @@
// PROBLEM: none
@Target(AnnotationTarget.VALUE_PARAMETER)
annotation class Range(val min: Long = 0)
fun foo(@Range(min = -<caret>90L) x: Int) {}
@@ -0,0 +1,7 @@
// PROBLEM: none
@Target(AnnotationTarget.FUNCTION)
annotation class Range(val min: Long = 0)
@Range(min = -<caret>90L)
fun foo(x: Int) {}
@@ -0,0 +1,6 @@
// PROBLEM: none
@Target(AnnotationTarget.VALUE_PARAMETER)
annotation class Range(val min: Long = 0)
fun foo(@Range(min = -(-<caret>90L)) x: Int) {}
@@ -0,0 +1,6 @@
// PROBLEM: none
fun a(a: Int) = Unit
fun b() {
a(a = -<caret>1)
}