Common functionality moved up

This commit is contained in:
Andrey Breslav
2013-02-05 22:14:44 +04:00
parent 109c47645b
commit 51f7110961
@@ -104,11 +104,11 @@ public class TypeResolver {
return;
}
trace.record(BindingContext.REFERENCE_TARGET, referenceExpression, classifierDescriptor);
if (classifierDescriptor instanceof TypeParameterDescriptor) {
TypeParameterDescriptor typeParameterDescriptor = (TypeParameterDescriptor) classifierDescriptor;
trace.record(BindingContext.REFERENCE_TARGET, referenceExpression, typeParameterDescriptor);
JetScope scopeForTypeParameter = getScopeForTypeParameter(typeParameterDescriptor, checkBounds);
if (scopeForTypeParameter instanceof ErrorUtils.ErrorScope) {
result[0] = ErrorUtils.createErrorType("?");
@@ -133,7 +133,6 @@ public class TypeResolver {
else if (classifierDescriptor instanceof ClassDescriptor) {
ClassDescriptor classDescriptor = (ClassDescriptor) classifierDescriptor;
trace.record(BindingContext.REFERENCE_TARGET, referenceExpression, classifierDescriptor);
TypeConstructor typeConstructor = classifierDescriptor.getTypeConstructor();
List<TypeProjection> arguments = resolveTypeProjections(scope, typeConstructor, type.getTypeArguments(), trace, checkBounds);
List<TypeParameterDescriptor> parameters = typeConstructor.getParameters();