Fix for EA-68569 with a test. #EA-68569 Fixed

This commit is contained in:
Mikhail Glukhikh
2015-05-18 19:55:24 +03:00
parent 0108205367
commit 1edce76d01
3 changed files with 9 additions and 2 deletions
@@ -284,8 +284,8 @@ public class PropertyCodegen {
} }
private void generatePropertyDelegateAccess(JetProperty p, PropertyDescriptor propertyDescriptor) { private void generatePropertyDelegateAccess(JetProperty p, PropertyDescriptor propertyDescriptor) {
assert p.getDelegateExpression() != null: "Property must have a delegate expression here"; JetExpression delegateExpression = p.getDelegateExpression();
JetType delegateType = bindingContext.getType(p.getDelegateExpression()); JetType delegateType = delegateExpression != null ? bindingContext.getType(p.getDelegateExpression()) : null;
if (delegateType == null) { if (delegateType == null) {
// If delegate expression is unresolved reference // If delegate expression is unresolved reference
delegateType = ErrorUtils.createErrorType("Delegate type"); delegateType = ErrorUtils.createErrorType("Delegate type");
+3
View File
@@ -0,0 +1,3 @@
class Some<caret>() {
val renderer by
}
@@ -119,6 +119,10 @@ public class JetJavaFacadeTest extends JetLightCodeInsightFixtureTestCase {
doTestWrapClass(); doTestWrapClass();
} }
public void testEa68569() {
doTestWrapClass();
}
public void testWrapTopLevelFunWithDefaultParams() { public void testWrapTopLevelFunWithDefaultParams() {
doTestWrapMethod(true); doTestWrapMethod(true);
} }