[FIR] Fix exposed visibility checking for enum entries

This commit is contained in:
Mikhail Glukhikh
2020-08-20 13:01:22 +03:00
parent e15e87fded
commit 8e2c5bf4fe
3 changed files with 36 additions and 1 deletions
@@ -6,4 +6,12 @@ class A {
abstract class B {
fun <!EXPOSED_FUNCTION_RETURN_TYPE!>foo<!>(str: String): A.InnerA
}
}
private enum class Some {
FIRST {
override fun foo(): Some = FIRST
};
abstract fun foo(): Some
}
@@ -20,3 +20,28 @@ FILE: exposedFunctionReturnType.kt
public final fun foo(str: R|kotlin/String|): R|A.InnerA|
}
private final enum class Some : R|kotlin/Enum<Some>| {
private constructor(): R|Some| {
super<R|kotlin/Enum<Some>|>()
}
public final static enum entry FIRST: R|Some| = object : R|Some| {
private constructor(): R|<anonymous>| {
super<R|Some|>()
}
public final override fun foo(): R|Some| {
^foo R|/Some.FIRST|
}
}
public abstract fun foo(): R|Some|
public final static fun values(): R|kotlin/Array<Some>| {
}
public final static fun valueOf(value: R|kotlin/String|): R|Some| {
}
}