mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 08:51:02 +07:00
[jvm] IDEA-269740 TestOnlyInspection add test for use-site targets
GitOrigin-RevId: fabc6ddc59d0c14d2c91722cd3dc9f26c21757a6
This commit is contained in:
committed by
intellij-monorepo-bot
parent
751f6ca133
commit
db7e4cb2ec
@@ -0,0 +1,21 @@
|
||||
package test
|
||||
|
||||
import org.jetbrains.annotations.TestOnly
|
||||
import org.jetbrains.annotations.VisibleForTesting
|
||||
|
||||
// IDEA-269740 need better support for UAST properties
|
||||
@get:[TestOnly VisibleForTesting]
|
||||
val x = 0
|
||||
|
||||
@get:[TestOnly]
|
||||
val y = 0
|
||||
|
||||
@get:TestOnly
|
||||
val z = 0
|
||||
|
||||
fun doSomething(q: Int) = q
|
||||
|
||||
fun main() {
|
||||
doSomething(<warning descr="Test-only method is called in production code">y</warning>)
|
||||
doSomething(<warning descr="Test-only method is called in production code">z</warning>)
|
||||
}
|
||||
Reference in New Issue
Block a user