report only 'The value is out of range'
not 'An integer literal does not conform to the expected type Int/Long'
This commit is contained in:
+3
-4
@@ -78,11 +78,10 @@ public class CompileTimeConstantResolver {
|
||||
|
||||
@NotNull
|
||||
public CompileTimeConstant<?> getIntegerValue(@Nullable Long value, @NotNull JetType expectedType) {
|
||||
if (value == null) {
|
||||
return OUT_OF_RANGE;
|
||||
}
|
||||
if (noExpectedType(expectedType)) {
|
||||
if (value == null) {
|
||||
return OUT_OF_RANGE;
|
||||
}
|
||||
|
||||
if (Integer.MIN_VALUE <= value && value <= Integer.MAX_VALUE) {
|
||||
return new IntValue(value.intValue());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user