'Long' type is now stored for 'Long' literal #KT-12267 Fixed

This commit is contained in:
Mikhail Glukhikh
2016-05-13 16:23:26 +03:00
parent 48c8678281
commit 182ade19e9
10 changed files with 66 additions and 1 deletions
@@ -199,7 +199,8 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
compileTimeConstant != null ? ((TypedCompileTimeConstant) compileTimeConstant).getConstantValue() : null;
boolean hasError = constantChecker.checkConstantExpressionType(constantValue, expression, context.expectedType);
if (hasError) {
return TypeInfoFactoryKt.createTypeInfo(getDefaultType(elementType), context);
return TypeInfoFactoryKt.createTypeInfo(constantValue != null ? constantValue.getType() : getDefaultType(elementType),
context);
}
}