Implemented compacting type names and adding valid imports in override/implements handler.
#KT-1602 fixed
This commit is contained in:
@@ -61,6 +61,7 @@ public interface BindingContext {
|
||||
WritableSlice<JetExpression, JetType> AUTOCAST = Slices.createSimpleSlice();
|
||||
|
||||
/** A scope where type of expression has been resolved */
|
||||
WritableSlice<JetTypeReference, JetScope> TYPE_RESOLUTION_SCOPE = Slices.createSimpleSlice();
|
||||
WritableSlice<JetExpression, JetScope> RESOLUTION_SCOPE = Slices.createSimpleSlice();
|
||||
|
||||
/** Collected during analyze, used in IDE in auto-cast completion */
|
||||
|
||||
@@ -69,6 +69,7 @@ public class TypeResolver {
|
||||
JetTypeElement typeElement = typeReference.getTypeElement();
|
||||
JetType type = resolveTypeElement(scope, annotations, typeElement, false, trace, checkBounds);
|
||||
trace.record(BindingContext.TYPE, typeReference, type);
|
||||
trace.record(BindingContext.TYPE_RESOLUTION_SCOPE, typeReference, scope);
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
+3
@@ -472,6 +472,9 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
|
||||
if (result != null) {
|
||||
context.trace.record(BindingContext.EXPRESSION_TYPE, expression.getInstanceReference(), result);
|
||||
context.trace.record(BindingContext.REFERENCE_TARGET, expression.getInstanceReference(), result.getConstructor().getDeclarationDescriptor());
|
||||
if (superTypeQualifier != null) {
|
||||
context.trace.record(BindingContext.TYPE_RESOLUTION_SCOPE, superTypeQualifier, context.scope);
|
||||
}
|
||||
}
|
||||
}
|
||||
return DataFlowUtils.checkType(result, expression, context);
|
||||
|
||||
Reference in New Issue
Block a user