[FIR] Ignore failing test, improve DiagnosticKind, fix UPPER_BOUND

This commit is contained in:
Nick
2020-07-28 15:39:30 +03:00
committed by Mikhail Glukhikh
parent 9335e09149
commit 889324e972
150 changed files with 398 additions and 613 deletions
@@ -7,8 +7,8 @@ abstract class Foo<T> {
} }
fun <T> foo() { fun <T> foo() {
bar<<!TYPE_ARGUMENTS_NOT_ALLOWED, UPPER_BOUND_VIOLATED!>T<Int><!>>() bar<<!TYPE_ARGUMENTS_NOT_ALLOWED!>T<Int><!>>()
bar<List<List<<!TYPE_ARGUMENTS_NOT_ALLOWED, UPPER_BOUND_VIOLATED!>T<Boolean><!>>>>() bar<List<List<<!TYPE_ARGUMENTS_NOT_ALLOWED!>T<Boolean><!>>>>()
} }
fun <T> bar() {} fun <T> bar() {}
@@ -27,8 +27,8 @@ fun <G> gest() {}
fun <T> fest() { fun <T> fest() {
val b: List<<!TYPE_ARGUMENTS_NOT_ALLOWED!>T<Double><!>> val b: List<<!TYPE_ARGUMENTS_NOT_ALLOWED!>T<Double><!>>
gest<<!TYPE_ARGUMENTS_NOT_ALLOWED, UPPER_BOUND_VIOLATED!>T<Char><!>>() gest<<!TYPE_ARGUMENTS_NOT_ALLOWED!>T<Char><!>>()
gest<T>() gest<T>()
val c: List<List<List<<!TYPE_ARGUMENTS_NOT_ALLOWED!>T<String><!>>>> val c: List<List<List<<!TYPE_ARGUMENTS_NOT_ALLOWED!>T<String><!>>>>
gest<List<List<<!TYPE_ARGUMENTS_NOT_ALLOWED, UPPER_BOUND_VIOLATED!>T<Boolean><!>>>>() gest<List<List<<!TYPE_ARGUMENTS_NOT_ALLOWED!>T<Boolean><!>>>>()
} }
@@ -14,8 +14,8 @@ fun test() {
val b1 = B<<!UPPER_BOUND_VIOLATED!>Int<!>>() val b1 = B<<!UPPER_BOUND_VIOLATED!>Int<!>>()
val b2 = B<C>() val b2 = B<C>()
val b3 = B<<!UPPER_BOUND_VIOLATED!>Any?<!>>() val b3 = B<<!UPPER_BOUND_VIOLATED!>Any?<!>>()
val b4 = B<<!OTHER_ERROR, UPPER_BOUND_VIOLATED!>UnexistingType<!>>() val b4 = B<<!UNRESOLVED_REFERENCE!>UnexistingType<!>>()
val b5 = B<<!OTHER_ERROR, UPPER_BOUND_VIOLATED!>B<UnexistingType><!>>() val b5 = B<<!UNRESOLVED_REFERENCE!>B<UnexistingType><!>>()
fest<<!UPPER_BOUND_VIOLATED!>Boolean<!>>() fest<<!UPPER_BOUND_VIOLATED!>Boolean<!>>()
fest<C>() fest<C>()
fest<HHH>() fest<HHH>()
@@ -1,5 +1,5 @@
import incorrect.directory.Your import incorrect.directory.Your
typealias My = <!OTHER_ERROR!>incorrect.directory.My<!> typealias My = <!UNRESOLVED_REFERENCE!>incorrect.directory.My<!>
typealias Your = <!OTHER_ERROR!>Your<!> typealias Your = <!OTHER_ERROR!>Your<!>
@@ -15,7 +15,7 @@ package other
import test.Test.* import test.Test.*
abstract class Factory { abstract class Factory {
abstract fun createTest(): <!OTHER_ERROR!>Test<!> abstract fun createTest(): <!UNRESOLVED_REFERENCE!>Test<!>
abstract fun createObj(): O abstract fun createObj(): O
@@ -9,9 +9,9 @@ abstract class My<T : Some> {
abstract fun foo(arg: T) abstract fun foo(arg: T)
abstract val y: <!OTHER_ERROR!>My.T<!> abstract val y: My.T
abstract val z: <!OTHER_ERROR!>test.My.T<!> abstract val z: test.My.T
class Some : <!UNRESOLVED_REFERENCE!>T<!>() class Some : <!UNRESOLVED_REFERENCE!>T<!>()
} }
@@ -10,4 +10,4 @@ class A<T1, T2> {
fun <R1, R2, R3> foo(c: A<R1, R1>.B<R2, R2>.C<R3, R3>) {} fun <R1, R2, R3> foo(c: A<R1, R1>.B<R2, R2>.C<R3, R3>) {}
fun <R3> foo(c: <!OTHER_ERROR!>A.B.C<R3, R3><!>) {} fun <R3> foo(c: A.B.C<R3, R3>) {}
@@ -58,6 +58,6 @@ class Test6 : E, <!EXPOSED_SUPER_CLASS!>C.CPublic<!> {
} }
class Test7 : <!OTHER_ERROR!>D.PublicButProtected<!> { class Test7 : <!UNRESOLVED_REFERENCE!>D.PublicButProtected<!> {
} }
@@ -47,7 +47,11 @@ object FirUpperBoundViolatedChecker : FirQualifiedAccessChecker() {
functionCall.typeArguments[it].safeAs<FirTypeProjectionWithVariance>() functionCall.typeArguments[it].safeAs<FirTypeProjectionWithVariance>()
?.typeRef.safeAs<FirResolvedTypeRef>() ?.typeRef.safeAs<FirResolvedTypeRef>()
?.let { that -> ?.let { that ->
parameterPairs[calleeFir.typeParameters[it].symbol] = that if (that !is FirErrorTypeRef) {
parameterPairs[calleeFir.typeParameters[it].symbol] = that
} else {
return
}
} }
} }
@@ -124,7 +128,11 @@ object FirUpperBoundViolatedChecker : FirQualifiedAccessChecker() {
for (it in 0 until count) { for (it in 0 until count) {
actualConstructor.typeArguments[it].safeAs<ConeSimpleKotlinType>() actualConstructor.typeArguments[it].safeAs<ConeSimpleKotlinType>()
?.let { that -> ?.let { that ->
constructorsParameterPairs[protoConstructor.typeParameters[it].symbol] = that if (that !is ConeClassErrorType) {
constructorsParameterPairs[protoConstructor.typeParameters[it].symbol] = that
} else {
return
}
} }
} }
@@ -180,7 +188,11 @@ object FirUpperBoundViolatedChecker : FirQualifiedAccessChecker() {
for (it in 0 until count) { for (it in 0 until count) {
type.typeArguments[it].safeAs<ConeClassLikeType>() type.typeArguments[it].safeAs<ConeClassLikeType>()
?.let { that -> ?.let { that ->
parameterPairs[prototypeClass.typeParameters[it].symbol] = that if (that !is ConeClassErrorType) {
parameterPairs[prototypeClass.typeParameters[it].symbol] = that
} else {
return true
}
} }
} }
@@ -89,6 +89,8 @@ class ErrorNodeDiagnosticCollectorComponent(collector: AbstractDiagnosticCollect
is ConeUnexpectedTypeArgumentsError -> FirErrors.TYPE_ARGUMENTS_NOT_ALLOWED.on(diagnostic.source.safeAs() ?: source) is ConeUnexpectedTypeArgumentsError -> FirErrors.TYPE_ARGUMENTS_NOT_ALLOWED.on(diagnostic.source.safeAs() ?: source)
is ConeSimpleDiagnostic -> if (source.kind is FirFakeSourceElementKind) { is ConeSimpleDiagnostic -> if (source.kind is FirFakeSourceElementKind) {
null null
} else if (diagnostic.kind == SymbolNotFound) {
FirErrors.UNRESOLVED_REFERENCE.on(source, "<No name>")
} else { } else {
diagnostic.getFactory().on(source) diagnostic.getFactory().on(source)
} }
@@ -120,6 +122,10 @@ class ErrorNodeDiagnosticCollectorComponent(collector: AbstractDiagnosticCollect
JumpOutsideLoop -> FirErrors.BREAK_OR_CONTINUE_OUTSIDE_A_LOOP JumpOutsideLoop -> FirErrors.BREAK_OR_CONTINUE_OUTSIDE_A_LOOP
NotLoopLabel -> FirErrors.NOT_A_LOOP_LABEL NotLoopLabel -> FirErrors.NOT_A_LOOP_LABEL
VariableExpected -> FirErrors.VARIABLE_EXPECTED VariableExpected -> FirErrors.VARIABLE_EXPECTED
NoTypeForTypeParameter -> FirErrors.NO_TYPE_FOR_TYPE_PARAMETER
UnknownCallableKind -> FirErrors.UNKNOWN_CALLABLE_KIND
IllegalProjectionUsage -> FirErrors.ILLEGAL_PROJECTION_USAGE
MissingStdlibClass -> FirErrors.MISSING_STDLIB_CLASS
Other -> FirErrors.OTHER_ERROR Other -> FirErrors.OTHER_ERROR
else -> throw IllegalArgumentException("Unsupported diagnostic kind: $kind at $javaClass") else -> throw IllegalArgumentException("Unsupported diagnostic kind: $kind at $javaClass")
} }
@@ -88,6 +88,11 @@ object FirErrors {
val LOCAL_INTERFACE_NOT_ALLOWED by error0<FirSourceElement, PsiElement>() val LOCAL_INTERFACE_NOT_ALLOWED by error0<FirSourceElement, PsiElement>()
val TYPE_PARAMETERS_IN_OBJECT by error0<FirSourceElement, PsiElement>() val TYPE_PARAMETERS_IN_OBJECT by error0<FirSourceElement, PsiElement>()
val NO_TYPE_FOR_TYPE_PARAMETER by error0<FirSourceElement, PsiElement>()
val UNKNOWN_CALLABLE_KIND by error0<FirSourceElement, PsiElement>()
val ILLEGAL_PROJECTION_USAGE by error0<FirSourceElement, PsiElement>()
val MISSING_STDLIB_CLASS by error0<FirSourceElement, PsiElement>()
// Control flow diagnostics // Control flow diagnostics
val UNINITIALIZED_VARIABLE by error1<FirSourceElement, PsiElement, FirPropertySymbol>() val UNINITIALIZED_VARIABLE by error1<FirSourceElement, PsiElement, FirPropertySymbol>()
@@ -75,7 +75,7 @@ internal fun FirTypeRef.toConeKotlinTypeProbablyFlexible(
type.toConeKotlinTypeWithoutEnhancement(session, javaTypeParameterStack) type.toConeKotlinTypeWithoutEnhancement(session, javaTypeParameterStack)
} }
else -> ConeKotlinErrorType( else -> ConeKotlinErrorType(
ConeSimpleDiagnostic("Unexpected type reference in JavaClassUseSiteMemberScope: ${this::class.java}") ConeSimpleDiagnostic("Unexpected type reference in JavaClassUseSiteMemberScope: ${this::class.java}", DiagnosticKind.Java)
) )
} }
@@ -321,7 +321,7 @@ private fun JavaClassifierType.toConeKotlinTypeForFlexibleBound(
val symbol = javaTypeParameterStack[classifier] val symbol = javaTypeParameterStack[classifier]
ConeTypeParameterTypeImpl(symbol.toLookupTag(), isNullable = !isLowerBound) ConeTypeParameterTypeImpl(symbol.toLookupTag(), isNullable = !isLowerBound)
} }
else -> ConeKotlinErrorType(ConeSimpleDiagnostic("Unexpected classifier: $classifier")) else -> ConeKotlinErrorType(ConeSimpleDiagnostic("Unexpected classifier: $classifier", DiagnosticKind.Java))
} }
} }
@@ -396,7 +396,7 @@ private fun JavaType?.toConeProjectionWithoutEnhancement(
} }
is JavaClassifierType -> toConeKotlinTypeWithoutEnhancement(session, javaTypeParameterStack) is JavaClassifierType -> toConeKotlinTypeWithoutEnhancement(session, javaTypeParameterStack)
is JavaArrayType -> toConeKotlinTypeWithoutEnhancement(session, javaTypeParameterStack) is JavaArrayType -> toConeKotlinTypeWithoutEnhancement(session, javaTypeParameterStack)
else -> ConeClassErrorType(ConeSimpleDiagnostic("Unexpected type argument: $this")) else -> ConeClassErrorType(ConeSimpleDiagnostic("Unexpected type argument: $this", DiagnosticKind.Java))
} }
} }
@@ -501,7 +501,7 @@ private fun JavaType.toFirResolvedTypeRef(
forTypeParameterBounds = false forTypeParameterBounds = false
) )
return buildResolvedTypeRef { return buildResolvedTypeRef {
type = ConeClassErrorType(ConeSimpleDiagnostic("Unexpected JavaType: $this")) type = ConeClassErrorType(ConeSimpleDiagnostic("Unexpected JavaType: $this", DiagnosticKind.Java))
} }
} }
@@ -12,6 +12,7 @@ import org.jetbrains.kotlin.fir.declarations.FirTypeParameterRefsOwner
import org.jetbrains.kotlin.fir.declarations.addDefaultBoundIfNecessary import org.jetbrains.kotlin.fir.declarations.addDefaultBoundIfNecessary
import org.jetbrains.kotlin.fir.declarations.builder.FirTypeParameterBuilder import org.jetbrains.kotlin.fir.declarations.builder.FirTypeParameterBuilder
import org.jetbrains.kotlin.fir.diagnostics.ConeSimpleDiagnostic import org.jetbrains.kotlin.fir.diagnostics.ConeSimpleDiagnostic
import org.jetbrains.kotlin.fir.diagnostics.DiagnosticKind
import org.jetbrains.kotlin.fir.resolve.toSymbol import org.jetbrains.kotlin.fir.resolve.toSymbol
import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.firUnsafe import org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.firUnsafe
import org.jetbrains.kotlin.fir.symbols.ConeClassLikeLookupTag import org.jetbrains.kotlin.fir.symbols.ConeClassLikeLookupTag
@@ -104,7 +105,7 @@ class FirTypeDeserializer(
//c.components.flexibleTypeDeserializer.create(proto, id, lowerBound, upperBound) //c.components.flexibleTypeDeserializer.create(proto, id, lowerBound, upperBound)
} }
return simpleType(proto, attributes) ?: ConeKotlinErrorType(ConeSimpleDiagnostic("?!id:0")) return simpleType(proto, attributes) ?: ConeKotlinErrorType(ConeSimpleDiagnostic("?!id:0", DiagnosticKind.DeserializationError))
} }
private fun typeParameterSymbol(typeParameterId: Int): ConeTypeParameterLookupTag? = private fun typeParameterSymbol(typeParameterId: Int): ConeTypeParameterLookupTag? =
@@ -204,7 +205,10 @@ class FirTypeDeserializer(
else -> null else -> null
} }
return result ?: ConeClassErrorType( return result ?: ConeClassErrorType(
ConeSimpleDiagnostic("Bad suspend function in metadata with constructor: $functionTypeConstructor") ConeSimpleDiagnostic(
"Bad suspend function in metadata with constructor: $functionTypeConstructor",
DiagnosticKind.DeserializationError
)
) )
} }
@@ -230,7 +234,7 @@ class FirTypeDeserializer(
val variance = ProtoEnumFlags.variance(typeArgumentProto.projection) val variance = ProtoEnumFlags.variance(typeArgumentProto.projection)
val type = typeArgumentProto.type(typeTable) val type = typeArgumentProto.type(typeTable)
?: return ConeKotlinErrorType(ConeSimpleDiagnostic("No type recorded")) ?: return ConeKotlinErrorType(ConeSimpleDiagnostic("No type recorded", DiagnosticKind.DeserializationError))
// TODO: check that here we don't have any attributes // TODO: check that here we don't have any attributes
val coneType = type(type, ConeAttributes.Empty) val coneType = type(type, ConeAttributes.Empty)
@@ -10,10 +10,7 @@ import org.jetbrains.kotlin.builtins.functions.FunctionClassDescriptor
import org.jetbrains.kotlin.descriptors.ClassKind import org.jetbrains.kotlin.descriptors.ClassKind
import org.jetbrains.kotlin.fir.* import org.jetbrains.kotlin.fir.*
import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.declarations.*
import org.jetbrains.kotlin.fir.diagnostics.ConeIntermediateDiagnostic import org.jetbrains.kotlin.fir.diagnostics.*
import org.jetbrains.kotlin.fir.diagnostics.ConeSimpleDiagnostic
import org.jetbrains.kotlin.fir.diagnostics.ConeStubDiagnostic
import org.jetbrains.kotlin.fir.diagnostics.ConeUnexpectedTypeArgumentsError
import org.jetbrains.kotlin.fir.expressions.* import org.jetbrains.kotlin.fir.expressions.*
import org.jetbrains.kotlin.fir.expressions.builder.FirResolvedReifiedParameterReferenceBuilder import org.jetbrains.kotlin.fir.expressions.builder.FirResolvedReifiedParameterReferenceBuilder
import org.jetbrains.kotlin.fir.expressions.builder.buildExpressionWithSmartcast import org.jetbrains.kotlin.fir.expressions.builder.buildExpressionWithSmartcast
@@ -207,7 +204,12 @@ fun FirFunction<*>.constructFunctionalTypeRef(isSuspend: Boolean = false): FirRe
else -> null else -> null
} }
val parameters = valueParameters.map { val parameters = valueParameters.map {
it.returnTypeRef.coneTypeSafe<ConeKotlinType>() ?: ConeKotlinErrorType(ConeSimpleDiagnostic("No type for parameter")) it.returnTypeRef.coneTypeSafe<ConeKotlinType>() ?: ConeKotlinErrorType(
ConeSimpleDiagnostic(
"No type for parameter",
DiagnosticKind.NoTypeForTypeParameter
)
)
} }
val rawReturnType = (this as FirTypedDeclaration).returnTypeRef.coneType val rawReturnType = (this as FirTypedDeclaration).returnTypeRef.coneType
@@ -331,7 +333,12 @@ fun <T : FirResolvable> BodyResolveComponents.typeFromCallee(access: T): FirReso
val implicitReceiver = implicitReceiverStack[labelName] val implicitReceiver = implicitReceiverStack[labelName]
buildResolvedTypeRef { buildResolvedTypeRef {
source = null source = null
type = implicitReceiver?.type ?: ConeKotlinErrorType(ConeSimpleDiagnostic("Unresolved this@$labelName")) type = implicitReceiver?.type ?: ConeKotlinErrorType(
ConeSimpleDiagnostic(
"Unresolved this@$labelName",
DiagnosticKind.UnresolvedLabel
)
)
} }
} }
is FirSuperReference -> { is FirSuperReference -> {
@@ -9,6 +9,7 @@ import org.jetbrains.kotlin.descriptors.Visibilities
import org.jetbrains.kotlin.fir.FirSession import org.jetbrains.kotlin.fir.FirSession
import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.declarations.*
import org.jetbrains.kotlin.fir.diagnostics.ConeSimpleDiagnostic import org.jetbrains.kotlin.fir.diagnostics.ConeSimpleDiagnostic
import org.jetbrains.kotlin.fir.diagnostics.DiagnosticKind
import org.jetbrains.kotlin.fir.expressions.FirExpression import org.jetbrains.kotlin.fir.expressions.FirExpression
import org.jetbrains.kotlin.fir.expressions.FirQualifiedAccessExpression import org.jetbrains.kotlin.fir.expressions.FirQualifiedAccessExpression
import org.jetbrains.kotlin.fir.expressions.FirResolvedQualifier import org.jetbrains.kotlin.fir.expressions.FirResolvedQualifier
@@ -236,7 +237,7 @@ internal object CheckCallableReferenceExpectedType : CheckerStage() {
expectedReturnType = extractInputOutputTypesFromCallableReferenceExpectedType(expectedType, callInfo.session)?.outputType expectedReturnType = extractInputOutputTypesFromCallableReferenceExpectedType(expectedType, callInfo.session)?.outputType
) )
is FirVariable<*> -> createKPropertyType(fir, resultingReceiverType, returnTypeRef) is FirVariable<*> -> createKPropertyType(fir, resultingReceiverType, returnTypeRef)
else -> ConeKotlinErrorType(ConeSimpleDiagnostic("Unknown callable kind: ${fir::class}")) else -> ConeKotlinErrorType(ConeSimpleDiagnostic("Unknown callable kind: ${fir::class}", DiagnosticKind.UnknownCallableKind))
}.let(candidate.substitutor::substituteOrSelf) }.let(candidate.substitutor::substituteOrSelf)
candidate.resultingTypeForCallableReference = resultingType candidate.resultingTypeForCallableReference = resultingType
@@ -95,7 +95,7 @@ class FirTypeResolverImpl(private val session: FirSession) : FirTypeResolver {
areBareTypesAllowed: Boolean areBareTypesAllowed: Boolean
): ConeKotlinType { ): ConeKotlinType {
if (symbol == null) { if (symbol == null) {
return ConeKotlinErrorType(ConeSimpleDiagnostic("Symbol not found, for `${typeRef.render()}`")) return ConeKotlinErrorType(ConeSimpleDiagnostic("Symbol not found, for `${typeRef.render()}`", DiagnosticKind.SymbolNotFound))
} }
if (symbol is FirTypeParameterSymbol) { if (symbol is FirTypeParameterSymbol) {
for (part in typeRef.qualifier) { for (part in typeRef.qualifier) {
@@ -122,8 +122,12 @@ class FirTypeResolverImpl(private val session: FirSession) : FirTypeResolver {
} else { } else {
val argumentsFromOuterClassesAndParents = symbol.fir.typeParameters.takeLast(n).map { val argumentsFromOuterClassesAndParents = symbol.fir.typeParameters.takeLast(n).map {
val type = ConeTypeParameterTypeImpl(ConeTypeParameterLookupTag(it.symbol), isNullable = false) val type = ConeTypeParameterTypeImpl(ConeTypeParameterLookupTag(it.symbol), isNullable = false)
// we should report ConeSimpleDiagnostic(..., WrongNumberOfTypeArguments)
// but genericArgumentNumberMismatch.kt test fails with
// index out of bounds exception for start offset of
// the source
substitutor.substituteOrNull(type) substitutor.substituteOrNull(type)
?: ConeClassErrorType(ConeSimpleDiagnostic("Type argument not defined")) ?: ConeClassErrorType(ConeIntermediateDiagnostic("Type argument not defined"))
}.toTypedArray<ConeTypeProjection>() }.toTypedArray<ConeTypeProjection>()
typeArguments += argumentsFromOuterClassesAndParents typeArguments += argumentsFromOuterClassesAndParents
} }
@@ -11,6 +11,7 @@ import org.jetbrains.kotlin.fir.declarations.FirMemberDeclaration
import org.jetbrains.kotlin.fir.declarations.FirRegularClass import org.jetbrains.kotlin.fir.declarations.FirRegularClass
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
import org.jetbrains.kotlin.fir.diagnostics.ConeSimpleDiagnostic import org.jetbrains.kotlin.fir.diagnostics.ConeSimpleDiagnostic
import org.jetbrains.kotlin.fir.diagnostics.DiagnosticKind
import org.jetbrains.kotlin.fir.expressions.FirStatement import org.jetbrains.kotlin.fir.expressions.FirStatement
import org.jetbrains.kotlin.fir.resolve.lookupSuperTypes import org.jetbrains.kotlin.fir.resolve.lookupSuperTypes
import org.jetbrains.kotlin.fir.resolve.providers.getNestedClassifierScope import org.jetbrains.kotlin.fir.resolve.providers.getNestedClassifierScope
@@ -85,7 +86,7 @@ abstract class FirAbstractTreeTransformerWithSuperTypes(
fun createSubstitutionForSupertype(superType: ConeLookupTagBasedType, session: FirSession): ConeSubstitutor { fun createSubstitutionForSupertype(superType: ConeLookupTagBasedType, session: FirSession): ConeSubstitutor {
val klass = superType.lookupTag.toSymbol(session)?.fir as? FirRegularClass ?: return ConeSubstitutor.Empty val klass = superType.lookupTag.toSymbol(session)?.fir as? FirRegularClass ?: return ConeSubstitutor.Empty
val arguments = superType.typeArguments.map { val arguments = superType.typeArguments.map {
it as? ConeKotlinType ?: ConeClassErrorType(ConeSimpleDiagnostic("illegal projection usage")) it as? ConeKotlinType ?: ConeClassErrorType(ConeSimpleDiagnostic("illegal projection usage", DiagnosticKind.IllegalProjectionUsage))
} }
val mapping = klass.typeParameters.map { it.symbol }.zip(arguments).toMap() val mapping = klass.typeParameters.map { it.symbol }.zip(arguments).toMap()
return ConeSubstitutorByMap(mapping) return ConeSubstitutorByMap(mapping)
@@ -916,7 +916,7 @@ open class FirDeclarationsResolveTransformer(transformer: FirBodyResolveTransfor
valueParameter.transformReturnTypeRef( valueParameter.transformReturnTypeRef(
StoreType, StoreType,
valueParameter.returnTypeRef.resolvedTypeFromPrototype( valueParameter.returnTypeRef.resolvedTypeFromPrototype(
ConeKotlinErrorType(ConeSimpleDiagnostic("No type for parameter")) ConeKotlinErrorType(ConeSimpleDiagnostic("No type for parameter", DiagnosticKind.NoTypeForTypeParameter))
) )
) )
} }
@@ -78,7 +78,7 @@ open class FirExpressionsResolveTransformer(transformer: FirBodyResolveTransform
callee.replaceBoundSymbol(it) callee.replaceBoundSymbol(it)
} }
qualifiedAccessExpression.resultType = buildResolvedTypeRef { qualifiedAccessExpression.resultType = buildResolvedTypeRef {
type = implicitReceiver?.type ?: ConeKotlinErrorType(ConeSimpleDiagnostic("Unresolved this@$labelName")) type = implicitReceiver?.type ?: ConeKotlinErrorType(ConeSimpleDiagnostic("Unresolved this@$labelName", DiagnosticKind.UnresolvedLabel))
} }
qualifiedAccessExpression qualifiedAccessExpression
} }
@@ -660,7 +660,7 @@ open class FirExpressionsResolveTransformer(transformer: FirBodyResolveTransform
private fun FirConstKind<*>.expectedConeType(): ConeKotlinType { private fun FirConstKind<*>.expectedConeType(): ConeKotlinType {
fun constructLiteralType(classId: ClassId, isNullable: Boolean = false): ConeKotlinType { fun constructLiteralType(classId: ClassId, isNullable: Boolean = false): ConeKotlinType {
val symbol = symbolProvider.getClassLikeSymbolByFqName(classId) val symbol = symbolProvider.getClassLikeSymbolByFqName(classId)
?: return ConeClassErrorType(ConeSimpleDiagnostic("Missing stdlib class: $classId")) ?: return ConeClassErrorType(ConeSimpleDiagnostic("Missing stdlib class: $classId", DiagnosticKind.MissingStdlibClass))
return symbol.toLookupTag().constructClassType(emptyArray(), isNullable) return symbol.toLookupTag().constructClassType(emptyArray(), isNullable)
} }
return when (this) { return when (this) {
@@ -27,5 +27,10 @@ enum class DiagnosticKind {
Java, Java,
SuperNotAllowed, SuperNotAllowed,
WrongNumberOfTypeArguments, WrongNumberOfTypeArguments,
NoTypeForTypeParameter,
UnknownCallableKind,
SymbolNotFound,
IllegalProjectionUsage,
MissingStdlibClass,
Other Other
} }
+21 -21
View File
@@ -3,53 +3,53 @@
enum class Color { enum class Color {
RED { RED {
fun <T : <!OTHER_ERROR!>RED<!>> simpleName(): <!OTHER_ERROR!>RED<!> = null!! fun <T : <!UNRESOLVED_REFERENCE!>RED<!>> simpleName(): <!UNRESOLVED_REFERENCE!>RED<!> = null!!
} }
} }
class MyColor(val x: <!OTHER_ERROR!>Color.RED<!>, y: <!OTHER_ERROR!>Color.RED<!>) : <!OTHER_ERROR!>Color.RED<!> { class MyColor(val x: <!UNRESOLVED_REFERENCE!>Color.RED<!>, y: <!UNRESOLVED_REFERENCE!>Color.RED<!>) : <!UNRESOLVED_REFERENCE!>Color.RED<!> {
var z: <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>Color.RED<!> = Color.RED var z: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Color.RED<!> = Color.RED
set(arg: Color.RED) { z = arg } set(arg: Color.RED) { z = arg }
fun foo(arg: <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>Color.RED<!>): <!OTHER_ERROR!>Color.RED<!> = arg fun foo(arg: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Color.RED<!>): <!UNRESOLVED_REFERENCE!>Color.RED<!> = arg
fun bar(): <!OTHER_ERROR!>Color.RED<!> { fun bar(): <!UNRESOLVED_REFERENCE!>Color.RED<!> {
class Local : <!OTHER_ERROR!>Color.RED<!> class Local : <!UNRESOLVED_REFERENCE!>Color.RED<!>
fun local(arg: <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>Color.RED<!>): <!OTHER_ERROR!>Color.RED<!> = arg fun local(arg: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Color.RED<!>): <!UNRESOLVED_REFERENCE!>Color.RED<!> = arg
val temp: <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>Color.RED<!> = Color.RED val temp: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Color.RED<!> = Color.RED
temp as? <!OTHER_ERROR!>Color.RED<!> temp as? <!UNRESOLVED_REFERENCE!>Color.RED<!>
if (temp is <!OTHER_ERROR!>Color.RED<!>) { if (temp is <!UNRESOLVED_REFERENCE!>Color.RED<!>) {
return temp as <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>Color.RED<!> return temp as <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Color.RED<!>
} }
val obj = object : <!OTHER_ERROR!>Color.RED<!> {} val obj = object : <!UNRESOLVED_REFERENCE!>Color.RED<!> {}
if (obj is <!OTHER_ERROR!>Color.RED<!>) { if (obj is <!UNRESOLVED_REFERENCE!>Color.RED<!>) {
return obj return obj
} }
return Color.RED return Color.RED
} }
} }
fun create(): <!OTHER_ERROR!>Array<Color.RED>?<!> = null fun create(): <!UNRESOLVED_REFERENCE!>Array<Color.RED>?<!> = null
interface Your<T : <!OTHER_ERROR!>Color.RED<!>> interface Your<T : <!UNRESOLVED_REFERENCE!>Color.RED<!>>
class His : <!OTHER_ERROR!>Your<Color.RED><!> class His : <!UNRESOLVED_REFERENCE!>Your<Color.RED><!>
fun <T : <!OTHER_ERROR!>Color.RED<!>> otherCreate(): Array<T>? = null fun <T : <!UNRESOLVED_REFERENCE!>Color.RED<!>> otherCreate(): Array<T>? = null
typealias RedAlias = <!OTHER_ERROR!>Color.RED<!> typealias RedAlias = <!UNRESOLVED_REFERENCE!>Color.RED<!>
typealias ArrayOfEnumEntry = <!OTHER_ERROR!>Array<Color.RED><!> typealias ArrayOfEnumEntry = <!UNRESOLVED_REFERENCE!>Array<Color.RED><!>
typealias ArrayOfEnumEntryAlias = Array<RedAlias> typealias ArrayOfEnumEntryAlias = Array<RedAlias>
fun <T> bar(a: Any): T = a as T fun <T> bar(a: Any): T = a as T
fun <T> foo() { fun <T> foo() {
foo<<!OTHER_ERROR, UPPER_BOUND_VIOLATED!>Color.RED<!>>() foo<<!UNRESOLVED_REFERENCE!>Color.RED<!>>()
foo<RedAlias>() foo<RedAlias>()
<!INAPPLICABLE_CANDIDATE!>bar<!><Color.RED>(Color.RED) <!INAPPLICABLE_CANDIDATE!>bar<!><Color.RED>(Color.RED)
} }
fun <!OTHER_ERROR!>Array<Color.RED><!>.foo(entries: <!OTHER_ERROR!>Array<Color.RED><!>): <!OTHER_ERROR!>Array<Color.RED><!> = null!! fun <!UNRESOLVED_REFERENCE!>Array<Color.RED><!>.foo(entries: <!UNRESOLVED_REFERENCE!>Array<Color.RED><!>): <!UNRESOLVED_REFERENCE!>Array<Color.RED><!> = null!!
@@ -9,7 +9,7 @@ package foo
fun f() { fun f() {
class Local1 { class Local1 {
fun g() : <!OTHER_ERROR!>bar.X?<!> = null fun g() : <!UNRESOLVED_REFERENCE!>bar.X?<!> = null
} }
class Local2 { class Local2 {
fun g() : foo.bar.X? = null fun g() : foo.bar.X? = null
+1 -1
View File
@@ -45,7 +45,7 @@ class Foo() {}
class Bar<T : Foo> class Bar<T : Foo>
class Buzz<T> where T : Bar<Int>, T : <!OTHER_ERROR!>nioho<!> class Buzz<T> where T : Bar<Int>, T : <!UNRESOLVED_REFERENCE!>nioho<!>
class X<T : Foo> class X<T : Foo>
class Y<T> where T : Foo, T : Bar<Foo> class Y<T> where T : Foo, T : Bar<Foo>
@@ -1,9 +0,0 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
// FILE: a.kt
package foo
// FILE: b.kt
@<!OTHER_ERROR!>foo<!> fun bar(p: <!OTHER_ERROR!>foo<!>): <!OTHER_ERROR!>foo<!> = null!!
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER // !DIAGNOSTICS: -UNUSED_PARAMETER
// FILE: a.kt // FILE: a.kt
@@ -6,8 +6,8 @@ package foobar.a
import java.* import java.*
val a : java.util.List<Int>? = null val a : java.util.List<Int>? = null
val a2 : <!OTHER_ERROR!>util.List<Int>?<!> = null val a2 : <!UNRESOLVED_REFERENCE!>util.List<Int>?<!> = null
val a3 : <!OTHER_ERROR!>LinkedList<Int>?<!> = null val a3 : <!UNRESOLVED_REFERENCE!>LinkedList<Int>?<!> = null
// FILE: b.kt // FILE: b.kt
package foobar package foobar
@@ -21,7 +21,7 @@ package foobar.a
import java.util.* import java.util.*
val b : List<Int>? = a val b : List<Int>? = a
val b1 : <!OTHER_ERROR!>util.List<Int>?<!> = a val b1 : <!UNRESOLVED_REFERENCE!>util.List<Int>?<!> = a
// FILE: b.kt // FILE: b.kt
package foobar package foobar
+2 -2
View File
@@ -15,10 +15,10 @@ import java.lang.Comparable as Com
val l : MutableList<in Int> = ArrayList<Int>() val l : MutableList<in Int> = ArrayList<Int>()
fun test(l : java.util.List<Int>) { fun test(l : java.util.List<Int>) {
val x : <!OTHER_ERROR!>java.List<!> val x : <!UNRESOLVED_REFERENCE!>java.List<!>
val y : java.util.List<Int> val y : java.util.List<Int>
val b : java.lang.Object val b : java.lang.Object
val z : <!OTHER_ERROR!>java.utils.List<Int><!> val z : <!UNRESOLVED_REFERENCE!>java.utils.List<Int><!>
val f : java.io.File? = null val f : java.io.File? = null
+2 -2
View File
@@ -3,8 +3,8 @@ package unresolved
class Pair<A, B>(val a: A, val b: B) class Pair<A, B>(val a: A, val b: B)
fun testGenericArgumentsCount() { fun testGenericArgumentsCount() {
val p1: <!OTHER_ERROR!>Pair<Int><!> = Pair(2, 2) val p1: Pair<Int> = Pair(2, 2)
val p2: <!OTHER_ERROR!>Pair<!> = Pair(2, 2) val p2: Pair = Pair(2, 2)
} }
fun testUnresolved() { fun testUnresolved() {
@@ -2,5 +2,5 @@
import java.util.ArrayList import java.util.ArrayList
@ArrayList<Int>(1, 1) fun b() {} @ArrayList<Int>(1, 1) fun b() {}
@<!OTHER_ERROR!>Xoo<!>(<!UNRESOLVED_REFERENCE!>x<!>) fun c() {} @<!UNRESOLVED_REFERENCE!>Xoo<!>(<!UNRESOLVED_REFERENCE!>x<!>) fun c() {}
@java.lang.Deprecated(<!UNRESOLVED_REFERENCE!>x<!>) fun a() {} @java.lang.Deprecated(<!UNRESOLVED_REFERENCE!>x<!>) fun a() {}
@@ -1,3 +0,0 @@
// Check that there won't be "Rewrite at slice ANNOTATION key" exception - EA-36935
@<!OTHER_ERROR!>someErrorAnnotation<!> object Test {
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// Check that there won't be "Rewrite at slice ANNOTATION key" exception - EA-36935 // Check that there won't be "Rewrite at slice ANNOTATION key" exception - EA-36935
@<!UNRESOLVED_REFERENCE!>someErrorAnnotation<!> object Test { @<!UNRESOLVED_REFERENCE!>someErrorAnnotation<!> object Test {
} }
@@ -1,9 +0,0 @@
package test
// Checks that there is no rewrite error at ANNOTATION slice because of resolving annotations for object in lazy resolve and resolving
// object as property (method tries to resolve annotations too).
@<!OTHER_ERROR!>BadAnnotation<!>
object SomeObject
val some = SomeObject
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
package test package test
// Checks that there is no rewrite error at ANNOTATION slice because of resolving annotations for object in lazy resolve and resolving // Checks that there is no rewrite error at ANNOTATION slice because of resolving annotations for object in lazy resolve and resolving
@@ -34,7 +34,7 @@ annotation class Ann8(val p1: Array<String>,
val p4: Array<Ann1>) val p4: Array<Ann1>)
annotation class Ann9( annotation class Ann9(
val error: <!OTHER_ERROR!>Unresolved<!> = <!UNRESOLVED_REFERENCE!>Unresolved<!>.<!UNRESOLVED_REFERENCE!>VALUE<!> val error: <!UNRESOLVED_REFERENCE!>Unresolved<!> = <!UNRESOLVED_REFERENCE!>Unresolved<!>.<!UNRESOLVED_REFERENCE!>VALUE<!>
) )
@@ -1,10 +1,10 @@
// !WITH_NEW_INFERENCE // !WITH_NEW_INFERENCE
fun foo(@<!OTHER_ERROR!>varargs<!> f : Int) {} fun foo(@<!UNRESOLVED_REFERENCE!>varargs<!> f : Int) {}
var bar : Int = 1 var bar : Int = 1
set(@<!OTHER_ERROR!>varargs<!> v) {} set(@<!UNRESOLVED_REFERENCE!>varargs<!> v) {}
val x : (Int) -> Int = {@<!OTHER_ERROR!>varargs<!> x <!SYNTAX!>: Int -> x<!>} val x : (Int) -> Int = {@<!UNRESOLVED_REFERENCE!>varargs<!> x <!SYNTAX!>: Int -> x<!>}
class Hello(@<!OTHER_ERROR!>varargs<!> args: Any) { class Hello(@<!UNRESOLVED_REFERENCE!>varargs<!> args: Any) {
} }
@@ -1,5 +1,5 @@
@<!OTHER_ERROR!>Ann<!> class A @<!UNRESOLVED_REFERENCE!>Ann<!> class A
@<!OTHER_ERROR!>Ann<!> class B @<!UNRESOLVED_REFERENCE!>Ann<!> class B
@<!OTHER_ERROR!>Ann<!>(1) class C @<!UNRESOLVED_REFERENCE!>Ann<!>(1) class C
@<!OTHER_ERROR!>kotlin.Ann<!>(1) class D @<!UNRESOLVED_REFERENCE!>kotlin.Ann<!>(1) class D
@<!OTHER_ERROR!>kotlin.annotation.Ann<!>(1) class E @<!UNRESOLVED_REFERENCE!>kotlin.annotation.Ann<!>(1) class E
@@ -27,7 +27,7 @@ class Test {
fun <T> List<T>.testClassLiteral3() = b<T, Any>::class fun <T> List<T>.testClassLiteral3() = b<T, Any>::class
fun <T> List<T>.testUnresolved1() = <!UNRESOLVED_REFERENCE!>unresolved<!><T>::foo fun <T> List<T>.testUnresolved1() = <!UNRESOLVED_REFERENCE!>unresolved<!><T>::foo
fun <T> List<T>.testUnresolved2() = a<<!OTHER_ERROR, UPPER_BOUND_VIOLATED!>unresolved<!>>::foo fun <T> List<T>.testUnresolved2() = a<<!UNRESOLVED_REFERENCE!>unresolved<!>>::foo
fun <T> List<T>.testUnresolved3() = a<<!SYNTAX!><!>>::foo fun <T> List<T>.testUnresolved3() = a<<!SYNTAX!><!>>::foo
fun <T> List<T>.testUnresolved4() = <!UNRESOLVED_REFERENCE!>unresolved<!>?::foo fun <T> List<T>.testUnresolved4() = <!UNRESOLVED_REFERENCE!>unresolved<!>?::foo
} }
@@ -5,7 +5,7 @@
// MODULE: m1 // MODULE: m1
// FILE: bar.kt // FILE: bar.kt
fun <T> bar(ff: <!OTHER_ERROR!>Err<!>.() -> Unit) { fun <T> bar(ff: <!UNRESOLVED_REFERENCE!>Err<!>.() -> Unit) {
} }
// MODULE: m2(m1) // MODULE: m2(m1)
@@ -2,10 +2,10 @@
class DTO { class DTO {
val q: Int = 0 val q: Int = 0
operator fun get(prop: <!OTHER_ERROR!>KProperty1<*, Int><!>): Int = 0 operator fun get(prop: <!UNRESOLVED_REFERENCE!>KProperty1<*, Int><!>): Int = 0
} }
fun foo(intDTO: DTO?, p: <!OTHER_ERROR!>KProperty1<*, Int><!>) { fun foo(intDTO: DTO?, p: <!UNRESOLVED_REFERENCE!>KProperty1<*, Int><!>) {
if (intDTO != null) { if (intDTO != null) {
intDTO[DTO::q] intDTO[DTO::q]
intDTO.q intDTO.q
@@ -1 +1 @@
fun testing(a: Any) = a is <!OTHER_ERROR!>UnresolvedType<Int><!> fun testing(a: Any) = a is <!UNRESOLVED_REFERENCE!>UnresolvedType<Int><!>
@@ -3,7 +3,7 @@
interface B<T> interface B<T>
interface G<T>: B<T> interface G<T>: B<T>
fun f(p: <!OTHER_ERROR, OTHER_ERROR!>B<Foo><!>): Any { fun f(p: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>B<Foo><!>): Any {
val v = p as G val v = p as G
return checkSubtype<G<*>>(v) return checkSubtype<G<*>>(v)
} }
@@ -2,7 +2,7 @@
class G<T> class G<T>
fun foo(p: <!OTHER_ERROR, OTHER_ERROR!>P<!>) { fun foo(p: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>P<!>) {
val v = p as G? val v = p as G?
checkSubtype<G<*>>(v!!) checkSubtype<G<*>>(v!!)
} }
@@ -1,6 +1,6 @@
class P class P
fun foo(p: P): Any { fun foo(p: P): Any {
val v = p as <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>G<!> val v = p as <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>G<!>
return v return v
} }
@@ -1,7 +1,7 @@
// !LANGUAGE: +BareArrayClassLiteral // !LANGUAGE: +BareArrayClassLiteral
val a01 = Array::class val a01 = Array::class
val a02 = Array<<!OTHER_ERROR!>Array<!>>::class val a02 = Array<Array>::class
val a03 = Array<Any?>::class val a03 = Array<Any?>::class
val a04 = Array<Array<Any?>?>::class val a04 = Array<Array<Any?>?>::class
val a05 = Array<IntArray?>::class val a05 = Array<IntArray?>::class
@@ -15,12 +15,12 @@ fun case_3() {
} }
val x = object<T, K: Comparable<K>> { val x = object<T, K: Comparable<K>> {
fun test() = 10 as <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>T<!> // OK fun test() = 10 as <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>T<!> // OK
} }
fun case_4() { fun case_4() {
val x = object<T> { val x = object<T> {
fun test() = 10 as <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>T<!> fun test() = 10 as <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>T<!>
} }
val y = x.test() // type y is T val y = x.test() // type y is T
@@ -15,12 +15,12 @@ fun case_3() {
} }
val x = object<T, K: Comparable<K>> { val x = object<T, K: Comparable<K>> {
fun test() = 10 as <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>T<!> // OK fun test() = 10 as <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>T<!> // OK
} }
fun case_4() { fun case_4() {
val x = object<T> { val x = object<T> {
fun test() = 10 as <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>T<!> fun test() = 10 as <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>T<!>
} }
val y = x.test() // type y is T val y = x.test() // type y is T
@@ -23,7 +23,7 @@ object DefaultHttpClientWithFun : HttpClient by fClient() {
private fun fClient() = HttpClientImpl() private fun fClient() = HttpClientImpl()
private fun <T> lazy(init: () -> T): <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>kotlin.Lazy<T><!> { private fun <T> lazy(init: () -> T): <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>kotlin.Lazy<T><!> {
init() init()
null!! null!!
} }
@@ -9,7 +9,7 @@ public class C {
open class Base () open class Base ()
class Foo : <!OTHER_ERROR!>Data<!>() class Foo : <!UNRESOLVED_REFERENCE!>Data<!>()
companion object : DerivedAbstract() companion object : DerivedAbstract()
} }
@@ -9,7 +9,7 @@ public class C {
open class Base () open class Base ()
class Foo : <!OTHER_ERROR!>Data<!>() class Foo : <!UNRESOLVED_REFERENCE!>Data<!>()
companion object : DerivedAbstract() companion object : DerivedAbstract()
} }
@@ -1,6 +1,6 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE // !DIAGNOSTICS: -UNUSED_VARIABLE
data class A(val i: Int, val j: <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>G<!>) data class A(val i: Int, val j: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>G<!>)
data class B(val i: <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>G<!>, val j: <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>G<!>) data class B(val i: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>G<!>, val j: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>G<!>)
fun fa(a: A) { fun fa(a: A) {
@@ -11,7 +11,7 @@ fun test() {
const val <T> a3 = 0 const val <T> a3 = 0
lateinit val <T> a4 = 0 lateinit val <T> a4 = 0
val <T> a5 by Delegate<Int>() val <T> a5 by Delegate<Int>()
val <T> a6 by <!INAPPLICABLE_CANDIDATE!>Delegate<<!OTHER_ERROR, UPPER_BOUND_VIOLATED!>T<!>>()<!> val <T> a6 by <!INAPPLICABLE_CANDIDATE!>Delegate<<!UNRESOLVED_REFERENCE!>T<!>>()<!>
} }
class Delegate<F> { class Delegate<F> {
@@ -11,7 +11,7 @@ fun test() {
const val <T> a3 = 0 const val <T> a3 = 0
lateinit val <T> a4 = 0 lateinit val <T> a4 = 0
val <T> a5 by Delegate<Int>() val <T> a5 by Delegate<Int>()
val <T> a6 by <!INAPPLICABLE_CANDIDATE!>Delegate<<!OTHER_ERROR, UPPER_BOUND_VIOLATED!>T<!>>()<!> val <T> a6 by <!INAPPLICABLE_CANDIDATE!>Delegate<<!UNRESOLVED_REFERENCE!>T<!>>()<!>
} }
class Delegate<F> { class Delegate<F> {
@@ -1,4 +1,4 @@
interface T { interface T {
val x: <!OTHER_ERROR!>ErrorType<!> val x: <!UNRESOLVED_REFERENCE!>ErrorType<!>
fun getX(): <!OTHER_ERROR!>ErrorType1<!> fun getX(): <!UNRESOLVED_REFERENCE!>ErrorType1<!>
} }
@@ -3,4 +3,4 @@ enum class MyEnum {
SECOND SECOND
} }
fun foo(me: MyEnum): Boolean = if (me is <!OTHER_ERROR!>MyEnum.FIRST<!>) true else false fun foo(me: MyEnum): Boolean = if (me is <!UNRESOLVED_REFERENCE!>MyEnum.FIRST<!>) true else false
@@ -2,4 +2,4 @@ enum class E {
ENTRY ENTRY
} }
class A : <!OTHER_ERROR!>E.ENTRY<!> class A : <!UNRESOLVED_REFERENCE!>E.ENTRY<!>
@@ -3,4 +3,4 @@ enum class MyEnum {
SECOND SECOND
} }
fun foo(me: MyEnum): Boolean = me is <!OTHER_ERROR!>MyEnum.FIRST<!> fun foo(me: MyEnum): Boolean = me is <!UNRESOLVED_REFERENCE!>MyEnum.FIRST<!>
@@ -12,10 +12,10 @@ inline class ULong(private val l: Long)
// FILE: test.kt // FILE: test.kt
annotation class AnnoUB(val ub0: <!OTHER_ERROR!>UByte<!>, val ub1: <!OTHER_ERROR!>UByte<!>) annotation class AnnoUB(val ub0: <!UNRESOLVED_REFERENCE!>UByte<!>, val ub1: <!UNRESOLVED_REFERENCE!>UByte<!>)
annotation class AnnoUS(val us0: <!OTHER_ERROR!>UShort<!>, val us1: <!OTHER_ERROR!>UShort<!>) annotation class AnnoUS(val us0: <!UNRESOLVED_REFERENCE!>UShort<!>, val us1: <!UNRESOLVED_REFERENCE!>UShort<!>)
annotation class AnnoUI(val ui0: <!OTHER_ERROR!>UInt<!>, val ui1: <!OTHER_ERROR!>UInt<!>, val ui2: <!OTHER_ERROR!>UInt<!>, val ui3: <!OTHER_ERROR!>UInt<!>) annotation class AnnoUI(val ui0: <!UNRESOLVED_REFERENCE!>UInt<!>, val ui1: <!UNRESOLVED_REFERENCE!>UInt<!>, val ui2: <!UNRESOLVED_REFERENCE!>UInt<!>, val ui3: <!UNRESOLVED_REFERENCE!>UInt<!>)
annotation class AnnoUL(val ul0: <!OTHER_ERROR!>ULong<!>, val ul1: <!OTHER_ERROR!>ULong<!>) annotation class AnnoUL(val ul0: <!UNRESOLVED_REFERENCE!>ULong<!>, val ul1: <!UNRESOLVED_REFERENCE!>ULong<!>)
const val ub0 = <!UNRESOLVED_REFERENCE!>UByte<!>(1) const val ub0 = <!UNRESOLVED_REFERENCE!>UByte<!>(1)
const val us0 = <!UNRESOLVED_REFERENCE!>UShort<!>(2) const val us0 = <!UNRESOLVED_REFERENCE!>UShort<!>(2)
@@ -37,8 +37,8 @@ fun f2() {}
@AnnoUL(ul0, <!UNRESOLVED_REFERENCE!>ULong<!>(5)) @AnnoUL(ul0, <!UNRESOLVED_REFERENCE!>ULong<!>(5))
fun f3() {} fun f3() {}
const val explicit: <!OTHER_ERROR!>UInt<!> = <!UNRESOLVED_REFERENCE!>UInt<!>(2) const val explicit: <!UNRESOLVED_REFERENCE!>UInt<!> = <!UNRESOLVED_REFERENCE!>UInt<!>(2)
const val nullable: <!OTHER_ERROR!>UInt?<!> = <!UNRESOLVED_REFERENCE!>UInt<!>(3) const val nullable: <!UNRESOLVED_REFERENCE!>UInt?<!> = <!UNRESOLVED_REFERENCE!>UInt<!>(3)
annotation class NullableAnno(val u: <!OTHER_ERROR!>UInt?<!>) annotation class NullableAnno(val u: <!UNRESOLVED_REFERENCE!>UInt?<!>)
@@ -4,10 +4,10 @@
interface A interface A
fun devNull(a: Any?){} fun devNull(a: Any?){}
val generic_fun = fun<T>(t: <!OTHER_ERROR!>T<!>): T = null!! val generic_fun = fun<T>(t: <!UNRESOLVED_REFERENCE!>T<!>): T = null!!
val extension_generic_fun = fun<T><!OTHER_ERROR!>T<!>.(t: <!OTHER_ERROR!>T<!>): T = null!! val extension_generic_fun = fun<T><!UNRESOLVED_REFERENCE!>T<!>.(t: <!UNRESOLVED_REFERENCE!>T<!>): T = null!!
fun fun_with_where() = fun <T> <!OTHER_ERROR!>T<!>.(t: <!OTHER_ERROR!>T<!>): T where T: A = null!! fun fun_with_where() = fun <T> <!UNRESOLVED_REFERENCE!>T<!>.(t: <!UNRESOLVED_REFERENCE!>T<!>): T where T: A = null!!
fun outer() { fun outer() {
@@ -6,7 +6,7 @@ fun test(bal: Array<Int>) {
val b: () -> Int = { bar = 4 } val b: () -> Int = { bar = 4 }
val c: () -> <!OTHER_ERROR!>UNRESOLVED<!> = { bal[2] = 3 } val c: () -> <!UNRESOLVED_REFERENCE!>UNRESOLVED<!> = { bal[2] = 3 }
val d: () -> Int = { bar += 4 } val d: () -> Int = { bar += 4 }
@@ -1,7 +1,7 @@
package p package p
public fun foo(a: Any) { public fun foo(a: Any) {
a is <!OTHER_ERROR!>Map<Int><!> a is Map<Int>
a is Map a is Map
a is Map<out Any?, Any?> a is Map<out Any?, Any?>
a is Map<*, *> a is Map<*, *>
@@ -1,6 +1,6 @@
public fun foo(a: Any, b: <!OTHER_ERROR!>Map<!>) { public fun foo(a: Any, b: Map) {
when (a) { when (a) {
is <!OTHER_ERROR!>Map<Int><!> -> {} is Map<Int> -> {}
is Map -> {} is Map -> {}
is Map<out Any?, Any?> -> {} is Map<out Any?, Any?> -> {}
is Map<*, *> -> {} is Map<*, *> -> {}
@@ -18,11 +18,11 @@ fun <E> foo(x: Any, y: Any) : Any {
} }
// bare type // bare type
if (y is <!OTHER_ERROR!>Outer.Inner<!>) { if (y is <!UNRESOLVED_REFERENCE!>Outer.Inner<!>) {
return y return y
} }
y as <!OTHER_ERROR, OTHER_ERROR!>Outer<*>.Inner<!> y as <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Outer<*>.Inner<!>
return C() return C()
} }
@@ -51,19 +51,19 @@ interface MessageManager9 : Manager<Message3> {
fun <T : Message3> execute4() {} fun <T : Message3> execute4() {}
} }
object MessageManager10 : <!OTHER_ERROR!>Message5<Int><!>() { object MessageManager10 : <!UNRESOLVED_REFERENCE!>Message5<Int><!>() {
fun <T : Int> execute() {} fun <T : Int> execute() {}
} }
class MessageManager11<A> : <!OTHER_ERROR!>Message5<Message5<A>><!>() { class MessageManager11<A> : <!UNRESOLVED_REFERENCE!>Message5<Message5<A>><!>() {
fun <T : <!OTHER_ERROR!>Message5<A><!>> execute() {} fun <T : <!UNRESOLVED_REFERENCE!>Message5<A><!>> execute() {}
} }
data class MessageManager12(val x: Int) : <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>Message5<Message2><!>() { data class MessageManager12(val x: Int) : <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Message5<Message2><!>() {
fun <T : Message2> execute() {} fun <T : Message2> execute() {}
} }
sealed class MessageManager13<A> : <!OTHER_ERROR!>Message5<A><!>() { sealed class MessageManager13<A> : <!UNRESOLVED_REFERENCE!>Message5<A><!>() {
fun <T : A> execute() {} fun <T : A> execute() {}
} }
@@ -29,7 +29,7 @@ fun test() {
a<Foo.Bar<Int>.Baz>() a<Foo.Bar<Int>.Baz>()
} }
fun <T: <!OTHER_ERROR!>Foo<String.Bar><!>> x() {} fun <T: <!UNRESOLVED_REFERENCE!>Foo<String.Bar><!>> x() {}
fun Foo<String>.Bar.ext() {} fun Foo<String>.Bar.ext() {}
fun ex1(a: <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Foo<String>.Bar<String><!>): <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Foo<String>.Bar<String><!> { fun ex1(a: <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Foo<String>.Bar<String><!>): <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Foo<String>.Bar<String><!> {
@@ -15,7 +15,7 @@ class A {
// Does not work, could be Outer<String>.Inner<Int> // Does not work, could be Outer<String>.Inner<Int>
// TODO: Should work? // TODO: Should work?
fun foo(x: <!OTHER_ERROR!>Inner<Int><!>) { fun foo(x: <!UNRESOLVED_REFERENCE!>Inner<Int><!>) {
// Inner<Char>() call use companion as implicit receiver // Inner<Char>() call use companion as implicit receiver
val y: Outer<String>.Inner<Char> = Inner<Char>() val y: Outer<String>.Inner<Char> = Inner<Char>()
} }
@@ -15,7 +15,7 @@ class A {
// Does not work, could be Outer<String>.Inner<Int> // Does not work, could be Outer<String>.Inner<Int>
// TODO: Should work? // TODO: Should work?
fun foo(x: <!OTHER_ERROR!>Inner<Int><!>) { fun foo(x: <!UNRESOLVED_REFERENCE!>Inner<Int><!>) {
// Inner<Char>() call use companion as implicit receiver // Inner<Char>() call use companion as implicit receiver
val y: Outer<String>.Inner<Char> = Inner<Char>() val y: Outer<String>.Inner<Char> = Inner<Char>()
} }
@@ -7,14 +7,14 @@ open class Outer<X, Y> {
class Derived : Outer<String, Int>() { class Derived : Outer<String, Int>() {
fun foo(): Inner<Char> = null!! fun foo(): Inner<Char> = null!!
fun baz(): <!OTHER_ERROR, OTHER_ERROR!>Alias<Char><!> = null!! fun baz(): <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Alias<Char><!> = null!!
} }
class A : Outer<Double, Short>() { class A : Outer<Double, Short>() {
class B : Outer<Float, Long>() { class B : Outer<Float, Long>() {
fun bar(): Inner<String> = null!! fun bar(): Inner<String> = null!!
fun x(): <!OTHER_ERROR, OTHER_ERROR!>Alias<String><!> = null!! fun x(): <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Alias<String><!> = null!!
} }
} }
@@ -10,12 +10,12 @@ private fun <E> foobar() = {
fun a() = A<E, X, Y, Z>() fun a() = A<E, X, Y, Z>()
} }
typealias LocalAlias<W> = <!OTHER_ERROR!>A<E, X, Y, W><!> typealias LocalAlias<W> = <!UNRESOLVED_REFERENCE!>A<E, X, Y, W><!>
} }
class Derived : LocalOuter<Double, Short>() { class Derived : LocalOuter<Double, Short>() {
fun foo(): LocalInner<Long> = null!! fun foo(): LocalInner<Long> = null!!
fun bar(): <!OTHER_ERROR, OTHER_ERROR!>LocalAlias<Char><!> = null!! fun bar(): <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>LocalAlias<Char><!> = null!!
} }
Derived() Derived()
@@ -27,12 +27,12 @@ private fun noParameters() = {
fun a() = A<Any, X, Y, Z>() fun a() = A<Any, X, Y, Z>()
} }
typealias LocalAlias2<W> = <!OTHER_ERROR!>A<Any, X, Y, W><!> typealias LocalAlias2<W> = <!UNRESOLVED_REFERENCE!>A<Any, X, Y, W><!>
} }
class Derived2 : LocalOuter2<Double, Short>() { class Derived2 : LocalOuter2<Double, Short>() {
fun foo(): LocalInner2<Long> = null!! fun foo(): LocalInner2<Long> = null!!
fun bar(): <!OTHER_ERROR, OTHER_ERROR!>LocalAlias2<Char><!> = null!! fun bar(): <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>LocalAlias2<Char><!> = null!!
} }
Derived2() Derived2()
@@ -12,12 +12,12 @@ class Outer<T> {
fun a() = A<T, F, E, X, Y, Z>() fun a() = A<T, F, E, X, Y, Z>()
} }
typealias LocalAlias<W> = <!OTHER_ERROR!>A<T, F, E, X, Y, W><!> typealias LocalAlias<W> = <!UNRESOLVED_REFERENCE!>A<T, F, E, X, Y, W><!>
} }
class Derived : LocalOuter<Double, Short>() { class Derived : LocalOuter<Double, Short>() {
fun foo(): LocalInner<Long> = null!! fun foo(): LocalInner<Long> = null!!
fun bar(): <!OTHER_ERROR, OTHER_ERROR!>LocalAlias<Char><!> = null!! fun bar(): <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>LocalAlias<Char><!> = null!!
} }
Derived() Derived()
@@ -29,12 +29,12 @@ class Outer<T> {
fun a() = A<T, F, Any, X, Y, Z>() fun a() = A<T, F, Any, X, Y, Z>()
} }
typealias LocalAlias2<W> = <!OTHER_ERROR!>A<T, F, Any, X, Y, W><!> typealias LocalAlias2<W> = <!UNRESOLVED_REFERENCE!>A<T, F, Any, X, Y, W><!>
} }
class Derived2 : LocalOuter2<Double, Short>() { class Derived2 : LocalOuter2<Double, Short>() {
fun foo(): LocalInner2<Long> = null!! fun foo(): LocalInner2<Long> = null!!
fun bar(): <!OTHER_ERROR, OTHER_ERROR!>LocalAlias2<Char><!> = null!! fun bar(): <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>LocalAlias2<Char><!> = null!!
} }
Derived2() Derived2()
} }
@@ -10,7 +10,7 @@ open class BaseDerived2<X> : BaseDerived1<String, X>()
class Derived : BaseDerived2<Int>() { class Derived : BaseDerived2<Int>() {
fun foo(): Inner<Char> = null!! fun foo(): Inner<Char> = null!!
fun baz(): <!OTHER_ERROR, OTHER_ERROR!>Alias<Char><!> = null!! fun baz(): <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Alias<Char><!> = null!!
} }
fun foo() { fun foo() {
@@ -17,4 +17,4 @@ class Outer<E> {
class E class E
fun bar(x: <!OTHER_ERROR!>Inner<!>) {} fun bar(x: Inner) {}
@@ -15,9 +15,9 @@ class A<T> {
val y: B<String>.C<String>? = null val y: B<String>.C<String>? = null
val z: B<String>.D? = null val z: B<String>.D? = null
val c: <!OTHER_ERROR!>C<Int>?<!> = null val c: C<Int>? = null
val d: <!OTHER_ERROR!>D?<!> = null val d: D? = null
val innerMost: <!OTHER_ERROR!>Innermost<String>?<!> = null val innerMost: Innermost<String>? = null
} }
} }
@@ -4,7 +4,7 @@
class Outer<T> { class Outer<T> {
inner class Inner inner class Inner
fun foo(x: Outer<String>.Inner, y: <!OTHER_ERROR!>Outer.Inner<!>, z: Inner) { fun foo(x: Outer<String>.Inner, y: Outer.Inner, z: Inner) {
var inner = Inner() var inner = Inner()
x.checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Inner>() } x.checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Inner>() }
x.checkType { _<Outer<String>.Inner>() } x.checkType { _<Outer<String>.Inner>() }
@@ -38,11 +38,11 @@ fun ok4(): Outer.Obj.Nested2<A>.Inner5<B> = null!!
fun ok5(): test.Outer.Obj.Nested2<A>.Inner5<B> = null!! fun ok5(): test.Outer.Obj.Nested2<A>.Inner5<B> = null!!
// All arguments are resolved // All arguments are resolved
fun errorTypeWithArguments(): <!OTHER_ERROR!>Q<A>.W<B, C, D>.R.M<!> = null!! fun errorTypeWithArguments(): <!UNRESOLVED_REFERENCE!>Q<A>.W<B, C, D>.R.M<!> = null!!
fun error1(): Outer<A>.Inner<B>.Inner3<C, D> = null!! fun error1(): Outer<A>.Inner<B>.Inner3<C, D> = null!!
fun error2(): <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Outer<A>.Inner<B, C, D>.Inner2<!> = null!! fun error2(): <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Outer<A>.Inner<B, C, D>.Inner2<!> = null!!
fun error3(): <!OTHER_ERROR!>Outer.Inner<A, B>.Inner3<C><!> = null!! fun error3(): Outer.Inner<A, B>.Inner3<C> = null!!
fun error4(): <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Outer<A>.Nested<B>.Inner4<C><!> = null!! fun error4(): <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Outer<A>.Nested<B>.Inner4<C><!> = null!!
fun error5(): <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Outer<A>.Obj.Nested2<B>.Inner5<C><!> = null!! fun error5(): <!WRONG_NUMBER_OF_TYPE_ARGUMENTS!>Outer<A>.Obj.Nested2<B>.Inner5<C><!> = null!!
@@ -1,14 +1,14 @@
interface I0<T : <!OTHER_ERROR!>Unresolved0<String><!>> interface I0<T : <!UNRESOLVED_REFERENCE!>Unresolved0<String><!>>
interface I1<T> where T : <!OTHER_ERROR!>Unresolved1<String><!> interface I1<T> where T : <!UNRESOLVED_REFERENCE!>Unresolved1<String><!>
interface I2<T : <!OTHER_ERROR!>Unresolved2<String><!>> where T : <!OTHER_ERROR!>Unresolved3<String><!> interface I2<T : <!UNRESOLVED_REFERENCE!>Unresolved2<String><!>> where T : <!UNRESOLVED_REFERENCE!>Unresolved3<String><!>
fun <E : <!OTHER_ERROR!>Unresolved4<String><!>> foo0() {} fun <E : <!UNRESOLVED_REFERENCE!>Unresolved4<String><!>> foo0() {}
fun <E> foo1() where E : <!OTHER_ERROR!>Unresolved5<String><!> {} fun <E> foo1() where E : <!UNRESOLVED_REFERENCE!>Unresolved5<String><!> {}
fun <E : <!OTHER_ERROR!>Unresolved6<String><!>> foo2() where E : <!OTHER_ERROR!>Unresolved7<String><!> {} fun <E : <!UNRESOLVED_REFERENCE!>Unresolved6<String><!>> foo2() where E : <!UNRESOLVED_REFERENCE!>Unresolved7<String><!> {}
val <E : <!OTHER_ERROR!>Unresolved7<!>> E.p1: Int val <E : <!UNRESOLVED_REFERENCE!>Unresolved7<!>> E.p1: Int
get() = 1 get() = 1
val <E> E.p2: Int where E : <!OTHER_ERROR!>Unresolved8<!> val <E> E.p2: Int where E : <!UNRESOLVED_REFERENCE!>Unresolved8<!>
get() = 1 get() = 1
val <E : <!OTHER_ERROR!>Unresolved9<!>> E.p3: Int where E : <!OTHER_ERROR!>Unresolved10<!> val <E : <!UNRESOLVED_REFERENCE!>Unresolved9<!>> E.p3: Int where E : <!UNRESOLVED_REFERENCE!>Unresolved10<!>
get() = 1 get() = 1
@@ -14,4 +14,4 @@ package c
import a.x import a.x
import b.x import b.x
class Y : <!OTHER_ERROR!>x.X<!> class Y : <!UNRESOLVED_REFERENCE!>x.X<!>
@@ -1,17 +0,0 @@
// FILE: propertyClassFileDependencyRecursion.kt
package test
import other.prop
// Note: "prop" is expected to be unresolved and replaced to Any
class PropType: <!OTHER_ERROR!>prop<!>
// Note: this time "prop" should be resolved and type should be inferred for "checkTypeProp"
val checkTypeProp = prop
// FILE: propertyClassFileDependencyRecursionOther.kt
package other
import test.PropType
val prop: PropType? = null
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// FILE: propertyClassFileDependencyRecursion.kt // FILE: propertyClassFileDependencyRecursion.kt
package test package test
@@ -15,7 +15,7 @@ fun foo() {
} }
} }
fun bar(i: Int, a: <!OTHER_ERROR, OTHER_ERROR, OTHER_ERROR!>U<!>) { fun bar(i: Int, a: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>U<!>) {
val r = if (true) i else a val r = if (true) i else a
val b: Any = r val b: Any = r
} }
@@ -19,7 +19,7 @@ fun test1() {
} }
} }
fun test2(l: <!OTHER_ERROR, OTHER_ERROR!>List<AA><!>) { fun test2(l: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>List<AA><!>) {
l.<!UNRESOLVED_REFERENCE!>map<!> { l.<!UNRESOLVED_REFERENCE!>map<!> {
<!UNRESOLVED_REFERENCE!>it<!>!! <!UNRESOLVED_REFERENCE!>it<!>!!
} }
@@ -1,3 +1,3 @@
package typeReferenceError package typeReferenceError
class Pair<<!SYNTAX!><!>:<!UNRESOLVED_REFERENCE!>(val c: <!SYNTAX!><!SYNTAX!><!>fun<!><!SYNTAX!><!> <!OTHER_ERROR!>main<!><!>() class Pair<<!SYNTAX!><!>:<!UNRESOLVED_REFERENCE!>(val c: <!SYNTAX!><!SYNTAX!><!>fun<!><!SYNTAX!><!> <!UNRESOLVED_REFERENCE!>main<!><!>()
@@ -9,13 +9,13 @@ fun <T> materialize() = null as T
fun test() { fun test() {
<!INAPPLICABLE_CANDIDATE!>consume<!>( <!INAPPLICABLE_CANDIDATE!>consume<!>(
materialize<<!OTHER_ERROR, UPPER_BOUND_VIOLATED!>Foo<Bar<ErrorType>><!>>(), materialize<<!UNRESOLVED_REFERENCE!>Foo<Bar<ErrorType>><!>>(),
materialize<<!OTHER_ERROR, UPPER_BOUND_VIOLATED!>Foo<Bar<ErrorType>><!>>() materialize<<!UNRESOLVED_REFERENCE!>Foo<Bar<ErrorType>><!>>()
) )
<!INAPPLICABLE_CANDIDATE!>consume<!>( <!INAPPLICABLE_CANDIDATE!>consume<!>(
materialize<<!OTHER_ERROR, UPPER_BOUND_VIOLATED!>Foo<Bar<ErrorType>><!>>(), materialize<<!UNRESOLVED_REFERENCE!>Foo<Bar<ErrorType>><!>>(),
materialize<<!OTHER_ERROR, UPPER_BOUND_VIOLATED!>Foo<ErrorType><!>>() materialize<<!UNRESOLVED_REFERENCE!>Foo<ErrorType><!>>()
) )
} }
@@ -19,7 +19,7 @@ public class Foo {
// FILE: test.kt // FILE: test.kt
fun test(e: <!OTHER_ERROR, OTHER_ERROR!>ErrorType<!>) { fun test(e: <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>ErrorType<!>) {
Foo.foo { Foo.foo {
Sam.Result.<!INAPPLICABLE_CANDIDATE!>create<!>(e) Sam.Result.<!INAPPLICABLE_CANDIDATE!>create<!>(e)
} }
@@ -1 +1 @@
val <T : <!OTHER_ERROR!>KClass<T>.something<!>> abc val <T : <!UNRESOLVED_REFERENCE!>KClass<T>.something<!>> abc
@@ -10,7 +10,7 @@ fun test1() {
} }
} }
fun bar(f: (<!OTHER_ERROR!>A<!>)->Unit) {} fun bar(f: (<!UNRESOLVED_REFERENCE!>A<!>)->Unit) {}
fun test2() { fun test2() {
bar { a -> } // here we don't have 'cannot infer parameter type' error bar { a -> } // here we don't have 'cannot infer parameter type' error
@@ -47,18 +47,18 @@ fun test() {
val ic: I.NC = I.NC() val ic: I.NC = I.NC()
val ii: I.NI? = null val ii: I.NI? = null
val bc: <!OTHER_ERROR!>B.NC<!> = B.<!UNRESOLVED_REFERENCE!>NC<!>() val bc: <!UNRESOLVED_REFERENCE!>B.NC<!> = B.<!UNRESOLVED_REFERENCE!>NC<!>()
val bic: <!OTHER_ERROR!>B.IC<!> = B().IC() val bic: <!UNRESOLVED_REFERENCE!>B.IC<!> = B().IC()
val bi: <!OTHER_ERROR!>B.NI?<!> = null val bi: <!UNRESOLVED_REFERENCE!>B.NI?<!> = null
val cc: <!OTHER_ERROR!>C.NC<!> = C.<!UNRESOLVED_REFERENCE!>NC<!>() val cc: <!UNRESOLVED_REFERENCE!>C.NC<!> = C.<!UNRESOLVED_REFERENCE!>NC<!>()
val ci: <!OTHER_ERROR!>C.NI?<!> = null val ci: <!UNRESOLVED_REFERENCE!>C.NI?<!> = null
val dc: <!OTHER_ERROR!>D.NC<!> = D.<!UNRESOLVED_REFERENCE!>NC<!>() val dc: <!UNRESOLVED_REFERENCE!>D.NC<!> = D.<!UNRESOLVED_REFERENCE!>NC<!>()
val dic: <!OTHER_ERROR!>D.IC<!> = D().IC() val dic: <!UNRESOLVED_REFERENCE!>D.IC<!> = D().IC()
val di: <!OTHER_ERROR!>D.NI?<!> = null val di: <!UNRESOLVED_REFERENCE!>D.NI?<!> = null
val kc: <!OTHER_ERROR!>K.NC<!> = K.<!UNRESOLVED_REFERENCE!>NC<!>() val kc: <!UNRESOLVED_REFERENCE!>K.NC<!> = K.<!UNRESOLVED_REFERENCE!>NC<!>()
val kic: <!OTHER_ERROR!>K.IC<!> = K().IC() val kic: <!UNRESOLVED_REFERENCE!>K.IC<!> = K().IC()
val ki: <!OTHER_ERROR!>K.NI?<!> = null val ki: <!UNRESOLVED_REFERENCE!>K.NI?<!> = null
} }
@@ -31,14 +31,14 @@ fun test() {
val ic: I.NC = I.NC() val ic: I.NC = I.NC()
val ii: I.NI? = null val ii: I.NI? = null
val bc: <!OTHER_ERROR!>B.NC<!> = B.<!UNRESOLVED_REFERENCE!>NC<!>() val bc: <!UNRESOLVED_REFERENCE!>B.NC<!> = B.<!UNRESOLVED_REFERENCE!>NC<!>()
val bic: <!OTHER_ERROR!>B.IC<!> = B().IC() val bic: <!UNRESOLVED_REFERENCE!>B.IC<!> = B().IC()
val bi: <!OTHER_ERROR!>B.NI?<!> = null val bi: <!UNRESOLVED_REFERENCE!>B.NI?<!> = null
val cc: <!OTHER_ERROR!>C.NC<!> = C.<!UNRESOLVED_REFERENCE!>NC<!>() val cc: <!UNRESOLVED_REFERENCE!>C.NC<!> = C.<!UNRESOLVED_REFERENCE!>NC<!>()
val ci: <!OTHER_ERROR!>C.NI?<!> = null val ci: <!UNRESOLVED_REFERENCE!>C.NI?<!> = null
val dc: <!OTHER_ERROR!>D.NC<!> = D.<!UNRESOLVED_REFERENCE!>NC<!>() val dc: <!UNRESOLVED_REFERENCE!>D.NC<!> = D.<!UNRESOLVED_REFERENCE!>NC<!>()
val dic: <!OTHER_ERROR!>D.IC<!> = D().IC() val dic: <!UNRESOLVED_REFERENCE!>D.IC<!> = D().IC()
val di: <!OTHER_ERROR!>D.NI?<!> = null val di: <!UNRESOLVED_REFERENCE!>D.NI?<!> = null
} }
@@ -3,11 +3,11 @@ interface P<U, Y>
class A<T> { class A<T> {
class B { class B {
fun test() { fun test() {
class C<W>() : <!OTHER_ERROR!>P<W, T><!> { class C<W>() : <!UNRESOLVED_REFERENCE!>P<W, T><!> {
companion object : <!OTHER_ERROR!>P<W, T><!> { companion object : <!UNRESOLVED_REFERENCE!>P<W, T><!> {
} }
inner class D : <!OTHER_ERROR!>P<W, T><!> inner class D : <!UNRESOLVED_REFERENCE!>P<W, T><!>
} }
} }
} }
@@ -2,7 +2,7 @@ class Foo {
companion object { companion object {
val bar = 1 val bar = 1
fun test(a: <!OTHER_ERROR!>Foo.`object`<!>) { fun test(a: <!UNRESOLVED_REFERENCE!>Foo.`object`<!>) {
} }
@@ -1,4 +1,4 @@
@<!OTHER_ERROR!><!SYNTAX!><!>myAnnotation<!> public @<!UNRESOLVED_REFERENCE!><!SYNTAX!><!>myAnnotation<!> public
package illegal_modifiers package illegal_modifiers
abstract class A() { abstract class A() {
@@ -26,5 +26,5 @@ import p.*
fun test() { fun test() {
foo(M1().a) foo(M1().a)
<!INAPPLICABLE_CANDIDATE!>foo<!>(1) // error type on the declaration site foo(1) // error type on the declaration site
} }
@@ -8,6 +8,6 @@ open class Base {
class Derived : Base() { class Derived : Base() {
@<!OTHER_ERROR!>Foo<!> @<!UNRESOLVED_REFERENCE!>Foo<!>
fun foo() = 42 fun foo() = 42
} }
@@ -72,28 +72,28 @@ class C : O.B() {
val n: FromCompanionC? = null val n: FromCompanionC? = null
// INVISIBLE: direct superclasses themselves. // INVISIBLE: direct superclasses themselves.
val a: <!OTHER_ERROR!>A?<!> = null val a: <!UNRESOLVED_REFERENCE!>A?<!> = null
val b: <!OTHER_ERROR!>B?<!> = null val b: <!UNRESOLVED_REFERENCE!>B?<!> = null
// DEPRECATED: Classifiers from companions of direct superclasses // DEPRECATED: Classifiers from companions of direct superclasses
val e: <!OTHER_ERROR!>FromCompanionA?<!> = null val e: <!UNRESOLVED_REFERENCE!>FromCompanionA?<!> = null
val f: <!OTHER_ERROR!>FromCompanionB?<!> = null val f: <!UNRESOLVED_REFERENCE!>FromCompanionB?<!> = null
// INVISIBLE: "cousin" supertypes themselves // INVISIBLE: "cousin" supertypes themselves
val g: <!OTHER_ERROR!>Alpha?<!> = null val g: <!UNRESOLVED_REFERENCE!>Alpha?<!> = null
val h: <!OTHER_ERROR!>Beta?<!> = null val h: <!UNRESOLVED_REFERENCE!>Beta?<!> = null
val i: <!OTHER_ERROR!>Gamma?<!> = null val i: <!UNRESOLVED_REFERENCE!>Gamma?<!> = null
// DEPRECATED: classifiers from "cousin" superclasses // DEPRECATED: classifiers from "cousin" superclasses
val k: <!OTHER_ERROR!>FromAlpha?<!> = null val k: <!UNRESOLVED_REFERENCE!>FromAlpha?<!> = null
val l: <!OTHER_ERROR!>FromBeta?<!> = null val l: <!UNRESOLVED_REFERENCE!>FromBeta?<!> = null
val m: <!OTHER_ERROR!>FromGamma?<!> = null val m: <!UNRESOLVED_REFERENCE!>FromGamma?<!> = null
// INVISIBLE: We don't see classifiers from companions of "cousin" superclasses // INVISIBLE: We don't see classifiers from companions of "cousin" superclasses
val o: <!OTHER_ERROR!>FromCompanionAlpha?<!> = null val o: <!UNRESOLVED_REFERENCE!>FromCompanionAlpha?<!> = null
val p: <!OTHER_ERROR!>FromCompanionBeta?<!> = null val p: <!UNRESOLVED_REFERENCE!>FromCompanionBeta?<!> = null
val q: <!OTHER_ERROR!>FromCompanionGamma?<!> = null val q: <!UNRESOLVED_REFERENCE!>FromCompanionGamma?<!> = null
// DEPRECATED: Classifiers from supertypes of our own companion // DEPRECATED: Classifiers from supertypes of our own companion
val r: <!OTHER_ERROR!>FromDelta?<!> = null val r: <!UNRESOLVED_REFERENCE!>FromDelta?<!> = null
} }
@@ -71,28 +71,28 @@ class C : O.B() {
val n: FromCompanionC? = null val n: FromCompanionC? = null
// INVISIBLE: direct superclasses themselves. // INVISIBLE: direct superclasses themselves.
val a: <!OTHER_ERROR!>A?<!> = null val a: <!UNRESOLVED_REFERENCE!>A?<!> = null
val b: <!OTHER_ERROR!>B?<!> = null val b: <!UNRESOLVED_REFERENCE!>B?<!> = null
// DEPRECATED: Classifiers from companions of direct superclasses // DEPRECATED: Classifiers from companions of direct superclasses
val e: <!OTHER_ERROR!>FromCompanionA?<!> = null val e: <!UNRESOLVED_REFERENCE!>FromCompanionA?<!> = null
val f: <!OTHER_ERROR!>FromCompanionB?<!> = null val f: <!UNRESOLVED_REFERENCE!>FromCompanionB?<!> = null
// INVISIBLE: "cousin" supertypes themselves // INVISIBLE: "cousin" supertypes themselves
val g: <!OTHER_ERROR!>Alpha?<!> = null val g: <!UNRESOLVED_REFERENCE!>Alpha?<!> = null
val h: <!OTHER_ERROR!>Beta?<!> = null val h: <!UNRESOLVED_REFERENCE!>Beta?<!> = null
val i: <!OTHER_ERROR!>Gamma?<!> = null val i: <!UNRESOLVED_REFERENCE!>Gamma?<!> = null
// DEPRECATED: classifiers from "cousin" superclasses // DEPRECATED: classifiers from "cousin" superclasses
val k: <!OTHER_ERROR!>FromAlpha?<!> = null val k: <!UNRESOLVED_REFERENCE!>FromAlpha?<!> = null
val l: <!OTHER_ERROR!>FromBeta?<!> = null val l: <!UNRESOLVED_REFERENCE!>FromBeta?<!> = null
val m: <!OTHER_ERROR!>FromGamma?<!> = null val m: <!UNRESOLVED_REFERENCE!>FromGamma?<!> = null
// INVISIBLE: We don't see classifiers from companions of "cousin" superclasses // INVISIBLE: We don't see classifiers from companions of "cousin" superclasses
val o: <!OTHER_ERROR!>FromCompanionAlpha?<!> = null val o: <!UNRESOLVED_REFERENCE!>FromCompanionAlpha?<!> = null
val p: <!OTHER_ERROR!>FromCompanionBeta?<!> = null val p: <!UNRESOLVED_REFERENCE!>FromCompanionBeta?<!> = null
val q: <!OTHER_ERROR!>FromCompanionGamma?<!> = null val q: <!UNRESOLVED_REFERENCE!>FromCompanionGamma?<!> = null
// DEPRECATED: Classifiers from supertypes of our own companion // DEPRECATED: Classifiers from supertypes of our own companion
val r: <!OTHER_ERROR!>FromDelta?<!> = null val r: <!UNRESOLVED_REFERENCE!>FromDelta?<!> = null
} }
@@ -1,100 +0,0 @@
// !LANGUAGE: +ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
// !DIAGNOSTICS: -UNUSED_VARIABLE
// See KT-21515 for a open class diagram and details
// Object is to prevent accidental short-name import
object O {
open class Alpha {
open class FromAlpha
companion object {
open class FromCompanionAlpha
}
}
open class Beta : Alpha() {
open class FromBeta
companion object {
open class FromCompanionBeta
}
}
open class A {
open class FromA
companion object : Beta() {
open class FromCompanionA
}
}
//////////////////////////
open class FarAway {
open class FromFarAway
}
open class Gamma {
open class FromGamma
companion object : FarAway() {
open class FromCompanionGamma
}
}
open class B : A() {
open class FromB
companion object : Gamma() {
open class FromCompanionB
}
}
}
///////////////////////////////
open class Delta {
open class FromDelta
}
open class C : O.B() {
companion object : Delta() {
open class FromCompanionC
}
// VISIBLE: Classifiers from direct superclasses
open class c : FromA()
open class d : FromB()
// VISIBLE: Classifiers from our own companion
open class n : FromCompanionC()
// INVISIBLE: direct superclasses themselves.
open class a : <!OTHER_ERROR!>A<!>()
open class b : <!OTHER_ERROR!>B<!>()
// DEPRECATED: Classifiers from companions of direct superclasses
open class e : <!OTHER_ERROR!>FromCompanionA<!>()
open class f : <!OTHER_ERROR!>FromCompanionB<!>()
// INVISIBLE: "cousin" supertypes themselves
open class g : <!OTHER_ERROR!>Alpha<!>()
open class h : <!OTHER_ERROR!>Beta<!>()
open class i : <!OTHER_ERROR!>Gamma<!>()
// DEPRECATED: classifiers from "cousin" superclasses
open class k : <!OTHER_ERROR!>FromAlpha<!>()
open class l : <!OTHER_ERROR!>FromBeta<!>()
open class m : <!OTHER_ERROR!>FromGamma<!>()
// INVISIBLE: We don't see classifiers from companions of "cousin" superclasses
open class o : <!OTHER_ERROR!>FromCompanionAlpha<!>()
open class p : <!OTHER_ERROR!>FromCompanionBeta<!>()
open class q : <!OTHER_ERROR!>FromCompanionGamma<!>()
// DEPRECATED: Classifiers from supertypes of our own companion
open class r : <!OTHER_ERROR!>FromDelta<!>()
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !LANGUAGE: +ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion // !LANGUAGE: +ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
// !DIAGNOSTICS: -UNUSED_VARIABLE // !DIAGNOSTICS: -UNUSED_VARIABLE
@@ -73,28 +73,28 @@ open class C : O.B() {
open class n : FromCompanionC() open class n : FromCompanionC()
// INVISIBLE: direct superclasses themselves. // INVISIBLE: direct superclasses themselves.
open class a : <!OTHER_ERROR!>A<!>() open class a : <!UNRESOLVED_REFERENCE!>A<!>()
open class b : <!OTHER_ERROR!>B<!>() open class b : <!UNRESOLVED_REFERENCE!>B<!>()
// DEPRECATED: Classifiers from companions of direct superclasses // DEPRECATED: Classifiers from companions of direct superclasses
open class e : <!OTHER_ERROR!>FromCompanionA<!>() open class e : <!UNRESOLVED_REFERENCE!>FromCompanionA<!>()
open class f : <!OTHER_ERROR!>FromCompanionB<!>() open class f : <!UNRESOLVED_REFERENCE!>FromCompanionB<!>()
// INVISIBLE: "cousin" supertypes themselves // INVISIBLE: "cousin" supertypes themselves
open class g : <!OTHER_ERROR!>Alpha<!>() open class g : <!UNRESOLVED_REFERENCE!>Alpha<!>()
open class h : <!OTHER_ERROR!>Beta<!>() open class h : <!UNRESOLVED_REFERENCE!>Beta<!>()
open class i : <!OTHER_ERROR!>Gamma<!>() open class i : <!UNRESOLVED_REFERENCE!>Gamma<!>()
// DEPRECATED: classifiers from "cousin" superclasses // DEPRECATED: classifiers from "cousin" superclasses
open class k : <!OTHER_ERROR!>FromAlpha<!>() open class k : <!UNRESOLVED_REFERENCE!>FromAlpha<!>()
open class l : <!OTHER_ERROR!>FromBeta<!>() open class l : <!UNRESOLVED_REFERENCE!>FromBeta<!>()
open class m : <!OTHER_ERROR!>FromGamma<!>() open class m : <!UNRESOLVED_REFERENCE!>FromGamma<!>()
// INVISIBLE: We don't see classifiers from companions of "cousin" superclasses // INVISIBLE: We don't see classifiers from companions of "cousin" superclasses
open class o : <!OTHER_ERROR!>FromCompanionAlpha<!>() open class o : <!UNRESOLVED_REFERENCE!>FromCompanionAlpha<!>()
open class p : <!OTHER_ERROR!>FromCompanionBeta<!>() open class p : <!UNRESOLVED_REFERENCE!>FromCompanionBeta<!>()
open class q : <!OTHER_ERROR!>FromCompanionGamma<!>() open class q : <!UNRESOLVED_REFERENCE!>FromCompanionGamma<!>()
// DEPRECATED: Classifiers from supertypes of our own companion // DEPRECATED: Classifiers from supertypes of our own companion
open class r : <!OTHER_ERROR!>FromDelta<!>() open class r : <!UNRESOLVED_REFERENCE!>FromDelta<!>()
} }
@@ -1,48 +0,0 @@
// !LANGUAGE: +ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
// FILE: test/Java.java
package test;
public class Java {
public static void method() { }
public static int property = 42;
public static class Classifier { }
public static void syntheticSam(Runnable r) { }
public static int getStaticSyntheticProperty() { return 42; }
public static int setStaticSyntheticProperty(int x) { return 42; }
public int getInstanceSyntheticProperty() { return 42; }
public int setInstanceSyntheticProperty(int x) { return 42; }
}
// FILE: Kotlin.kt
package test
open class Base {
companion object : Java() {
}
}
class Derived : Base() {
fun test(javaStaticInTypePosition: <!OTHER_ERROR!>Classifier<!>) {
<!UNRESOLVED_REFERENCE!>method<!>()
<!UNRESOLVED_REFERENCE!>property<!>
<!UNRESOLVED_REFERENCE!>Classifier<!>()
<!UNRESOLVED_REFERENCE!>syntheticSam<!> { }
// Instance members shouldn't be affected, but we check them, just in case
val y = instanceSyntheticProperty
instanceSyntheticProperty = 43
// Note that statics actually aren't converted into synthetic property in Kotlin
val x = <!UNRESOLVED_REFERENCE!>syntheticProperty<!>
<!UNRESOLVED_REFERENCE!>syntheticProperty<!> = 42
}
class JavaStaticInSupertypeList : <!OTHER_ERROR!>Classifier<!>() {
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !LANGUAGE: +ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion // !LANGUAGE: +ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE // !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
@@ -27,7 +27,7 @@ open class Base {
} }
class Derived : Base() { class Derived : Base() {
fun test(javaStaticInTypePosition: <!OTHER_ERROR!>Classifier<!>) { fun test(javaStaticInTypePosition: <!UNRESOLVED_REFERENCE!>Classifier<!>) {
<!UNRESOLVED_REFERENCE!>method<!>() <!UNRESOLVED_REFERENCE!>method<!>()
<!UNRESOLVED_REFERENCE!>property<!> <!UNRESOLVED_REFERENCE!>property<!>
<!UNRESOLVED_REFERENCE!>Classifier<!>() <!UNRESOLVED_REFERENCE!>Classifier<!>()
@@ -42,7 +42,7 @@ class Derived : Base() {
<!UNRESOLVED_REFERENCE!>syntheticProperty<!> = 42 <!UNRESOLVED_REFERENCE!>syntheticProperty<!> = 42
} }
class JavaStaticInSupertypeList : <!OTHER_ERROR!>Classifier<!>() { class JavaStaticInSupertypeList : <!UNRESOLVED_REFERENCE!>Classifier<!>() {
} }
} }
@@ -1,3 +1,3 @@
class C : <!OTHER_ERROR, OTHER_ERROR!>Base1<!> by <!UNRESOLVED_REFERENCE!>Base2<!>(1) { class C : <!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>Base1<!> by <!UNRESOLVED_REFERENCE!>Base2<!>(1) {
fun test() { } fun test() { }
} }

Some files were not shown because too many files have changed in this diff Show More