Files
kotlin-fork/js/js.translator/testData/enum/cases/equals.kt
T
Zalim Bashorov 6aaccae6a9 JS backend: compare enum entries strictly
#KT-7840 fixed
2015-06-03 23:09:16 +03:00

21 lines
342 B
Kotlin
Vendored

package foo
enum class Foo {
A,
B
}
fun box(): String {
testFalse { Foo.A == Foo.B }
testTrue { Foo.A != Foo.B }
testTrue { Foo.A == Foo.A }
testFalse { Foo.A != Foo.A }
testFalse { Foo.A == null }
testTrue { Foo.A != null }
testFalse { null == Foo.A }
testTrue { null != Foo.A }
return "OK"
}