JVM: change logic of applying KT-57570 behavior a bit
If `-Xno-unified-null-checks` is specified, do not throw exceptions, but rather revert to the old behavior, with source code in exception messages. Note that `-Xno-unified-null-checks` is a flag which enables behavior of Kotlin 1.3. It can be removed once we no longer support API version 1.3.
This commit is contained in:
committed by
Space Team
parent
5d3fe7547a
commit
ad1dfd5cb9
+1
-1
@@ -764,7 +764,7 @@ private class TypeOperatorLowering(private val backendContext: JvmBackendContext
|
||||
}
|
||||
|
||||
private fun IrBuilderWithScope.computeNotNullAssertionText(typeOperatorCall: IrTypeOperatorCall): String? {
|
||||
if (backendContext.state.languageVersionSettings.supportsFeature(LanguageFeature.NoSourceCodeInNotNullAssertionExceptions)) {
|
||||
if (backendContext.state.noSourceCodeInNotNullAssertionExceptions) {
|
||||
return when (val argument = typeOperatorCall.argument) {
|
||||
is IrCall -> "${argument.symbol.owner.name.asString()}(...)"
|
||||
is IrGetField -> argument.symbol.owner.name.asString()
|
||||
|
||||
Reference in New Issue
Block a user