Fix PSI behavior for "val x : ()?' case

This commit is contained in:
Andrey Breslav
2014-03-25 14:04:23 +04:00
parent 6725b4f1b0
commit 80737bdfcf
9 changed files with 50 additions and 8 deletions
@@ -76,7 +76,9 @@ public class TypeTransformingVisitor extends JetVisitor<JetType, Void> {
throw new AlternativeSignatureMismatchException("Auto type '%s' is not-null, while type in alternative signature is nullable: '%s'",
DescriptorRenderer.TEXT.renderType(originalType), nullableType.getText());
}
return TypeUtils.makeNullable(computeType(nullableType.getInnerType(), originalType, originalToAltTypeParameters, typeUsage));
JetTypeElement innerType = nullableType.getInnerType();
assert innerType != null : "Syntax error: " + nullableType.getText();
return TypeUtils.makeNullable(computeType(innerType, originalType, originalToAltTypeParameters, typeUsage));
}
@Override