[FIR] fix resolve contract violation from scopes
We cannot call lazy resolve to STATUS phase from scopes as scopes may be accessed on a STATUS phase or earlier ^KT-54890 ^KTIJ-23587 fixed
This commit is contained in:
+5
-2
@@ -43,8 +43,8 @@ import org.jetbrains.kotlin.fir.scopes.FirContainingNamesAwareScope
|
||||
import org.jetbrains.kotlin.fir.scopes.FirScope
|
||||
import org.jetbrains.kotlin.fir.scopes.impl.*
|
||||
import org.jetbrains.kotlin.fir.scopes.unsubstitutedScope
|
||||
import org.jetbrains.kotlin.fir.symbols.lazyResolveToPhase
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.*
|
||||
import org.jetbrains.kotlin.fir.symbols.lazyResolveToPhase
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.psi.KtElement
|
||||
@@ -85,6 +85,7 @@ internal class KtFirScopeProvider(
|
||||
override fun getMemberScope(classSymbol: KtSymbolWithMembers): KtScope {
|
||||
return memberScopeCache.getOrPut(classSymbol) {
|
||||
val firScope = classSymbol.withFirForScope { fir ->
|
||||
fir.lazyResolveToPhase(FirResolvePhase.STATUS)
|
||||
val firSession = analysisSession.useSiteSession
|
||||
fir.unsubstitutedScope(
|
||||
firSession,
|
||||
@@ -124,6 +125,7 @@ internal class KtFirScopeProvider(
|
||||
?: return delegatedMemberScopeCache.getOrPut(classSymbol) { getEmptyScope() }
|
||||
return delegatedMemberScopeCache.getOrPut(classSymbol) {
|
||||
val firScope = classSymbol.withFirForScope { fir ->
|
||||
fir.lazyResolveToPhase(FirResolvePhase.STATUS)
|
||||
val delegateFields = fir.delegateFields
|
||||
if (delegateFields.isNotEmpty()) {
|
||||
val firSession = analysisSession.useSiteSession
|
||||
@@ -170,7 +172,8 @@ internal class KtFirScopeProvider(
|
||||
val firTypeScope = type.coneType.scope(
|
||||
firSession,
|
||||
scopeSession,
|
||||
FakeOverrideTypeCalculator.Forced
|
||||
FakeOverrideTypeCalculator.Forced,
|
||||
requiredPhase = FirResolvePhase.STATUS,
|
||||
) ?: return null
|
||||
return KtCompositeTypeScope(
|
||||
listOfNotNull(
|
||||
|
||||
+3
-1
@@ -25,6 +25,7 @@ import org.jetbrains.kotlin.analysis.api.types.KtType
|
||||
import org.jetbrains.kotlin.analysis.low.level.api.fir.api.LLFirResolveSession
|
||||
import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.descriptors.Visibility
|
||||
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirDefaultPropertyAccessor
|
||||
import org.jetbrains.kotlin.fir.declarations.synthetic.FirSyntheticPropertyAccessor
|
||||
import org.jetbrains.kotlin.fir.declarations.utils.*
|
||||
@@ -58,7 +59,8 @@ internal class KtFirPropertySetterSymbol(
|
||||
val containingClassScope = firSymbol.dispatchReceiverType?.scope(
|
||||
session,
|
||||
firResolveSession.getScopeSessionFor(session),
|
||||
FakeOverrideTypeCalculator.DoNothing
|
||||
FakeOverrideTypeCalculator.DoNothing,
|
||||
requiredPhase = FirResolvePhase.STATUS,
|
||||
) ?: return false
|
||||
val overriddenProperties = containingClassScope.getDirectOverriddenProperties(propertySymbol)
|
||||
overriddenProperties.any { it.isVar }
|
||||
|
||||
+3
@@ -14,9 +14,11 @@ import org.jetbrains.kotlin.analysis.api.symbols.pointers.KtSymbolPointer
|
||||
import org.jetbrains.kotlin.analysis.utils.errors.requireIsInstance
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.FirClass
|
||||
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
||||
import org.jetbrains.kotlin.fir.scopes.FirScope
|
||||
import org.jetbrains.kotlin.fir.scopes.unsubstitutedScope
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirClassSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.lazyResolveToPhase
|
||||
|
||||
internal abstract class KtFirMemberSymbolPointer<S : KtSymbol>(
|
||||
private val ownerPointer: KtSymbolPointer<KtSymbolWithMembers>,
|
||||
@@ -28,6 +30,7 @@ internal abstract class KtFirMemberSymbolPointer<S : KtSymbol>(
|
||||
val scope = with(analysisSession) {
|
||||
val ownerSymbol = ownerPointer.restoreSymbol() ?: return null
|
||||
val owner = ownerSymbol.firSymbol as? FirClassSymbol ?: return null
|
||||
owner.lazyResolveToPhase(FirResolvePhase.STATUS)
|
||||
getSearchScope(owner)
|
||||
} ?: return null
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -157,7 +157,7 @@ FILE: anonymousObjectInInvalidPosition.kt
|
||||
|
||||
private [BODY_RESOLVE] get(): <ERROR TYPE REF: Wrong number of type arguments>
|
||||
public abstract [TYPES] interface A<[TYPES] T> : R|kotlin/Any| {
|
||||
public abstract [STATUS] fun x(): R|kotlin/Unit|
|
||||
public abstract [TYPES] fun x(): R|kotlin/Unit|
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
interface A<D : A<D>> {
|
||||
fun foo(): Any
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
interface A {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
open class A
|
||||
|
||||
interface B : <!DELEGATION_IN_INTERFACE, DELEGATION_NOT_TO_INTERFACE, INTERFACE_WITH_SUPERCLASS!>A<!> by <!UNRESOLVED_REFERENCE!>a<!> {
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
open class A {
|
||||
open var test: Number = 10
|
||||
}
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: -QualifiedSupertypeMayBeExtendedByOtherSupertype
|
||||
interface IBase<T> {
|
||||
fun foo() {}
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
open class A {
|
||||
open fun test(): Number = 10
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
open class A
|
||||
open class B : A()
|
||||
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
interface A {
|
||||
fun foo()
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// FILE: LookupElement.java
|
||||
|
||||
public abstract class LookupElement {
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
abstract class Base<T>(val x: T) {
|
||||
abstract fun foo(): T
|
||||
}
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
open class Protected {
|
||||
protected fun bar() {}
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
interface List<out T : Any> {
|
||||
operator fun get(index: Int): T
|
||||
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// WITH_EXTENDED_CHECKERS
|
||||
class A {
|
||||
<!VALUE_CLASS_NOT_TOP_LEVEL!>inline<!> inner class B(val x: Int)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// ISSUE: KT-41984
|
||||
|
||||
// FILE: A.java
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !CHECK_TYPE
|
||||
// ISSUE: KT-37070
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !CHECK_TYPE
|
||||
// UNEXPECTED BEHAVIOUR
|
||||
// ISSUES: KT-37066
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
interface CommonBackendContext
|
||||
|
||||
interface PhaserState<Data> {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
interface Left
|
||||
interface Right
|
||||
class Bottom : Left, Right
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
interface FirElement {
|
||||
fun <R, D> accept(visitor: FirVisitor<R, D>, data: D): R
|
||||
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// FILE: JA.java
|
||||
public interface JA<E> {
|
||||
public E getFoo();
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// SCOPE_DUMP: C:getName;setName;name, D:getName;setName;name
|
||||
// FILE: A.java
|
||||
public interface A {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// WITH_EXTENDED_CHECKERS
|
||||
|
||||
import <!PLATFORM_CLASS_MAPPED_TO_KOTLIN!>kotlin.jvm.functions.Function0<!>
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// FULL_JDK
|
||||
import java.util.*
|
||||
import java.util.function.BiConsumer
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
enum class Some {
|
||||
ENTRY {
|
||||
override fun toString(): String = "Entry"
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// MODULE: m1
|
||||
// FILE: m1.kt
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
import java.util.AbstractSet
|
||||
|
||||
class SmartSet<T> : AbstractSet<T>() {
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +MultiPlatformProjects
|
||||
// MODULE: m1-common
|
||||
// FILE: common.kt
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// FILE: AbstractToolConfig.kt
|
||||
|
||||
abstract class AbstractToolConfig {
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
import kotlin.reflect.KProperty
|
||||
import kotlin.properties.ReadOnlyProperty
|
||||
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
interface PsiMember
|
||||
|
||||
interface PsiField : PsiMember
|
||||
|
||||
+5
-2
@@ -12,13 +12,16 @@ import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext
|
||||
import org.jetbrains.kotlin.fir.analysis.checkers.expression.FirCallableReferenceAccessChecker
|
||||
import org.jetbrains.kotlin.fir.analysis.diagnostics.jvm.FirJvmErrors
|
||||
import org.jetbrains.kotlin.fir.containingClassLookupTag
|
||||
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
||||
import org.jetbrains.kotlin.fir.declarations.utils.hasBackingField
|
||||
import org.jetbrains.kotlin.fir.declarations.utils.visibility
|
||||
import org.jetbrains.kotlin.fir.expressions.FirCallableReferenceAccess
|
||||
import org.jetbrains.kotlin.fir.expressions.impl.FirNoReceiverExpression
|
||||
import org.jetbrains.kotlin.fir.packageFqName
|
||||
import org.jetbrains.kotlin.fir.references.FirResolvedNamedReference
|
||||
import org.jetbrains.kotlin.fir.resolve.*
|
||||
import org.jetbrains.kotlin.fir.resolve.isSubclassOf
|
||||
import org.jetbrains.kotlin.fir.resolve.scope
|
||||
import org.jetbrains.kotlin.fir.resolve.toFirRegularClassSymbol
|
||||
import org.jetbrains.kotlin.fir.scopes.FakeOverrideTypeCalculator
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirFieldSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirPropertySymbol
|
||||
@@ -39,7 +42,7 @@ object FirJavaShadowedFieldReferenceChecker : FirCallableReferenceAccessChecker(
|
||||
|
||||
val dispatchReceiver = expression.dispatchReceiver.takeIf { it !is FirNoReceiverExpression } ?: return
|
||||
val scope = dispatchReceiver.typeRef.coneType.scope(
|
||||
session, context.sessionHolder.scopeSession, FakeOverrideTypeCalculator.DoNothing
|
||||
session, context.sessionHolder.scopeSession, FakeOverrideTypeCalculator.DoNothing, requiredPhase = FirResolvePhase.TYPES
|
||||
) ?: return
|
||||
|
||||
var shadowingPropertyClassId: ClassId? = null
|
||||
|
||||
+2
-1
@@ -207,7 +207,8 @@ abstract class AbstractAnnotationDeserializer(
|
||||
val firAnnotationClass = (symbol as? FirRegularClassSymbol)?.fir ?: return@lazy null
|
||||
|
||||
val classScope =
|
||||
firAnnotationClass.defaultType().scope(session, ScopeSession(), FakeOverrideTypeCalculator.DoNothing)
|
||||
firAnnotationClass.defaultType()
|
||||
.scope(session, ScopeSession(), FakeOverrideTypeCalculator.DoNothing, requiredPhase = null)
|
||||
?: error("Null scope for $classId")
|
||||
|
||||
val constructor =
|
||||
|
||||
+2
-2
@@ -151,7 +151,7 @@ class FirElementSerializer private constructor(
|
||||
}
|
||||
|
||||
fun FirClass.nestedClassifiers(): List<FirClassifierSymbol<*>> {
|
||||
val scope = defaultType().scope(session, scopeSession, FakeOverrideTypeCalculator.DoNothing) ?: return emptyList()
|
||||
val scope = defaultType().scope(session, scopeSession, FakeOverrideTypeCalculator.DoNothing, requiredPhase = null) ?: return emptyList()
|
||||
return buildList {
|
||||
scope.getClassifierNames().mapNotNullTo(this) { scope.getSingleClassifier(it) }
|
||||
}
|
||||
@@ -226,7 +226,7 @@ class FirElementSerializer private constructor(
|
||||
|
||||
private fun FirClass.declarations(): List<FirCallableDeclaration> = buildList {
|
||||
val memberScope =
|
||||
defaultType().scope(session, scopeSession, FakeOverrideTypeCalculator.DoNothing)
|
||||
defaultType().scope(session, scopeSession, FakeOverrideTypeCalculator.DoNothing, requiredPhase = null)
|
||||
?: error("Null scope for $this")
|
||||
|
||||
fun addDeclarationIfNeeded(symbol: FirCallableSymbol<*>) {
|
||||
|
||||
@@ -28,14 +28,21 @@ import org.jetbrains.kotlin.name.ClassId
|
||||
|
||||
fun FirSmartCastExpression.smartcastScope(
|
||||
useSiteSession: FirSession,
|
||||
scopeSession: ScopeSession
|
||||
scopeSession: ScopeSession,
|
||||
requiredPhase: FirResolvePhase? = null,
|
||||
): FirTypeScope? {
|
||||
val smartcastType = smartcastTypeWithoutNullableNothing?.coneType ?: smartcastType.coneType
|
||||
val smartcastScope = smartcastType.scope(useSiteSession, scopeSession, FakeOverrideTypeCalculator.DoNothing)
|
||||
val smartcastScope = smartcastType.scope(
|
||||
useSiteSession,
|
||||
scopeSession,
|
||||
FakeOverrideTypeCalculator.DoNothing,
|
||||
requiredPhase = FirResolvePhase.STATUS
|
||||
)
|
||||
if (isStable) {
|
||||
return smartcastScope
|
||||
}
|
||||
val originalScope = originalExpression.typeRef.coneType.scope(useSiteSession, scopeSession, FakeOverrideTypeCalculator.DoNothing)
|
||||
val originalScope = originalExpression.typeRef.coneType
|
||||
.scope(useSiteSession, scopeSession, FakeOverrideTypeCalculator.DoNothing, requiredPhase)
|
||||
?: return smartcastScope
|
||||
|
||||
if (smartcastScope == null) {
|
||||
@@ -55,14 +62,15 @@ fun ConeClassLikeType.delegatingConstructorScope(
|
||||
fun ConeKotlinType.scope(
|
||||
useSiteSession: FirSession,
|
||||
scopeSession: ScopeSession,
|
||||
fakeOverrideTypeCalculator: FakeOverrideTypeCalculator
|
||||
fakeOverrideTypeCalculator: FakeOverrideTypeCalculator,
|
||||
requiredPhase: FirResolvePhase?,
|
||||
): FirTypeScope? {
|
||||
val scope = scope(useSiteSession, scopeSession, FirResolvePhase.DECLARATIONS) ?: return null
|
||||
val scope = scope(useSiteSession, scopeSession, requiredPhase) ?: return null
|
||||
if (fakeOverrideTypeCalculator == FakeOverrideTypeCalculator.DoNothing) return scope
|
||||
return FirScopeWithFakeOverrideTypeCalculator(scope, fakeOverrideTypeCalculator)
|
||||
}
|
||||
|
||||
private fun ConeKotlinType.scope(useSiteSession: FirSession, scopeSession: ScopeSession, requiredPhase: FirResolvePhase): FirTypeScope? {
|
||||
private fun ConeKotlinType.scope(useSiteSession: FirSession, scopeSession: ScopeSession, requiredPhase: FirResolvePhase?): FirTypeScope? {
|
||||
return when (this) {
|
||||
is ConeErrorType -> null
|
||||
is ConeClassLikeType -> classScope(useSiteSession, scopeSession, requiredPhase, lookupTag)
|
||||
@@ -99,13 +107,15 @@ private fun ConeKotlinType.scope(useSiteSession: FirSession, scopeSession: Scope
|
||||
private fun ConeClassLikeType.classScope(
|
||||
useSiteSession: FirSession,
|
||||
scopeSession: ScopeSession,
|
||||
requiredPhase: FirResolvePhase,
|
||||
requiredPhase: FirResolvePhase?,
|
||||
memberOwnerLookupTag: ConeClassLikeLookupTag
|
||||
): FirTypeScope? {
|
||||
val fullyExpandedType = fullyExpandedType(useSiteSession)
|
||||
val fir = fullyExpandedType.lookupTag.toSymbol(useSiteSession)?.fir as? FirClass ?: return null
|
||||
|
||||
fir.symbol.lazyResolveToPhase(requiredPhase)
|
||||
if (requiredPhase != null) {
|
||||
fir.symbol.lazyResolveToPhase(requiredPhase)
|
||||
}
|
||||
|
||||
val substitutor = when {
|
||||
attributes.contains(CompilerConeAttributes.RawType) -> ConeRawScopeSubstitutor(useSiteSession)
|
||||
|
||||
@@ -9,6 +9,7 @@ import org.jetbrains.kotlin.KtFakeSourceElementKind
|
||||
import org.jetbrains.kotlin.fakeElement
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.copyWithNewSourceKind
|
||||
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
||||
import org.jetbrains.kotlin.fir.diagnostics.ConeIntermediateDiagnostic
|
||||
import org.jetbrains.kotlin.fir.expressions.*
|
||||
import org.jetbrains.kotlin.fir.expressions.builder.buildSmartCastExpression
|
||||
@@ -41,7 +42,7 @@ interface ReceiverValue : Receiver {
|
||||
val receiverExpression: FirExpression
|
||||
|
||||
fun scope(useSiteSession: FirSession, scopeSession: ScopeSession): FirTypeScope? =
|
||||
type.scope(useSiteSession, scopeSession, FakeOverrideTypeCalculator.DoNothing)
|
||||
type.scope(useSiteSession, scopeSession, FakeOverrideTypeCalculator.DoNothing, requiredPhase = FirResolvePhase.STATUS)
|
||||
}
|
||||
|
||||
// TODO: should inherit just Receiver, not ReceiverValue
|
||||
@@ -70,9 +71,9 @@ open class ExpressionReceiverValue(
|
||||
receiverExpr = receiverExpr.arguments.firstOrNull()
|
||||
}
|
||||
if (receiverExpr is FirSmartCastExpression) {
|
||||
return receiverExpr.smartcastScope(useSiteSession, scopeSession)
|
||||
return receiverExpr.smartcastScope(useSiteSession, scopeSession, requiredPhase = FirResolvePhase.STATUS)
|
||||
}
|
||||
return type.scope(useSiteSession, scopeSession, FakeOverrideTypeCalculator.DoNothing)
|
||||
return type.scope(useSiteSession, scopeSession, FakeOverrideTypeCalculator.DoNothing, requiredPhase = FirResolvePhase.STATUS)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +92,8 @@ sealed class ImplicitReceiverValue<S : FirBasedSymbol<*>>(
|
||||
|
||||
val originalType: ConeKotlinType = type
|
||||
|
||||
var implicitScope: FirTypeScope? = type.scope(useSiteSession, scopeSession, FakeOverrideTypeCalculator.DoNothing)
|
||||
var implicitScope: FirTypeScope? =
|
||||
type.scope(useSiteSession, scopeSession, FakeOverrideTypeCalculator.DoNothing, requiredPhase = FirResolvePhase.STATUS)
|
||||
private set
|
||||
|
||||
override fun scope(useSiteSession: FirSession, scopeSession: ScopeSession): FirTypeScope? = implicitScope
|
||||
@@ -132,7 +134,8 @@ sealed class ImplicitReceiverValue<S : FirBasedSymbol<*>>(
|
||||
typeRef = smartcastType.copyWithNewSourceKind(KtFakeSourceElementKind.ImplicitTypeRef)
|
||||
}
|
||||
}
|
||||
implicitScope = type.scope(useSiteSession, scopeSession, FakeOverrideTypeCalculator.DoNothing)
|
||||
implicitScope =
|
||||
type.scope(useSiteSession, scopeSession, FakeOverrideTypeCalculator.DoNothing, requiredPhase = FirResolvePhase.STATUS)
|
||||
}
|
||||
|
||||
abstract fun createSnapshot(): ImplicitReceiverValue<S>
|
||||
|
||||
@@ -8,16 +8,14 @@ package org.jetbrains.kotlin.fir.scopes
|
||||
import org.jetbrains.annotations.TestOnly
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.FirRegularClass
|
||||
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
||||
import org.jetbrains.kotlin.fir.resolve.ScopeSession
|
||||
import org.jetbrains.kotlin.fir.resolve.providers.symbolProvider
|
||||
import org.jetbrains.kotlin.fir.resolve.scope
|
||||
import org.jetbrains.kotlin.fir.resolve.toSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.ConeClassLikeLookupTag
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirCallableSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirNamedFunctionSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirPropertySymbol
|
||||
import org.jetbrains.kotlin.fir.types.classId
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
|
||||
fun ConeClassLikeLookupTag.getNestedClassifierScope(session: FirSession, scopeSession: ScopeSession): FirContainingNamesAwareScope? {
|
||||
val klass = toSymbol(session)?.fir as? FirRegularClass ?: return null
|
||||
@@ -29,7 +27,12 @@ fun ConeClassLikeLookupTag.getNestedClassifierScope(session: FirSession, scopeSe
|
||||
*/
|
||||
@TestOnly
|
||||
fun debugCollectOverrides(symbol: FirCallableSymbol<*>, session: FirSession, scopeSession: ScopeSession): Map<Any, Any> {
|
||||
val scope = symbol.dispatchReceiverType?.scope(session, scopeSession, FakeOverrideTypeCalculator.DoNothing) ?: return emptyMap()
|
||||
val scope = symbol.dispatchReceiverType?.scope(
|
||||
session,
|
||||
scopeSession,
|
||||
FakeOverrideTypeCalculator.DoNothing,
|
||||
requiredPhase = FirResolvePhase.STATUS
|
||||
) ?: return emptyMap()
|
||||
return debugCollectOverrides(symbol, scope)
|
||||
}
|
||||
|
||||
|
||||
+5
-4
@@ -116,6 +116,7 @@ class FirClassSubstitutionScope(
|
||||
|
||||
fun createSubstitutionOverrideFunction(original: FirNamedFunctionSymbol): FirNamedFunctionSymbol {
|
||||
if (substitutor == ConeSubstitutor.Empty) return original
|
||||
original.lazyResolveToPhase(FirResolvePhase.TYPES)
|
||||
val member = original.fir
|
||||
if (skipPrivateMembers && member.visibility == Visibilities.Private) return original
|
||||
|
||||
@@ -175,6 +176,7 @@ class FirClassSubstitutionScope(
|
||||
|
||||
fun createSubstitutionOverrideConstructor(original: FirConstructorSymbol): FirConstructorSymbol {
|
||||
if (substitutor == ConeSubstitutor.Empty) return original
|
||||
original.lazyResolveToPhase(FirResolvePhase.TYPES)
|
||||
val constructor = original.fir
|
||||
|
||||
val symbolForOverride = FirConstructorSymbol(original.callableId)
|
||||
@@ -221,6 +223,7 @@ class FirClassSubstitutionScope(
|
||||
|
||||
fun createSubstitutionOverrideProperty(original: FirPropertySymbol): FirPropertySymbol {
|
||||
if (substitutor == ConeSubstitutor.Empty) return original
|
||||
original.lazyResolveToPhase(FirResolvePhase.TYPES)
|
||||
val member = original.fir
|
||||
if (skipPrivateMembers && member.visibility == Visibilities.Private) return original
|
||||
|
||||
@@ -279,7 +282,6 @@ class FirClassSubstitutionScope(
|
||||
)
|
||||
|
||||
private fun createSubstitutedData(member: FirCallableDeclaration, symbolForOverride: FirBasedSymbol<*>): SubstitutedData {
|
||||
member.lazyResolveToPhase(FirResolvePhase.TYPES)
|
||||
val (newTypeParameters, substitutor) = FirFakeOverrideGenerator.createNewTypeParametersAndSubstitutor(
|
||||
session,
|
||||
member as FirTypeParameterRefsOwner,
|
||||
@@ -293,7 +295,6 @@ class FirClassSubstitutionScope(
|
||||
|
||||
val newDispatchReceiverType = dispatchReceiverTypeForSubstitutedMembers.substitute(substitutor)
|
||||
|
||||
member.lazyResolveToPhase(FirResolvePhase.STATUS)
|
||||
val returnType = member.returnTypeRef.coneTypeSafe<ConeKotlinType>()
|
||||
val fakeOverrideSubstitution = runIf(returnType == null) { FakeOverrideSubstitution(substitutor, member.symbol) }
|
||||
val newReturnType = returnType?.substitute(substitutor)
|
||||
@@ -309,10 +310,10 @@ class FirClassSubstitutionScope(
|
||||
|
||||
fun createSubstitutionOverrideField(original: FirFieldSymbol): FirFieldSymbol {
|
||||
if (substitutor == ConeSubstitutor.Empty) return original
|
||||
original.lazyResolveToPhase(FirResolvePhase.TYPES)
|
||||
val member = original.fir
|
||||
if (skipPrivateMembers && member.visibility == Visibilities.Private) return original
|
||||
|
||||
member.symbol.lazyResolveToPhase(FirResolvePhase.STATUS)
|
||||
val returnType = member.returnTypeRef.coneTypeSafe<ConeKotlinType>()
|
||||
// TODO: do we have fields with implicit type?
|
||||
val newReturnType = returnType?.substitute() ?: return original
|
||||
@@ -322,10 +323,10 @@ class FirClassSubstitutionScope(
|
||||
|
||||
fun createSubstitutionOverrideSyntheticProperty(original: FirSyntheticPropertySymbol): FirSyntheticPropertySymbol {
|
||||
if (substitutor == ConeSubstitutor.Empty) return original
|
||||
original.lazyResolveToPhase(FirResolvePhase.TYPES)
|
||||
val member = original.fir as FirSyntheticProperty
|
||||
if (skipPrivateMembers && member.visibility == Visibilities.Private) return original
|
||||
|
||||
member.symbol.lazyResolveToPhase(FirResolvePhase.STATUS)
|
||||
val returnType = member.returnTypeRef.coneTypeSafe<ConeKotlinType>()
|
||||
val fakeOverrideSubstitution = runIf(returnType == null) { FakeOverrideSubstitution(substitutor, original) }
|
||||
val newReturnType = returnType?.substitute()
|
||||
|
||||
+2
-3
@@ -17,7 +17,6 @@ import org.jetbrains.kotlin.fir.resolve.scope
|
||||
import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor
|
||||
import org.jetbrains.kotlin.fir.scopes.*
|
||||
import org.jetbrains.kotlin.fir.symbols.ConeClassLikeLookupTag
|
||||
import org.jetbrains.kotlin.fir.symbols.lazyResolveToPhase
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.*
|
||||
import org.jetbrains.kotlin.fir.types.ConeClassLikeType
|
||||
import org.jetbrains.kotlin.fir.types.ConeFlexibleType
|
||||
@@ -49,8 +48,8 @@ class FirDelegatedMemberScope(
|
||||
}
|
||||
|
||||
private fun buildScope(delegateField: FirField): FirTypeScope? {
|
||||
delegateField.lazyResolveToPhase(FirResolvePhase.TYPES)
|
||||
return delegateField.returnTypeRef.coneType.scope(session, scopeSession, FakeOverrideTypeCalculator.DoNothing)
|
||||
return delegateField.returnTypeRef.coneType
|
||||
.scope(session, scopeSession, FakeOverrideTypeCalculator.DoNothing, requiredPhase = null)
|
||||
}
|
||||
|
||||
private fun collectFunctionsFromSpecificField(
|
||||
|
||||
@@ -18,7 +18,9 @@ import org.jetbrains.kotlin.fir.declarations.FirDeclarationOrigin
|
||||
import org.jetbrains.kotlin.fir.declarations.FirProperty
|
||||
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
||||
import org.jetbrains.kotlin.fir.declarations.FirSimpleFunction
|
||||
import org.jetbrains.kotlin.fir.declarations.builder.*
|
||||
import org.jetbrains.kotlin.fir.declarations.builder.buildProperty
|
||||
import org.jetbrains.kotlin.fir.declarations.builder.buildSimpleFunction
|
||||
import org.jetbrains.kotlin.fir.declarations.builder.buildValueParameter
|
||||
import org.jetbrains.kotlin.fir.declarations.impl.FirResolvedDeclarationStatusImpl
|
||||
import org.jetbrains.kotlin.fir.expressions.FirOperationNameConventions
|
||||
import org.jetbrains.kotlin.fir.moduleData
|
||||
@@ -59,7 +61,7 @@ class FirDynamicScope @FirDynamicScopeConstructor constructor(
|
||||
override fun getClassifierNames(): Set<Name> = emptySet()
|
||||
|
||||
private val anyTypeScope by lazy {
|
||||
session.builtinTypes.anyType.type.scope(session, scopeSession, FakeOverrideTypeCalculator.DoNothing)
|
||||
session.builtinTypes.anyType.type.scope(session, scopeSession, FakeOverrideTypeCalculator.DoNothing, requiredPhase = null)
|
||||
}
|
||||
|
||||
override fun processFunctionsByName(
|
||||
|
||||
+2
-1
@@ -35,7 +35,8 @@ class FirIntegerConstantOperatorScope(
|
||||
true -> session.builtinTypes.uIntType
|
||||
false -> session.builtinTypes.intType
|
||||
}.type
|
||||
baseType.scope(session, scopeSession, FakeOverrideTypeCalculator.DoNothing) ?: error("Scope for $baseType not found")
|
||||
baseType.scope(session, scopeSession, FakeOverrideTypeCalculator.DoNothing, requiredPhase = null)
|
||||
?: error("Scope for $baseType not found")
|
||||
}
|
||||
|
||||
private val mappedFunctions = mutableMapOf<Name, FirNamedFunctionSymbol>()
|
||||
|
||||
@@ -192,7 +192,7 @@ fun ConeKotlinType.findContributedInvokeSymbol(
|
||||
} else {
|
||||
FakeOverrideTypeCalculator.DoNothing
|
||||
}
|
||||
val scope = scope(session, scopeSession, fakeOverrideTypeCalculator) ?: return null
|
||||
val scope = scope(session, scopeSession, fakeOverrideTypeCalculator, requiredPhase = null) ?: return null
|
||||
var declaredInvoke: FirNamedFunctionSymbol? = null
|
||||
scope.processFunctionsByName(OperatorNameConventions.INVOKE) { functionSymbol ->
|
||||
if (functionSymbol.fir.valueParameters.size == baseInvokeSymbol.fir.valueParameters.size) {
|
||||
|
||||
+6
-1
@@ -176,7 +176,12 @@ private fun processConstructors(
|
||||
is FirTypeAliasSymbol -> {
|
||||
matchedSymbol.lazyResolveToPhase(FirResolvePhase.TYPES)
|
||||
val type = matchedSymbol.fir.expandedTypeRef.coneTypeUnsafe<ConeClassLikeType>().fullyExpandedType(session)
|
||||
val basicScope = type.scope(session, bodyResolveComponents.scopeSession, FakeOverrideTypeCalculator.DoNothing)
|
||||
val basicScope = type.scope(
|
||||
session,
|
||||
bodyResolveComponents.scopeSession,
|
||||
FakeOverrideTypeCalculator.DoNothing,
|
||||
requiredPhase = FirResolvePhase.STATUS
|
||||
)
|
||||
|
||||
val outerType = bodyResolveComponents.outerClassManager.outerType(type)
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import org.jetbrains.kotlin.descriptors.ClassKind
|
||||
import org.jetbrains.kotlin.descriptors.Modality
|
||||
import org.jetbrains.kotlin.descriptors.isClass
|
||||
import org.jetbrains.kotlin.fir.declarations.FirCallableDeclaration
|
||||
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
||||
import org.jetbrains.kotlin.fir.declarations.FirVariable
|
||||
import org.jetbrains.kotlin.fir.declarations.utils.modality
|
||||
import org.jetbrains.kotlin.fir.dispatchReceiverClassLookupTagOrNull
|
||||
@@ -128,16 +129,14 @@ private inline fun BodyResolveComponents.resolveSupertypesByMembers(
|
||||
|
||||
private fun BodyResolveComponents.getFunctionMembers(type: ConeKotlinType, name: Name): Collection<FirCallableDeclaration> =
|
||||
buildList {
|
||||
type.scope(session, scopeSession, FakeOverrideTypeCalculator.DoNothing)?.processFunctionsByName(name) {
|
||||
add(it.fir)
|
||||
}
|
||||
type.scope(session, scopeSession, FakeOverrideTypeCalculator.DoNothing, requiredPhase = FirResolvePhase.STATUS)
|
||||
?.processFunctionsByName(name) { add(it.fir) }
|
||||
}
|
||||
|
||||
private fun BodyResolveComponents.getPropertyMembers(type: ConeKotlinType, name: Name): Collection<FirCallableDeclaration> =
|
||||
buildList {
|
||||
type.scope(session, scopeSession, FakeOverrideTypeCalculator.DoNothing)?.processPropertiesByName(name) {
|
||||
addIfNotNull(it.fir as? FirVariable)
|
||||
}
|
||||
type.scope(session, scopeSession, FakeOverrideTypeCalculator.DoNothing, requiredPhase = FirResolvePhase.STATUS)
|
||||
?.processPropertiesByName(name) { addIfNotNull(it.fir as? FirVariable) }
|
||||
}
|
||||
|
||||
|
||||
|
||||
+13
-6
@@ -6,10 +6,7 @@
|
||||
package org.jetbrains.kotlin.fir.resolve.calls.tower
|
||||
|
||||
import org.jetbrains.kotlin.fir.*
|
||||
import org.jetbrains.kotlin.fir.declarations.ContextReceiverGroup
|
||||
import org.jetbrains.kotlin.fir.declarations.FirCallableDeclaration
|
||||
import org.jetbrains.kotlin.fir.declarations.FirConstructor
|
||||
import org.jetbrains.kotlin.fir.declarations.getAnnotationByClassId
|
||||
import org.jetbrains.kotlin.fir.declarations.*
|
||||
import org.jetbrains.kotlin.fir.declarations.utils.isInner
|
||||
import org.jetbrains.kotlin.fir.declarations.utils.isStatic
|
||||
import org.jetbrains.kotlin.fir.expressions.FirExpression
|
||||
@@ -92,7 +89,12 @@ class MemberScopeTowerLevel(
|
||||
?.takeIf { it.isStable }
|
||||
?.originalExpression?.typeRef
|
||||
?.coneType
|
||||
?.scope(session, scopeSession, bodyResolveComponents.returnTypeCalculator.fakeOverrideTypeCalculator)
|
||||
?.scope(
|
||||
session,
|
||||
scopeSession,
|
||||
bodyResolveComponents.returnTypeCalculator.fakeOverrideTypeCalculator,
|
||||
requiredPhase = FirResolvePhase.STATUS
|
||||
)
|
||||
if (scopeWithoutSmartcast == null) {
|
||||
consumeCandidates(output, candidates)
|
||||
} else {
|
||||
@@ -123,7 +125,12 @@ class MemberScopeTowerLevel(
|
||||
if (dispatchReceiverType.isRaw()) {
|
||||
typeForSyntheticScope = dispatchReceiverType.convertToNonRawVersion()
|
||||
useSiteForSyntheticScope =
|
||||
typeForSyntheticScope.scope(session, scopeSession, FakeOverrideTypeCalculator.DoNothing)
|
||||
typeForSyntheticScope.scope(
|
||||
session,
|
||||
scopeSession,
|
||||
FakeOverrideTypeCalculator.DoNothing,
|
||||
requiredPhase = FirResolvePhase.STATUS
|
||||
)
|
||||
?: error("No scope for flexible type scope, while it's not null for $dispatchReceiverType")
|
||||
} else {
|
||||
typeForSyntheticScope = dispatchReceiverType
|
||||
|
||||
+3
-1
@@ -9,6 +9,7 @@ import org.jetbrains.kotlin.KtFakeSourceElementKind
|
||||
import org.jetbrains.kotlin.fakeElement
|
||||
import org.jetbrains.kotlin.fir.FirElement
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
||||
import org.jetbrains.kotlin.fir.expressions.FirConstExpression
|
||||
import org.jetbrains.kotlin.fir.expressions.FirExpression
|
||||
import org.jetbrains.kotlin.fir.expressions.FirIntegerLiteralOperatorCall
|
||||
@@ -50,7 +51,8 @@ class IntegerLiteralAndOperatorApproximationTransformer(
|
||||
private val toULongSymbol by lazy { findConversionFunction(session.builtinTypes.uIntType, TO_U_LONG)}
|
||||
|
||||
private fun findConversionFunction(receiverType: FirImplicitBuiltinTypeRef, name: Name): FirNamedFunctionSymbol {
|
||||
return receiverType.type.scope(session, scopeSession, FakeOverrideTypeCalculator.DoNothing)!!.getFunctions(name).single()
|
||||
return receiverType.type.scope(session, scopeSession, FakeOverrideTypeCalculator.DoNothing, requiredPhase = FirResolvePhase.STATUS)!!
|
||||
.getFunctions(name).single()
|
||||
}
|
||||
|
||||
override fun <E : FirElement> transformElement(element: E, data: ConeKotlinType?): E {
|
||||
|
||||
+9
-2
@@ -633,7 +633,8 @@ object FirExpectActualResolver {
|
||||
scopeSession: ScopeSession,
|
||||
session: FirSession = moduleData.session
|
||||
): Collection<FirBasedSymbol<*>> {
|
||||
val scope = defaultType().scope(useSiteSession = session, scopeSession, FakeOverrideTypeCalculator.DoNothing)
|
||||
val scope = defaultType()
|
||||
.scope(useSiteSession = session, scopeSession, FakeOverrideTypeCalculator.DoNothing, requiredPhase = FirResolvePhase.STATUS)
|
||||
?: return emptyList()
|
||||
return mutableListOf<FirBasedSymbol<*>>().apply {
|
||||
for (name in scope.getCallableNames()) {
|
||||
@@ -660,7 +661,13 @@ object FirExpectActualResolver {
|
||||
}
|
||||
|
||||
private fun FirClassSymbol<*>.getMembers(name: Name, scopeSession: ScopeSession): Collection<FirCallableSymbol<*>> {
|
||||
val scope = defaultType().scope(useSiteSession = moduleData.session, scopeSession, FakeOverrideTypeCalculator.DoNothing)
|
||||
val scope = defaultType()
|
||||
.scope(
|
||||
useSiteSession = moduleData.session,
|
||||
scopeSession,
|
||||
FakeOverrideTypeCalculator.DoNothing,
|
||||
requiredPhase = FirResolvePhase.STATUS
|
||||
)
|
||||
?: return emptyList()
|
||||
return mutableListOf<FirCallableSymbol<*>>().apply {
|
||||
scope.getMembersTo(this, name)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// FIR_IDENTICAL
|
||||
interface A<H> {
|
||||
fun foo() : Int = 1
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
abstract class A : Function1<Any, Unit>
|
||||
|
||||
abstract class B : (Int)->Unit
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
abstract class A : Function1<Any, Unit>
|
||||
|
||||
abstract class B : (Int)->Unit
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// FIR_IDENTICAL
|
||||
|
||||
interface Aaa<T> {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// WITH_EXTENDED_CHECKERS
|
||||
|
||||
// FILE: a.kt
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// WITH_EXTENDED_CHECKERS
|
||||
|
||||
// FILE: a.kt
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// FIR_IDENTICAL
|
||||
class X {
|
||||
<!MUST_BE_INITIALIZED_OR_BE_ABSTRACT!>val x : Int<!>
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
annotation class Ann
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
annotation class Ann
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !RENDER_DIAGNOSTICS_MESSAGES
|
||||
|
||||
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.TYPE, AnnotationTarget.CLASS, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.PROPERTY)
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !RENDER_DIAGNOSTICS_MESSAGES
|
||||
|
||||
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.TYPE, AnnotationTarget.CLASS, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.PROPERTY)
|
||||
|
||||
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// FIR_IDENTICAL
|
||||
import kotlin.reflect.KMutableProperty0
|
||||
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// FILE: a.kt
|
||||
package test
|
||||
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// FILE: a.kt
|
||||
package test
|
||||
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// See KT-15566
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// See KT-15566
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// !CHECK_TYPE
|
||||
// Issue: KT-30406
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
||||
// !CHECK_TYPE
|
||||
// Issue: KT-30406
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
// DIAGNOSTICS: -CONFLICTING_INHERITED_MEMBERS, -CONFLICTING_OVERLOADS, -ABSTRACT_MEMBER_NOT_IMPLEMENTED, -ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTED
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
// DIAGNOSTICS: -CONFLICTING_INHERITED_MEMBERS, -CONFLICTING_OVERLOADS, -ABSTRACT_MEMBER_NOT_IMPLEMENTED, -ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTED
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
// DIAGNOSTICS: -CONFLICTING_INHERITED_MEMBERS, -CONFLICTING_OVERLOADS, -ABSTRACT_MEMBER_NOT_IMPLEMENTED, -ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTED
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
// DIAGNOSTICS: -CONFLICTING_INHERITED_MEMBERS, -CONFLICTING_OVERLOADS, -ABSTRACT_MEMBER_NOT_IMPLEMENTED, -ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTED
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
// DIAGNOSTICS: -CONFLICTING_INHERITED_MEMBERS, -CONFLICTING_OVERLOADS, -ABSTRACT_MEMBER_NOT_IMPLEMENTED, -ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTED
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
// DIAGNOSTICS: -CONFLICTING_INHERITED_MEMBERS, -CONFLICTING_OVERLOADS, -ABSTRACT_MEMBER_NOT_IMPLEMENTED, -ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTED
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
// DIAGNOSTICS: -CONFLICTING_INHERITED_MEMBERS, -CONFLICTING_OVERLOADS, -ABSTRACT_MEMBER_NOT_IMPLEMENTED, -ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTED
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
// DIAGNOSTICS: -CONFLICTING_INHERITED_MEMBERS, -CONFLICTING_OVERLOADS, -ABSTRACT_MEMBER_NOT_IMPLEMENTED, -ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTED
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
// DIAGNOSTICS: -CONFLICTING_INHERITED_MEMBERS, -CONFLICTING_OVERLOADS
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
// DIAGNOSTICS: -CONFLICTING_INHERITED_MEMBERS, -CONFLICTING_OVERLOADS
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
// DIAGNOSTICS: -CONFLICTING_INHERITED_MEMBERS, -CONFLICTING_OVERLOADS
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
// DIAGNOSTICS: -CONFLICTING_INHERITED_MEMBERS, -CONFLICTING_OVERLOADS
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
// DIAGNOSTICS: -CONFLICTING_INHERITED_MEMBERS, -CONFLICTING_OVERLOADS
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
// DIAGNOSTICS: -CONFLICTING_INHERITED_MEMBERS, -CONFLICTING_OVERLOADS
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
// DIAGNOSTICS: -CONFLICTING_INHERITED_MEMBERS, -CONFLICTING_OVERLOADS
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
// DIAGNOSTICS: -CONFLICTING_INHERITED_MEMBERS, -CONFLICTING_OVERLOADS
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
// DIAGNOSTICS: -CONFLICTING_INHERITED_MEMBERS, -CONFLICTING_OVERLOADS
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
// DIAGNOSTICS: -CONFLICTING_INHERITED_MEMBERS, -CONFLICTING_OVERLOADS
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
// DIAGNOSTICS: -CONFLICTING_INHERITED_MEMBERS, -CONFLICTING_OVERLOADS
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
// DIAGNOSTICS: -CONFLICTING_INHERITED_MEMBERS, -CONFLICTING_OVERLOADS
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
// DIAGNOSTICS: -CONFLICTING_INHERITED_MEMBERS, -CONFLICTING_OVERLOADS
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
// DIAGNOSTICS: -CONFLICTING_INHERITED_MEMBERS, -CONFLICTING_OVERLOADS
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
// DIAGNOSTICS: -CONFLICTING_INHERITED_MEMBERS, -CONFLICTING_OVERLOADS
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
// DIAGNOSTICS: -CONFLICTING_INHERITED_MEMBERS, -CONFLICTING_OVERLOADS
|
||||
|
||||
compiler/testData/diagnostics/tests/coroutines/suspendFunctionAsSupertype/suspendFunctionN/simple.kt
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// FIR_IDENTICAL
|
||||
// !LANGUAGE: +SuspendFunctionAsSupertype
|
||||
// SKIP_TXT
|
||||
|
||||
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +ProhibitDataClassesOverridingCopy
|
||||
|
||||
interface WithCopy<T> {
|
||||
|
||||
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +ProhibitDataClassesOverridingCopy
|
||||
|
||||
interface WithCopy<T> {
|
||||
|
||||
compiler/testData/diagnostics/tests/dataClasses/dataClassExplicitlyOverridingCopyWithDefaults.fir.kt
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +ProhibitDataClassesOverridingCopy
|
||||
|
||||
interface WithCopy<T> {
|
||||
|
||||
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_DISABLE_LAZY_RESOLVE_CHECKS
|
||||
// !LANGUAGE: +ProhibitDataClassesOverridingCopy
|
||||
|
||||
interface WithCopy<T> {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user