Don't create NamespaceType for enum entries
Enum entry expressions have the type of their enum, so it shouldn't be possible to access static nested classes of enum entries from outside. This fixes BlackBoxCodegenTestGenerated$CallableReference.testEnumNameMethod
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
enum class E {
|
||||
FIRST
|
||||
SECOND {
|
||||
class A
|
||||
}
|
||||
}
|
||||
|
||||
val foo: Any.() -> Unit = {}
|
||||
|
||||
fun f1() = E.FIRST.foo()
|
||||
fun f2() = E.FIRST.(foo)()
|
||||
fun f3() = E.SECOND.foo()
|
||||
fun f4() = E.SECOND.(foo)()
|
||||
fun f5() = E.SECOND.<!UNRESOLVED_REFERENCE!>A<!>()
|
||||
Reference in New Issue
Block a user