K2: introduce prioritized enum entries resolve by a 2.1 feature
Related to KT-48872
This commit is contained in:
committed by
Space Team
parent
b92f1e2036
commit
905e1dcd3b
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +EnumEntries
|
||||
// !LANGUAGE: +EnumEntries -PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +EnumEntries
|
||||
// !LANGUAGE: +EnumEntries -PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// !LANGUAGE: +EnumEntries +PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
enum class E {
|
||||
;
|
||||
|
||||
val entries: Int = 0
|
||||
}
|
||||
|
||||
fun test() {
|
||||
E::entries
|
||||
val ref = E::entries
|
||||
val refType: (E) -> Int = E::entries
|
||||
val refTypeWithAnyExpectedType: Any = E::entries
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
FILE: conflictingPropertyEntriesAndReferencePrioritized.fir.kt
|
||||
public final enum class E : R|kotlin/Enum<E>| {
|
||||
private constructor(): R|E| {
|
||||
super<R|kotlin/Enum<E>|>()
|
||||
}
|
||||
|
||||
public final val entries: R|kotlin/Int| = Int(0)
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
public final static fun values(): R|kotlin/Array<E>| {
|
||||
}
|
||||
|
||||
public final static fun valueOf(value: R|kotlin/String|): R|E| {
|
||||
}
|
||||
|
||||
public final static val entries: R|kotlin/enums/EnumEntries<E>|
|
||||
public get(): R|kotlin/enums/EnumEntries<E>|
|
||||
|
||||
}
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
Q|E|::R|/E.entries*s|
|
||||
lval ref: R|kotlin/reflect/KProperty0<kotlin/enums/EnumEntries<E>>| = Q|E|::R|/E.entries*s|
|
||||
lval refType: R|(E) -> kotlin/Int| = Q|E|::R|/E.entries|
|
||||
lval refTypeWithAnyExpectedType: R|kotlin/Any| = Q|E|::R|/E.entries*s|
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// !LANGUAGE: +EnumEntries +PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
enum class E {
|
||||
;
|
||||
|
||||
val entries: Int = 0
|
||||
}
|
||||
|
||||
fun test() {
|
||||
E::<!DEPRECATED_ACCESS_TO_ENUM_ENTRY_PROPERTY_AS_REFERENCE!>entries<!>
|
||||
val ref = E::<!DEPRECATED_ACCESS_TO_ENUM_ENTRY_PROPERTY_AS_REFERENCE!>entries<!>
|
||||
val refType: (E) -> Int = E::entries
|
||||
val refTypeWithAnyExpectedType: Any = E::<!DEPRECATED_ACCESS_TO_ENUM_ENTRY_PROPERTY_AS_REFERENCE!>entries<!>
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +EnumEntries
|
||||
// !LANGUAGE: +EnumEntries -PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +EnumEntries
|
||||
// !LANGUAGE: +EnumEntries -PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
|
||||
Vendored
+30
@@ -0,0 +1,30 @@
|
||||
// !LANGUAGE: +EnumEntries +PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
package pckg
|
||||
|
||||
enum class A {
|
||||
;
|
||||
|
||||
companion object
|
||||
}
|
||||
|
||||
val A.Companion.entries: Int get() = 0
|
||||
|
||||
fun test() {
|
||||
A.entries
|
||||
A.Companion.entries
|
||||
|
||||
with(A) {
|
||||
this.entries
|
||||
entries
|
||||
}
|
||||
|
||||
with(A.Companion) {
|
||||
entries
|
||||
}
|
||||
|
||||
val aCompanion = A.Companion
|
||||
aCompanion.entries
|
||||
}
|
||||
Vendored
+44
@@ -0,0 +1,44 @@
|
||||
FILE: entriesPropertyAsExtensionClashPrioritized.fir.kt
|
||||
package pckg
|
||||
|
||||
public final enum class A : R|kotlin/Enum<pckg/A>| {
|
||||
private constructor(): R|pckg/A| {
|
||||
super<R|kotlin/Enum<pckg/A>|>()
|
||||
}
|
||||
|
||||
public final companion object Companion : R|kotlin/Any| {
|
||||
private constructor(): R|pckg/A.Companion| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public final static fun values(): R|kotlin/Array<pckg/A>| {
|
||||
}
|
||||
|
||||
public final static fun valueOf(value: R|kotlin/String|): R|pckg/A| {
|
||||
}
|
||||
|
||||
public final static val entries: R|kotlin/enums/EnumEntries<pckg/A>|
|
||||
public get(): R|kotlin/enums/EnumEntries<pckg/A>|
|
||||
|
||||
}
|
||||
public final val R|pckg/A.Companion|.entries: R|kotlin/Int|
|
||||
public get(): R|kotlin/Int| {
|
||||
^ Int(0)
|
||||
}
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
Q|pckg/A|.R|pckg/A.entries*s|
|
||||
Q|pckg/A.Companion|.R|pckg/entries|
|
||||
R|kotlin/with|<R|pckg/A.Companion|, R|kotlin/Int|>(Q|pckg/A|, <L> = with@fun R|pckg/A.Companion|.<anonymous>(): R|kotlin/Int| <inline=Inline, kind=EXACTLY_ONCE> {
|
||||
this@R|special/anonymous|.R|pckg/entries|
|
||||
^ this@R|special/anonymous|.R|pckg/entries|
|
||||
}
|
||||
)
|
||||
R|kotlin/with|<R|pckg/A.Companion|, R|kotlin/Int|>(Q|pckg/A.Companion|, <L> = with@fun R|pckg/A.Companion|.<anonymous>(): R|kotlin/Int| <inline=Inline, kind=EXACTLY_ONCE> {
|
||||
^ this@R|special/anonymous|.R|pckg/entries|
|
||||
}
|
||||
)
|
||||
lval aCompanion: R|pckg/A.Companion| = Q|pckg/A.Companion|
|
||||
R|<local>/aCompanion|.R|pckg/entries|
|
||||
}
|
||||
Vendored
+30
@@ -0,0 +1,30 @@
|
||||
// !LANGUAGE: +EnumEntries +PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
package pckg
|
||||
|
||||
enum class A {
|
||||
;
|
||||
|
||||
companion object
|
||||
}
|
||||
|
||||
val A.Companion.entries: Int get() = 0
|
||||
|
||||
fun test() {
|
||||
A.<!DEPRECATED_ACCESS_TO_ENUM_ENTRY_COMPANION_PROPERTY!>entries<!>
|
||||
A.Companion.entries
|
||||
|
||||
with(A) {
|
||||
this.entries
|
||||
entries
|
||||
}
|
||||
|
||||
with(A.Companion) {
|
||||
entries
|
||||
}
|
||||
|
||||
val aCompanion = A.Companion
|
||||
aCompanion.entries
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +EnumEntries
|
||||
// !LANGUAGE: +EnumEntries -PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +EnumEntries
|
||||
// !LANGUAGE: +EnumEntries -PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
// !LANGUAGE: +EnumEntries +PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
package foo
|
||||
|
||||
import foo.A.Companion.entries
|
||||
|
||||
enum class A {
|
||||
;
|
||||
|
||||
companion object {
|
||||
val entries = 0
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
A.entries
|
||||
|
||||
with(A) {
|
||||
entries
|
||||
}
|
||||
}
|
||||
Vendored
+35
@@ -0,0 +1,35 @@
|
||||
FILE: entriesPropertyImportedClashPrioritized.fir.kt
|
||||
package foo
|
||||
|
||||
public final enum class A : R|kotlin/Enum<foo/A>| {
|
||||
private constructor(): R|foo/A| {
|
||||
super<R|kotlin/Enum<foo/A>|>()
|
||||
}
|
||||
|
||||
public final companion object Companion : R|kotlin/Any| {
|
||||
private constructor(): R|foo/A.Companion| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val entries: R|kotlin/Int| = Int(0)
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
}
|
||||
|
||||
public final static fun values(): R|kotlin/Array<foo/A>| {
|
||||
}
|
||||
|
||||
public final static fun valueOf(value: R|kotlin/String|): R|foo/A| {
|
||||
}
|
||||
|
||||
public final static val entries: R|kotlin/enums/EnumEntries<foo/A>|
|
||||
public get(): R|kotlin/enums/EnumEntries<foo/A>|
|
||||
|
||||
}
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
Q|foo/A|.R|foo/A.entries*s|
|
||||
R|kotlin/with|<R|foo/A.Companion|, R|kotlin/Int|>(Q|foo/A|, <L> = with@fun R|foo/A.Companion|.<anonymous>(): R|kotlin/Int| <inline=Inline, kind=EXACTLY_ONCE> {
|
||||
^ this@R|special/anonymous|.R|foo/A.Companion.entries|
|
||||
}
|
||||
)
|
||||
}
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
// !LANGUAGE: +EnumEntries +PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
package foo
|
||||
|
||||
import foo.A.Companion.entries
|
||||
|
||||
enum class A {
|
||||
;
|
||||
|
||||
companion object {
|
||||
val entries = 0
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
A.<!DEPRECATED_ACCESS_TO_ENUM_ENTRY_COMPANION_PROPERTY!>entries<!>
|
||||
|
||||
with(A) {
|
||||
entries
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +EnumEntries
|
||||
// !LANGUAGE: +EnumEntries -PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +EnumEntries
|
||||
// !LANGUAGE: +EnumEntries -PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +EnumEntries
|
||||
// !LANGUAGE: +EnumEntries -PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +EnumEntries
|
||||
// !LANGUAGE: +EnumEntries -PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
|
||||
compiler/testData/diagnostics/tests/enum/entries/entriesPropertyWithJvmStaticClashPrioritized.fir.kt
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
// !LANGUAGE: +EnumEntries +PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
enum class A {
|
||||
;
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
val entries = 0
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
A.entries
|
||||
|
||||
with(A) {
|
||||
entries
|
||||
}
|
||||
|
||||
A.Companion.entries
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
FILE: entriesPropertyWithJvmStaticClashPrioritized.fir.kt
|
||||
public final enum class A : R|kotlin/Enum<A>| {
|
||||
private constructor(): R|A| {
|
||||
super<R|kotlin/Enum<A>|>()
|
||||
}
|
||||
|
||||
public final companion object Companion : R|kotlin/Any| {
|
||||
private constructor(): R|A.Companion| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
@R|kotlin/jvm/JvmStatic|() public final val entries: R|kotlin/Int| = Int(0)
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
}
|
||||
|
||||
public final static fun values(): R|kotlin/Array<A>| {
|
||||
}
|
||||
|
||||
public final static fun valueOf(value: R|kotlin/String|): R|A| {
|
||||
}
|
||||
|
||||
public final static val entries: R|kotlin/enums/EnumEntries<A>|
|
||||
public get(): R|kotlin/enums/EnumEntries<A>|
|
||||
|
||||
}
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
Q|A|.R|/A.entries*s|
|
||||
R|kotlin/with|<R|A.Companion|, R|kotlin/Int|>(Q|A|, <L> = with@fun R|A.Companion|.<anonymous>(): R|kotlin/Int| <inline=Inline, kind=EXACTLY_ONCE> {
|
||||
^ this@R|special/anonymous|.R|/A.Companion.entries|
|
||||
}
|
||||
)
|
||||
Q|A.Companion|.R|/A.Companion.entries|
|
||||
}
|
||||
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
// !LANGUAGE: +EnumEntries +PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
enum class A {
|
||||
;
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
val entries = 0
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
A.<!DEPRECATED_ACCESS_TO_ENUM_ENTRY_COMPANION_PROPERTY!>entries<!>
|
||||
|
||||
with(A) {
|
||||
entries
|
||||
}
|
||||
|
||||
A.Companion.entries
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +EnumEntries
|
||||
// !LANGUAGE: +EnumEntries -PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +EnumEntries
|
||||
// !LANGUAGE: +EnumEntries -PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +EnumEntries
|
||||
// !LANGUAGE: +EnumEntries -PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +EnumEntries
|
||||
// !LANGUAGE: +EnumEntries -PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +EnumEntries
|
||||
// !LANGUAGE: +EnumEntries -PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +EnumEntries
|
||||
// !LANGUAGE: +EnumEntries -PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +EnumEntries
|
||||
// !LANGUAGE: +EnumEntries -PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +EnumEntries
|
||||
// !LANGUAGE: +EnumEntries -PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
// !LANGUAGE: +EnumEntries +PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
package pckg
|
||||
|
||||
val entries = "E"
|
||||
|
||||
enum class E {
|
||||
;
|
||||
|
||||
fun foo() {
|
||||
entries.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
pckg.entries.length
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
enum class E {
|
||||
;
|
||||
|
||||
class B {
|
||||
fun foo() {
|
||||
entries.<!UNRESOLVED_REFERENCE!>length<!>
|
||||
pckg.entries.length
|
||||
}
|
||||
}
|
||||
|
||||
class C {
|
||||
val entries = 0
|
||||
|
||||
fun foo() {
|
||||
// technically, this warning is incorrect but I believe it's OK to report anyway
|
||||
// first, logic in the compiler will be complicated if we'll try to avoid reporting warnings here
|
||||
// second, this code smells, it'd be better to use qualifiers here anyway
|
||||
entries + 4
|
||||
this.entries + 4
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
FILE: nameShadowingOfExternallyDefinedEntriesPrioritized.fir.kt
|
||||
package pckg
|
||||
|
||||
public final val entries: R|kotlin/String| = String(E)
|
||||
public get(): R|kotlin/String|
|
||||
public final enum class E : R|kotlin/Enum<pckg/E>| {
|
||||
private constructor(): R|pckg/E| {
|
||||
super<R|kotlin/Enum<pckg/E>|>()
|
||||
}
|
||||
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
R|pckg/E.entries*s|.<Unresolved name: length>#
|
||||
Q|pckg|.R|pckg/entries|.R|kotlin/String.length|
|
||||
}
|
||||
|
||||
public final static fun values(): R|kotlin/Array<pckg/E>| {
|
||||
}
|
||||
|
||||
public final static fun valueOf(value: R|kotlin/String|): R|pckg/E| {
|
||||
}
|
||||
|
||||
public final static val entries: R|kotlin/enums/EnumEntries<pckg/E>|
|
||||
public get(): R|kotlin/enums/EnumEntries<pckg/E>|
|
||||
|
||||
}
|
||||
public final class A : R|kotlin/Any| {
|
||||
public constructor(): R|pckg/A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final enum class E : R|kotlin/Enum<pckg/A.E>| {
|
||||
private constructor(): R|pckg/A.E| {
|
||||
super<R|kotlin/Enum<pckg/A.E>|>()
|
||||
}
|
||||
|
||||
public final class B : R|kotlin/Any| {
|
||||
public constructor(): R|pckg/A.E.B| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
R|pckg/A.E.entries*s|.<Unresolved name: length>#
|
||||
Q|pckg|.R|pckg/entries|.R|kotlin/String.length|
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public final class C : R|kotlin/Any| {
|
||||
public constructor(): R|pckg/A.E.C| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val entries: R|kotlin/Int| = Int(0)
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
this@R|pckg/A.E.C|.R|pckg/A.E.C.entries|.R|kotlin/Int.plus|(Int(4))
|
||||
this@R|pckg/A.E.C|.R|pckg/A.E.C.entries|.R|kotlin/Int.plus|(Int(4))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public final static fun values(): R|kotlin/Array<pckg/A.E>| {
|
||||
}
|
||||
|
||||
public final static fun valueOf(value: R|kotlin/String|): R|pckg/A.E| {
|
||||
}
|
||||
|
||||
public final static val entries: R|kotlin/enums/EnumEntries<pckg/A.E>|
|
||||
public get(): R|kotlin/enums/EnumEntries<pckg/A.E>|
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
// !LANGUAGE: +EnumEntries +PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
package pckg
|
||||
|
||||
val entries = "E"
|
||||
|
||||
enum class E {
|
||||
;
|
||||
|
||||
fun foo() {
|
||||
<!DEPRECATED_ACCESS_TO_ENTRY_PROPERTY_FROM_ENUM!>entries<!>.length
|
||||
pckg.entries.length
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
enum class E {
|
||||
;
|
||||
|
||||
class B {
|
||||
fun foo() {
|
||||
<!DEPRECATED_ACCESS_TO_ENTRY_PROPERTY_FROM_ENUM!>entries<!>.length
|
||||
pckg.entries.length
|
||||
}
|
||||
}
|
||||
|
||||
class C {
|
||||
val entries = 0
|
||||
|
||||
fun foo() {
|
||||
// technically, this warning is incorrect but I believe it's OK to report anyway
|
||||
// first, logic in the compiler will be complicated if we'll try to avoid reporting warnings here
|
||||
// second, this code smells, it'd be better to use qualifiers here anyway
|
||||
<!DEPRECATED_ACCESS_TO_ENTRY_PROPERTY_FROM_ENUM!>entries<!> + 4
|
||||
this.entries + 4
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +EnumEntries
|
||||
// !LANGUAGE: +EnumEntries -PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
// !LANGUAGE: +EnumEntries
|
||||
// !LANGUAGE: +EnumEntries -PrioritizedEnumEntries
|
||||
// WITH_STDLIB
|
||||
// FIR_DUMP
|
||||
|
||||
|
||||
Reference in New Issue
Block a user