Files
kotlin-fork/compiler/testData/diagnostics/tests/redeclarations/kt2418.kt
T
Vyacheslav Gerasimov bcefa68df0 Always checkout/checkin text files with lf endings
Different line endings on linux/windows prevents gradle from reusing
build cache since endings make task inputs completely different between
systems
2020-03-18 22:33:15 +03:00

28 lines
375 B
Kotlin
Vendored

//KT-2418 Front-end allows enum constants with same name
package kt2418
enum class A {
<!REDECLARATION!>FOO<!>,
<!REDECLARATION!>FOO<!>
}
enum class B {
FOO;
fun FOO() {}
}
enum class C {
<!REDECLARATION!>FOO<!>;
val <!REDECLARATION!>FOO<!> = 1
}
enum class D {
<!REDECLARATION!>FOO<!>;
class <!REDECLARATION!>FOO<!> {}
}