KT-14071 Type alias cannot be used as a qualifier for super

Use corresponding class for type alias in super qualifier resolution.
This commit is contained in:
Dmitry Petrov
2016-09-29 16:24:55 +03:00
parent ff7c7538d4
commit bd95d2ef4c
4 changed files with 96 additions and 0 deletions
@@ -451,6 +451,10 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
supertype = components.typeResolver.resolveType(context.scope, superTypeQualifier, context.trace, true);
}
if (classifierCandidate instanceof TypeAliasDescriptor) {
classifierCandidate = ((TypeAliasDescriptor) classifierCandidate).getClassDescriptor();
}
if (supertype != null) {
if (supertypes.contains(supertype)) {
result = supertype;