KT-1895 Make it possible to pass 1.0 as Float without explicit casting
#KT-1895 fixed
This commit is contained in:
+1
-1
@@ -132,7 +132,7 @@ public class CompileTimeConstantResolver {
|
||||
}
|
||||
else if (JetTypeChecker.INSTANCE.isSubtypeOf(builtIns.getFloatType(), expectedType)) {
|
||||
try {
|
||||
return new DoubleValue(Float.parseFloat(text));
|
||||
return new FloatValue(Float.parseFloat(text));
|
||||
}
|
||||
catch (NumberFormatException e) {
|
||||
return OUT_OF_RANGE;
|
||||
|
||||
Reference in New Issue
Block a user