FE 1.0: deprecate resolve to property when enum entry is at same level
See also KT-52802 #KT-49200 Fixed
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
||||
/test.kt:26:9: warning: ambiguous access to property 'first.KtNodeTypes.SOME' is deprecated because similar enum entry 'second.SomeEnum.SOME' is available. Please add explicit named import or use fully qualified name
|
||||
SOME -> true
|
||||
^
|
||||
@@ -1,4 +1,5 @@
|
||||
// KT-49200
|
||||
// !RENDER_DIAGNOSTICS_FULL_TEXT
|
||||
// FILE: first/KtNodeTypes.java
|
||||
|
||||
package first;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// KT-49200
|
||||
// !RENDER_DIAGNOSTICS_FULL_TEXT
|
||||
// FILE: first/KtNodeTypes.java
|
||||
|
||||
package first;
|
||||
@@ -22,7 +23,7 @@ import second.SomeEnum.*
|
||||
|
||||
fun test(arg: String): Boolean {
|
||||
return when (arg) {
|
||||
SOME -> true
|
||||
<!DEPRECATED_RESOLVE_WITH_AMBIGUOUS_ENUM_ENTRY!>SOME<!> -> true
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user