[FIR] Introduce a feature flag for context-sensitive enum resolution
The feature was previously enabled unconditionally in K2 which triggered a bug when an enum has an entry with the same name as itself. #KT-58897 Fixed #KT-52774
This commit is contained in:
committed by
Space Team
parent
4b643480d6
commit
cf2ef443f4
@@ -1,3 +1,4 @@
|
||||
// LANGUAGE: +ContextSensitiveEnumResolutionInWhen
|
||||
// FILE: JavaEnum.java
|
||||
|
||||
public enum JavaEnum {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// LANGUAGE: +ContextSensitiveEnumResolutionInWhen
|
||||
// FILE: JavaEnum.java
|
||||
|
||||
public enum JavaEnum {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// LANGUAGE: +ContextSensitiveEnumResolutionInWhen
|
||||
enum class Outer {
|
||||
FIRST, SECOND;
|
||||
}
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// LANGUAGE: +ContextSensitiveEnumResolutionInWhen
|
||||
enum class Some {
|
||||
FIRST,
|
||||
SECOND;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// LANGUAGE: +ContextSensitiveEnumResolutionInWhen
|
||||
// FILE: first.kt
|
||||
|
||||
package first
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// LANGUAGE: +ContextSensitiveEnumResolutionInWhen
|
||||
enum class Some {
|
||||
FIRST,
|
||||
SECOND;
|
||||
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// LANGUAGE: +ContextSensitiveEnumResolutionInWhen
|
||||
package test
|
||||
|
||||
enum class Sample {
|
||||
|
||||
Reference in New Issue
Block a user