diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/JavaInheritsRawKotlin.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/JavaInheritsRawKotlin.kt index 23f737e6189..7468a3faa84 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/JavaInheritsRawKotlin.kt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/JavaInheritsRawKotlin.kt @@ -1,4 +1,3 @@ -// FIR_DISABLE_LAZY_RESOLVE_CHECKS // FILE: Derived.kt class Derived : Some() diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/types/TypeUtils.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/types/TypeUtils.kt index e714c950476..d74a5f307ed 100644 --- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/types/TypeUtils.kt +++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/types/TypeUtils.kt @@ -23,9 +23,13 @@ import org.jetbrains.kotlin.fir.resolve.substitution.substitutorByMap import org.jetbrains.kotlin.fir.resolve.toSymbol import org.jetbrains.kotlin.fir.resolvedTypeFromPrototype import org.jetbrains.kotlin.fir.symbols.ConeTypeParameterLookupTag -import org.jetbrains.kotlin.fir.symbols.impl.* +import org.jetbrains.kotlin.fir.symbols.impl.FirClassLikeSymbol +import org.jetbrains.kotlin.fir.symbols.impl.FirClassifierSymbol +import org.jetbrains.kotlin.fir.symbols.impl.FirRegularClassSymbol +import org.jetbrains.kotlin.fir.symbols.impl.FirTypeParameterSymbol import org.jetbrains.kotlin.fir.symbols.lazyResolveToPhase -import org.jetbrains.kotlin.fir.types.builder.* +import org.jetbrains.kotlin.fir.types.builder.buildErrorTypeRef +import org.jetbrains.kotlin.fir.types.builder.buildResolvedTypeRef import org.jetbrains.kotlin.fir.types.impl.ConeClassLikeTypeImpl import org.jetbrains.kotlin.fir.types.impl.ConeTypeParameterTypeImpl import org.jetbrains.kotlin.fir.types.lowerBoundIfFlexible @@ -652,7 +656,7 @@ private fun FirTypeParameter.eraseToUpperBound( if (intersectUpperBounds) { ConeTypeIntersector.intersectTypes(session.typeContext, symbol.resolvedBounds.map(::eraseAsUpperBound)) } else { - eraseAsUpperBound(symbol.resolvedBounds.first()) + eraseAsUpperBound(symbol.fir.bounds.first() as FirResolvedTypeRef) } } } diff --git a/compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction/JavaSuperType.fir.kt b/compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction/JavaSuperType.fir.kt index 11577be6c5f..48fa31cfc5c 100644 --- a/compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction/JavaSuperType.fir.kt +++ b/compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction/JavaSuperType.fir.kt @@ -1,4 +1,3 @@ -// FIR_DISABLE_LAZY_RESOLVE_CHECKS // FILE: A.java public class A {} diff --git a/compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction/JavaSuperType.kt b/compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction/JavaSuperType.kt index 86dad51cbd7..4975f00c566 100644 --- a/compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction/JavaSuperType.kt +++ b/compiler/testData/diagnostics/tests/declarationChecks/finiteBoundRestriction/JavaSuperType.kt @@ -1,4 +1,3 @@ -// FIR_DISABLE_LAZY_RESOLVE_CHECKS // FILE: A.java public class A {} diff --git a/compiler/testData/diagnostics/tests/j+k/rawOverride.kt b/compiler/testData/diagnostics/tests/j+k/rawOverride.kt index d10b734fc3e..0fae263910f 100644 --- a/compiler/testData/diagnostics/tests/j+k/rawOverride.kt +++ b/compiler/testData/diagnostics/tests/j+k/rawOverride.kt @@ -1,4 +1,3 @@ -// FIR_DISABLE_LAZY_RESOLVE_CHECKS // FIR_IDENTICAL // SKIP_TXT diff --git a/compiler/testData/diagnostics/tests/j+k/rawUpperBounds.kt b/compiler/testData/diagnostics/tests/j+k/rawUpperBounds.kt index d427ac3b872..a26edc32725 100644 --- a/compiler/testData/diagnostics/tests/j+k/rawUpperBounds.kt +++ b/compiler/testData/diagnostics/tests/j+k/rawUpperBounds.kt @@ -1,4 +1,3 @@ -// FIR_DISABLE_LAZY_RESOLVE_CHECKS // FIR_IDENTICAL // SKIP_TXT diff --git a/compiler/testData/diagnostics/tests/j+k/types/upperBoundsCheckAgainstSelfTypeInJava.kt b/compiler/testData/diagnostics/tests/j+k/types/upperBoundsCheckAgainstSelfTypeInJava.kt index 971a2041684..cd685eff939 100644 --- a/compiler/testData/diagnostics/tests/j+k/types/upperBoundsCheckAgainstSelfTypeInJava.kt +++ b/compiler/testData/diagnostics/tests/j+k/types/upperBoundsCheckAgainstSelfTypeInJava.kt @@ -1,4 +1,3 @@ -// FIR_DISABLE_LAZY_RESOLVE_CHECKS // FIR_IDENTICAL // SKIP_TXT diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawOverrides.kt b/compiler/testData/diagnostics/tests/platformTypes/rawOverrides.kt index a5e796b93b7..2cb078fa70f 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawOverrides.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawOverrides.kt @@ -1,4 +1,3 @@ -// FIR_DISABLE_LAZY_RESOLVE_CHECKS // FIR_IDENTICAL // FILE: A.java import java.util.*; diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawSamOverrides.kt b/compiler/testData/diagnostics/tests/platformTypes/rawSamOverrides.kt index c51fca0589d..06c20fff4ac 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawSamOverrides.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawSamOverrides.kt @@ -1,4 +1,3 @@ -// FIR_DISABLE_LAZY_RESOLVE_CHECKS // FIR_IDENTICAL // (failed) attempt to reproduce exception in // http://stackoverflow.com/questions/42571812/unsupportedoperationexception-while-building-a-kotlin-project-in-idea diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawTypeInUpperBound.fir.kt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawTypeInUpperBound.fir.kt index 70941c67596..78ba2134bd4 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawTypeInUpperBound.fir.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawTypeInUpperBound.fir.kt @@ -1,4 +1,3 @@ -// FIR_DISABLE_LAZY_RESOLVE_CHECKS // !DIAGNOSTICS: -UNUSED_VARIABLE // FILE: A.java diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawTypeInUpperBound.kt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawTypeInUpperBound.kt index 20bb7d18d58..26b400d8260 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawTypeInUpperBound.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/rawTypeInUpperBound.kt @@ -1,4 +1,3 @@ -// FIR_DISABLE_LAZY_RESOLVE_CHECKS // !DIAGNOSTICS: -UNUSED_VARIABLE // FILE: A.java diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/recursiveBound.kt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/recursiveBound.kt index e37a4151074..dd18ccfe9a0 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/recursiveBound.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/recursiveBound.kt @@ -1,4 +1,3 @@ -// FIR_DISABLE_LAZY_RESOLVE_CHECKS // FIR_IDENTICAL // !DIAGNOSTICS: -UNUSED_VARIABLE // FILE: A.java diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/starProjectionToRaw.kt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/starProjectionToRaw.kt index 5bd349b8485..54e0a5c1bbc 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/starProjectionToRaw.kt +++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/starProjectionToRaw.kt @@ -1,4 +1,3 @@ -// FIR_DISABLE_LAZY_RESOLVE_CHECKS // FIR_IDENTICAL // !DIAGNOSTICS: -UNUSED_VARIABLE // FILE: A.java