[FIR] Calculate effective visibility inside anonymous object properly
#KT-38432 Fixed
This commit is contained in:
+3
-3
@@ -51,7 +51,7 @@ FILE: localClassesWithImplicit.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final fun foo(): R|kotlin/Int| {
|
||||
public[local] final fun foo(): R|kotlin/Int| {
|
||||
^foo R|/myRun|<R|kotlin/Int|>(<L> = myRun@fun <anonymous>(): R|kotlin/Int| <kind=UNKNOWN> {
|
||||
R|<local>/a|.R|kotlin/String.length|
|
||||
^ when () {
|
||||
@@ -68,7 +68,7 @@ FILE: localClassesWithImplicit.kt
|
||||
)
|
||||
}
|
||||
|
||||
public final fun bar(): R|kotlin/Int| {
|
||||
public[local] final fun bar(): R|kotlin/Int| {
|
||||
^bar R|/myRun|<R|kotlin/Int|>(<L> = myRun@fun <anonymous>(): R|kotlin/Int| <kind=UNKNOWN> {
|
||||
R|<local>/a|.R|kotlin/String.length|
|
||||
R|<local>/b|.<Unresolved name: length>#
|
||||
@@ -77,7 +77,7 @@ FILE: localClassesWithImplicit.kt
|
||||
)
|
||||
}
|
||||
|
||||
public final fun baz(): R|kotlin/Int| {
|
||||
public[local] final fun baz(): R|kotlin/Int| {
|
||||
^baz Int(1)
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -26,7 +26,7 @@ FILE: enum.kt
|
||||
super<R|SomeEnum|>(Q|O1|)
|
||||
}
|
||||
|
||||
public final override fun check(y: R|Some|): R|kotlin/Boolean| {
|
||||
public[local] final override fun check(y: R|Some|): R|kotlin/Boolean| {
|
||||
^check Boolean(true)
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ FILE: enum.kt
|
||||
super<R|SomeEnum|>(Q|O2|)
|
||||
}
|
||||
|
||||
public final override fun check(y: R|Some|): R|kotlin/Boolean| {
|
||||
public[local] final override fun check(y: R|Some|): R|kotlin/Boolean| {
|
||||
^check ==(R|<local>/y|, Q|O2|)
|
||||
}
|
||||
|
||||
@@ -75,11 +75,11 @@ FILE: enum.kt
|
||||
super<R|EnumClass|>()
|
||||
}
|
||||
|
||||
public final override fun foo(): R|kotlin/Int| {
|
||||
public[local] final override fun foo(): R|kotlin/Int| {
|
||||
^foo Int(1)
|
||||
}
|
||||
|
||||
public final override val bar: R|kotlin/String| = String(a)
|
||||
public[local] final override val bar: R|kotlin/String| = String(a)
|
||||
public get(): R|kotlin/String|
|
||||
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -34,12 +34,12 @@ FILE: CallBasedInExpressionGenerator.kt
|
||||
super<R|ERROR CLASS: Symbol not found, for `BranchedValue`|>(R|<local>/argument|, Null(null), R|<local>/argument|.<Unresolved name: type>#, <Unresolved name: Opcodes>#.<Unresolved name: IFEQ>#)
|
||||
}
|
||||
|
||||
public final override fun putSelector(type: R|ERROR CLASS: Symbol not found, for `Type`|, kotlinType: R|ERROR CLASS: Symbol not found, for `KotlinType?`|, v: R|ERROR CLASS: Symbol not found, for `InstructionAdapter`|): R|kotlin/Unit| {
|
||||
public[local] final override fun putSelector(type: R|ERROR CLASS: Symbol not found, for `Type`|, kotlinType: R|ERROR CLASS: Symbol not found, for `KotlinType?`|, v: R|ERROR CLASS: Symbol not found, for `InstructionAdapter`|): R|kotlin/Unit| {
|
||||
this@R|/anonymous|.R|/anonymous.invokeFunction|(R|<local>/v|)
|
||||
<Unresolved name: coerceTo>#(R|<local>/type|, R|<local>/kotlinType|, R|<local>/v|)
|
||||
}
|
||||
|
||||
public final override fun condJump(jumpLabel: R|ERROR CLASS: Symbol not found, for `Label`|, v: R|ERROR CLASS: Symbol not found, for `InstructionAdapter`|, jumpIfFalse: R|kotlin/Boolean|): R|kotlin/Unit| {
|
||||
public[local] final override fun condJump(jumpLabel: R|ERROR CLASS: Symbol not found, for `Label`|, v: R|ERROR CLASS: Symbol not found, for `InstructionAdapter`|, jumpIfFalse: R|kotlin/Boolean|): R|kotlin/Unit| {
|
||||
this@R|/anonymous|.R|/anonymous.invokeFunction|(R|<local>/v|)
|
||||
R|<local>/v|.<Unresolved name: visitJumpInsn>#(when () {
|
||||
R|<local>/jumpIfFalse| -> {
|
||||
|
||||
@@ -11,7 +11,7 @@ FILE: enumEntryUse.kt
|
||||
super<R|TestEnum|>()
|
||||
}
|
||||
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
public[local] final fun foo(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -5,11 +5,11 @@ FILE: localImplicitBodies.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final fun sss(): R|kotlin/Int| {
|
||||
public[local] final fun sss(): R|kotlin/Int| {
|
||||
^sss this@R|/anonymous|.R|/anonymous.abc|()
|
||||
}
|
||||
|
||||
public final fun abc(): R|kotlin/Int| {
|
||||
public[local] final fun abc(): R|kotlin/Int| {
|
||||
^abc Int(1)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ FILE: localInnerClass.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final fun foo(): R|Foo| {
|
||||
public[local] final fun foo(): R|Foo| {
|
||||
^foo this@R|/anonymous|.R|/<anonymous>.Derived.Derived|(Int(42))
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ FILE: localScopes.kt
|
||||
super<R|Bar|>()
|
||||
}
|
||||
|
||||
public final fun baz(): R|kotlin/Unit| {
|
||||
public[local] final fun baz(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -9,11 +9,11 @@ FILE: foo.kt
|
||||
private get(): R|kotlin/Boolean|
|
||||
private set(value: R|kotlin/Boolean|): R|kotlin/Unit|
|
||||
|
||||
public final fun bar(): R|kotlin/Boolean| {
|
||||
public[local] final fun bar(): R|kotlin/Boolean| {
|
||||
^bar this@R|/anonymous|.R|/anonymous.result|.R|kotlin/Boolean.not|()
|
||||
}
|
||||
|
||||
public final override fun result(): R|kotlin/Boolean| {
|
||||
public[local] final override fun result(): R|kotlin/Boolean| {
|
||||
^result this@R|/anonymous|.R|/anonymous.result|
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -36,16 +36,16 @@ FILE: O.kt
|
||||
super<R|Wrapper|>(this@R|/O.Derived.Some|.R|/O.Derived.Some.z|)
|
||||
}
|
||||
|
||||
public final fun local(): R|kotlin/Unit| {
|
||||
public[local] final fun local(): R|kotlin/Unit| {
|
||||
lval y: R|ft<kotlin/String, kotlin/String?>!| = this@R|/O.Derived|.R|/Base.foo|()
|
||||
}
|
||||
|
||||
public final val oo: R|anonymous| = object : R|kotlin/Any| {
|
||||
public[local] final val oo: R|anonymous| = object : R|kotlin/Any| {
|
||||
private constructor(): R|anonymous| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val zz: R|kotlin/Boolean| = this@R|/O.Derived.Some|.R|/O.Derived.Some.z|
|
||||
public[local] final val zz: R|kotlin/Boolean| = this@R|/O.Derived.Some|.R|/O.Derived.Some.z|
|
||||
public get(): R|kotlin/Boolean|
|
||||
|
||||
}
|
||||
@@ -65,7 +65,7 @@ FILE: O.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final fun local(): R|kotlin/Unit| {
|
||||
public[local] final fun local(): R|kotlin/Unit| {
|
||||
lval y: R|ft<kotlin/String, kotlin/String?>!| = this@R|/O.Derived|.R|/Base.foo|()
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -9,7 +9,7 @@ FILE: privateObjectLiteral.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final fun foo(): R|kotlin/Int| {
|
||||
public[local] final fun foo(): R|kotlin/Int| {
|
||||
^foo Int(42)
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ FILE: privateObjectLiteral.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final fun foo(): R|kotlin/Int| {
|
||||
public[local] final fun foo(): R|kotlin/Int| {
|
||||
^foo Int(13)
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ FILE: enums.kt
|
||||
super<R|Planet|>(Double(1.0), Double(2.0))
|
||||
}
|
||||
|
||||
public final override fun sayHello(): R|kotlin/Unit| {
|
||||
public[local] final override fun sayHello(): R|kotlin/Unit| {
|
||||
<Unresolved name: println>#(String(Hello!!!))
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ FILE: enums.kt
|
||||
super<R|Planet|>(Double(3.0), Double(4.0))
|
||||
}
|
||||
|
||||
public final override fun sayHello(): R|kotlin/Unit| {
|
||||
public[local] final override fun sayHello(): R|kotlin/Unit| {
|
||||
<Unresolved name: println>#(String(Ola!!!))
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ FILE: enums.kt
|
||||
super<R|Planet|>(Double(5.0), Double(6.0))
|
||||
}
|
||||
|
||||
public final override fun sayHello(): R|kotlin/Unit| {
|
||||
public[local] final override fun sayHello(): R|kotlin/Unit| {
|
||||
<Unresolved name: println>#(String(Privet!!!))
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -4,20 +4,20 @@ FILE: implicitInAnonymous.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final fun foo(x: R|kotlin/Int|): R|kotlin/Boolean| {
|
||||
public[local] final fun foo(x: R|kotlin/Int|): R|kotlin/Boolean| {
|
||||
^foo this@R|/anonymous|.R|/anonymous.bar|(R|<local>/x|)
|
||||
}
|
||||
|
||||
public final fun bar(y: R|kotlin/Int|): R|kotlin/Boolean| {
|
||||
public[local] final fun bar(y: R|kotlin/Int|): R|kotlin/Boolean| {
|
||||
^bar CMP(>, this@R|/anonymous|.R|kotlin/Any.hashCode|().R|kotlin/Int.plus|(R|<local>/y|).R|kotlin/Int.compareTo|(Int(0)))
|
||||
}
|
||||
|
||||
public final val w: R|kotlin/Boolean|
|
||||
public[local] final val w: R|kotlin/Boolean|
|
||||
public get(): R|kotlin/Boolean| {
|
||||
^ this@R|/anonymous|.R|/anonymous.z|
|
||||
}
|
||||
|
||||
public final val z: R|kotlin/Boolean|
|
||||
public[local] final val z: R|kotlin/Boolean|
|
||||
public get(): R|kotlin/Boolean| {
|
||||
^ ==(this@R|/anonymous|.R|kotlin/Any.hashCode|(), Int(0))
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ FILE: localObject.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final override fun foo(): R|kotlin/Int| {
|
||||
public[local] final override fun foo(): R|kotlin/Int| {
|
||||
^foo R|<local>/x|.R|kotlin/Int.plus|(Int(1))
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ FILE: localObject.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final override fun foo(): R|kotlin/Int| {
|
||||
public[local] final override fun foo(): R|kotlin/Int| {
|
||||
^foo this@R|/TestProperty|.R|/TestProperty.intConst|.R|kotlin/Int.plus|(Int(1))
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ FILE: localObject.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final override fun foo(): R|kotlin/Int| {
|
||||
public[local] final override fun foo(): R|kotlin/Int| {
|
||||
^foo this@R|/TestProperty|.R|/TestProperty.intConst|.R|kotlin/Int.plus|(Int(1))
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ FILE: localObject.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final override fun foo(): R|kotlin/Int| {
|
||||
public[local] final override fun foo(): R|kotlin/Int| {
|
||||
^foo this@R|special/anonymous|.R|/TestProperty.x|.R|kotlin/Int.plus|(Int(1))
|
||||
}
|
||||
|
||||
|
||||
@@ -17,11 +17,11 @@ val case1 = object : A {
|
||||
hoo()
|
||||
}
|
||||
}
|
||||
fun <!EXPOSED_RECEIVER_TYPE!>Child<!>.voo() {
|
||||
fun Child.voo() {
|
||||
val x = property
|
||||
}
|
||||
|
||||
fun <!EXPOSED_RECEIVER_TYPE!>Base<!>.hoo() {
|
||||
fun Base.hoo() {
|
||||
val x = property
|
||||
}
|
||||
|
||||
@@ -111,10 +111,10 @@ class Case3() {
|
||||
}
|
||||
}
|
||||
|
||||
fun <!EXPOSED_RECEIVER_TYPE!>Child<!>.voo() {
|
||||
fun Child.voo() {
|
||||
val x = property
|
||||
}
|
||||
fun <!EXPOSED_RECEIVER_TYPE!>Base<!>.hoo() {
|
||||
fun Base.hoo() {
|
||||
val x = property
|
||||
}
|
||||
|
||||
|
||||
@@ -22,11 +22,11 @@ FILE: objectInnerClass.kt
|
||||
|
||||
}
|
||||
|
||||
public final fun R|<anonymous>.Child|.voo(): R|kotlin/Unit| {
|
||||
public[local] final fun R|<anonymous>.Child|.voo(): R|kotlin/Unit| {
|
||||
lval x: R|B| = this@R|/anonymous.voo|.R|/<anonymous>.Base.property|
|
||||
}
|
||||
|
||||
public final fun R|<anonymous>.Base|.hoo(): R|kotlin/Unit| {
|
||||
public[local] final fun R|<anonymous>.Base|.hoo(): R|kotlin/Unit| {
|
||||
lval x: R|B| = this@R|/anonymous.hoo|.R|/<anonymous>.Base.property|
|
||||
}
|
||||
|
||||
@@ -43,14 +43,14 @@ FILE: objectInnerClass.kt
|
||||
|
||||
}
|
||||
|
||||
public final fun caseForBase(): R|kotlin/Unit| {
|
||||
public[local] final fun caseForBase(): R|kotlin/Unit| {
|
||||
lval base: R|<anonymous>.Base| = this@R|/anonymous|.R|/<anonymous>.Base.Base|(R|/B.B|())
|
||||
R|<local>/base|.R|/<anonymous>.Base.baseFun|()
|
||||
R|<local>/base|.R|/<anonymous>.Base.property|
|
||||
(this@R|/anonymous|, R|<local>/base|).R|/anonymous.hoo|()
|
||||
}
|
||||
|
||||
public final fun caseForChild(): R|kotlin/Unit| {
|
||||
public[local] final fun caseForChild(): R|kotlin/Unit| {
|
||||
lval child: R|<anonymous>.Child| = this@R|/anonymous|.R|/<anonymous>.Child.Child|(R|/B.B|())
|
||||
R|<local>/child|.R|/<anonymous>.Base.baseFun|()
|
||||
R|<local>/child|.R|/<anonymous>.Base.property|
|
||||
@@ -72,11 +72,11 @@ FILE: objectInnerClass.kt
|
||||
super<R|Case2.Base|>(R|/B.B|())
|
||||
}
|
||||
|
||||
public final fun R|Case2.Base|.zoo(): R|kotlin/Unit| {
|
||||
public[local] final fun R|Case2.Base|.zoo(): R|kotlin/Unit| {
|
||||
lval x: R|B| = this@R|/anonymous.zoo|.R|/Case2.Base.property|
|
||||
}
|
||||
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
public[local] final fun foo(): R|kotlin/Unit| {
|
||||
this@R|/anonymous|.R|/Case2.Base.baseFun|()
|
||||
lval x: R|B| = this@R|/anonymous|.R|/Case2.Base.property|
|
||||
(this@R|/anonymous|, this@R|/anonymous|).R|/anonymous.zoo|()
|
||||
@@ -147,11 +147,11 @@ FILE: objectInnerClass.kt
|
||||
|
||||
}
|
||||
|
||||
public final fun R|Case3.<anonymous>.Child|.voo(): R|kotlin/Unit| {
|
||||
public[local] final fun R|Case3.<anonymous>.Child|.voo(): R|kotlin/Unit| {
|
||||
lval x: R|B| = this@R|/anonymous.voo|.R|/Case3.<anonymous>.Base.property|
|
||||
}
|
||||
|
||||
public final fun R|Case3.<anonymous>.Base|.hoo(): R|kotlin/Unit| {
|
||||
public[local] final fun R|Case3.<anonymous>.Base|.hoo(): R|kotlin/Unit| {
|
||||
lval x: R|B| = this@R|/anonymous.hoo|.R|/Case3.<anonymous>.Base.property|
|
||||
}
|
||||
|
||||
@@ -168,14 +168,14 @@ FILE: objectInnerClass.kt
|
||||
|
||||
}
|
||||
|
||||
public final fun caseForBase(): R|kotlin/Unit| {
|
||||
public[local] final fun caseForBase(): R|kotlin/Unit| {
|
||||
lval base: R|Case3.<anonymous>.Base| = R|/Case3.<anonymous>.Base.Base|(R|/B.B|())
|
||||
R|<local>/base|.R|/Case3.<anonymous>.Base.baseFun|()
|
||||
R|<local>/base|.R|/Case3.<anonymous>.Base.property|
|
||||
(this@R|/anonymous|, R|<local>/base|).R|/anonymous.hoo|()
|
||||
}
|
||||
|
||||
public final fun caseForChild(): R|kotlin/Unit| {
|
||||
public[local] final fun caseForChild(): R|kotlin/Unit| {
|
||||
lval child: R|Case3.<anonymous>.Child| = R|/Case3.<anonymous>.Child.Child|(R|/B.B|())
|
||||
R|<local>/child|.R|/Case3.<anonymous>.Base.baseFun|()
|
||||
R|<local>/child|.R|/Case3.<anonymous>.Base.property|
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ FILE: anonymousInDelegate.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final override fun bar(): R|kotlin/Int| {
|
||||
public[local] final override fun bar(): R|kotlin/Int| {
|
||||
^bar Int(42)
|
||||
}
|
||||
|
||||
|
||||
Vendored
+2
-2
@@ -28,11 +28,11 @@ FILE: delegateWithAnonymousObject.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final override fun getValue(thisRef: R|IssuesListUserProfile|, property: R|kotlin/reflect/KProperty<*>|): R|IssueListView| {
|
||||
public[local] final override fun getValue(thisRef: R|IssuesListUserProfile|, property: R|kotlin/reflect/KProperty<*>|): R|IssueListView| {
|
||||
^getValue R|/IssueListView.IssueListView|()
|
||||
}
|
||||
|
||||
public final override fun setValue(thisRef: R|IssuesListUserProfile|, property: R|kotlin/reflect/KProperty<*>|, value: R|IssueListView|): R|kotlin/Unit| {
|
||||
public[local] final override fun setValue(thisRef: R|IssuesListUserProfile|, property: R|kotlin/reflect/KProperty<*>|, value: R|IssueListView|): R|kotlin/Unit| {
|
||||
^setValue R|/IssueListView.IssueListView|().R|/IssueListView.updateFrom|(R|<local>/value|)
|
||||
}
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ FILE: problems.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val name: R|kotlin/String| = String(123)
|
||||
public[local] final val name: R|kotlin/String| = String(123)
|
||||
public get(): R|kotlin/String|
|
||||
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
public[local] final fun test(): R|kotlin/Unit| {
|
||||
this@R|/anonymous|.R|/anonymous.name|
|
||||
}
|
||||
|
||||
|
||||
+15
-2
@@ -54,7 +54,7 @@ private class FirStatusResolveTransformer(override val session: FirSession) :
|
||||
}
|
||||
|
||||
private inline fun storeClass(
|
||||
klass: FirRegularClass,
|
||||
klass: FirClass<*>,
|
||||
computeResult: () -> CompositeTransformResult<FirDeclaration>
|
||||
): CompositeTransformResult<FirDeclaration> {
|
||||
classes += klass
|
||||
@@ -77,6 +77,15 @@ private class FirStatusResolveTransformer(override val session: FirSession) :
|
||||
} as CompositeTransformResult<FirStatement>
|
||||
}
|
||||
|
||||
override fun transformAnonymousObject(
|
||||
anonymousObject: FirAnonymousObject,
|
||||
data: FirDeclarationStatus?
|
||||
): CompositeTransformResult<FirStatement> {
|
||||
return storeClass(anonymousObject) {
|
||||
transformElement(anonymousObject, data)
|
||||
} as CompositeTransformResult<FirStatement>
|
||||
}
|
||||
|
||||
override fun transformPropertyAccessor(
|
||||
propertyAccessor: FirPropertyAccessor,
|
||||
data: FirDeclarationStatus?
|
||||
@@ -153,7 +162,11 @@ fun FirDeclaration.resolveStatus(
|
||||
): FirDeclarationStatus {
|
||||
if (status.visibility == Visibilities.UNKNOWN || status.modality == null) {
|
||||
val visibility = when (status.visibility) {
|
||||
Visibilities.UNKNOWN -> if (isLocal) Visibilities.LOCAL else resolveVisibility(containingClass)
|
||||
Visibilities.UNKNOWN -> when {
|
||||
isLocal -> Visibilities.LOCAL
|
||||
this is FirConstructor && containingClass is FirAnonymousObject -> Visibilities.PRIVATE
|
||||
else -> resolveVisibility(containingClass)
|
||||
}
|
||||
else -> status.visibility
|
||||
}
|
||||
val modality = status.modality ?: resolveModality(containingClass)
|
||||
|
||||
@@ -11,7 +11,7 @@ object A2 public <!CONSTRUCTOR_IN_OBJECT!>constructor(private val prop: Int)<!>
|
||||
}
|
||||
|
||||
val x = object <!CONSTRUCTOR_IN_OBJECT!>(val prop: Int)<!> {
|
||||
<!CONSTRUCTOR_IN_OBJECT!>constructor()<!> : this(1) {
|
||||
<!CONSTRUCTOR_IN_OBJECT!>constructor()<!> : <!INAPPLICABLE_CANDIDATE!>this<!>(1) {
|
||||
val x = 1
|
||||
x * x
|
||||
}
|
||||
|
||||
-15
@@ -1,15 +0,0 @@
|
||||
class A<T> {
|
||||
fun foo() {
|
||||
val q = object {
|
||||
open inner class B
|
||||
inner class C : B()
|
||||
|
||||
// No WRONG_NUMBER_OF_TYPE_ARGUMENTS should be reported on these types
|
||||
val <!EXPOSED_PROPERTY_TYPE!>x<!>: B = B()
|
||||
val <!EXPOSED_PROPERTY_TYPE!>y<!>: C = C()
|
||||
}
|
||||
|
||||
q.x
|
||||
q.y
|
||||
}
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
class A<T> {
|
||||
fun foo() {
|
||||
val q = object {
|
||||
|
||||
+2
-2
@@ -6,14 +6,14 @@ package p
|
||||
private fun foo(a: Int) = run {
|
||||
object {
|
||||
inner class A
|
||||
fun <!EXPOSED_FUNCTION_RETURN_TYPE!>foo<!>() = A()
|
||||
fun foo() = A()
|
||||
}.foo()
|
||||
}
|
||||
|
||||
private fun foo() = run {
|
||||
object {
|
||||
inner class A
|
||||
fun <!EXPOSED_FUNCTION_RETURN_TYPE!>foo<!>() = A()
|
||||
fun foo() = A()
|
||||
}.foo()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user