Do not invoke getDelegateExpression before it is needed

This commit is contained in:
Pavel V. Talanov
2014-04-09 19:29:42 +04:00
parent 5078be1564
commit f15d363087
@@ -989,8 +989,7 @@ public class DescriptorResolver {
if (!variable.hasInitializer()) {
if (hasDelegate && variableDescriptor instanceof PropertyDescriptor) {
final JetProperty property = (JetProperty) variable;
final JetExpression propertyDelegateExpression = property.getDelegateExpression();
if (propertyDelegateExpression != null) {
if (property.hasDelegateExpression()) {
return DeferredType.createRecursionIntolerant(
storageManager,
trace,
@@ -998,7 +997,7 @@ public class DescriptorResolver {
@Override
public JetType invoke() {
return resolveDelegatedPropertyType(property, (PropertyDescriptor) variableDescriptor, scope,
propertyDelegateExpression, dataFlowInfo, trace);
property.getDelegateExpression(), dataFlowInfo, trace);
}
});
}