[FIR] Include anonymous objects in containingDeclarations in FirDeclarationsResolveTransformer.kt
K1 and K2 still differ because of KT-58203 #KT-63434
This commit is contained in:
committed by
Space Team
parent
eb23984182
commit
55adeba011
@@ -0,0 +1,17 @@
|
||||
// SKIP_TXT
|
||||
// FIR_DUMP
|
||||
|
||||
abstract class InlineCompletionSessionManager {
|
||||
protected class Proto {
|
||||
class Some
|
||||
}
|
||||
}
|
||||
|
||||
fun checkCannotAccess() {
|
||||
object : InlineCompletionSessionManager() {
|
||||
fun chch() {
|
||||
val b: Proto = Proto()
|
||||
if (b is Proto.Some) return
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
FILE: kt63434.fir.kt
|
||||
public abstract class InlineCompletionSessionManager : R|kotlin/Any| {
|
||||
public constructor(): R|InlineCompletionSessionManager| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
protected final class Proto : R|kotlin/Any| {
|
||||
public constructor(): R|InlineCompletionSessionManager.Proto| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final class Some : R|kotlin/Any| {
|
||||
public constructor(): R|InlineCompletionSessionManager.Proto.Some| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public final fun checkCannotAccess(): R|kotlin/Unit| {
|
||||
object : R|InlineCompletionSessionManager| {
|
||||
private constructor(): R|<anonymous>| {
|
||||
super<R|InlineCompletionSessionManager|>()
|
||||
}
|
||||
|
||||
public final fun chch(): R|kotlin/Unit| {
|
||||
lval b: R|InlineCompletionSessionManager.Proto| = R|/InlineCompletionSessionManager.Proto.Proto|()
|
||||
when () {
|
||||
(R|<local>/b| is R|InlineCompletionSessionManager.Proto.Some|) -> {
|
||||
^chch Unit
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
// SKIP_TXT
|
||||
// FIR_DUMP
|
||||
|
||||
abstract class InlineCompletionSessionManager {
|
||||
protected class Proto {
|
||||
class Some
|
||||
}
|
||||
}
|
||||
|
||||
fun checkCannotAccess() {
|
||||
object : InlineCompletionSessionManager() {
|
||||
fun chch() {
|
||||
val b: Proto = Proto()
|
||||
if (b is <!INCOMPATIBLE_TYPES!>Proto.Some<!>) return
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user