Refine scope of signed to unsigned conversions
Depend on a module of function declaration, not function call
This commit is contained in:
@@ -323,9 +323,6 @@ class CallCompleter(
|
||||
|
||||
val constant = context.trace[BindingContext.COMPILE_TIME_VALUE, deparenthesized]
|
||||
val convertedConst = constant is IntegerValueTypeConstant && constant.convertedFromSigned
|
||||
if (convertedConst && !moduleDescriptor.hasImplicitIntegerCoercionCapability()) {
|
||||
context.trace.report(Errors.SIGNED_CONSTANT_CONVERTED_TO_UNSIGNED.on(deparenthesized))
|
||||
}
|
||||
|
||||
if (results != null && results.isSingleResult) {
|
||||
val resolvedCall = results.resultingCall
|
||||
@@ -354,6 +351,8 @@ class CallCompleter(
|
||||
)
|
||||
}
|
||||
}
|
||||
} else if (convertedConst) {
|
||||
context.trace.report(Errors.SIGNED_CONSTANT_CONVERTED_TO_UNSIGNED.on(deparenthesized))
|
||||
}
|
||||
|
||||
updatedType = updateRecordedTypeForArgument(updatedType, recordedType, expression, context.statementFilter, context.trace)
|
||||
|
||||
Reference in New Issue
Block a user