KT-16264 Forbid usage of _ without backticks
Forbid underscore-only (_, __, ___, ...) names as callees and as types. If CHECK_TYPE directive is on, filter out UNDERSCORE_USAGE_WITHOUT_BACKTICKS messages.
This commit is contained in:
@@ -10,5 +10,5 @@ fun box() : String {
|
||||
|
||||
val (`_`, c) = A()
|
||||
|
||||
return if (a == 1 && b == 2 && _ == 1 && c == 2) "OK" else "fail"
|
||||
return if (a == 1 && b == 2 && `_` == 1 && c == 2) "OK" else "fail"
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ fun doTest(): String {
|
||||
}
|
||||
|
||||
for ((_, `_`) in C(2)..C(4)) {
|
||||
s += "$_;"
|
||||
s += "$`_`;"
|
||||
}
|
||||
|
||||
return s
|
||||
|
||||
Reference in New Issue
Block a user