Command-line option disabling KotlinNothingValueException generation
This commit is contained in:
@@ -2646,7 +2646,7 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
||||
|
||||
KotlinType returnType = resolvedCall.getResultingDescriptor().getReturnType();
|
||||
if (returnType != null && KotlinBuiltIns.isNothing(returnType)) {
|
||||
if (state.getLanguageVersionSettings().getApiVersion().compareTo(ApiVersion.KOTLIN_1_4) >= 0) {
|
||||
if (state.getUseKotlinNothingValueException()) {
|
||||
v.anew(Type.getObjectType("kotlin/KotlinNothingValueException"));
|
||||
v.dup();
|
||||
v.invokespecial("kotlin/KotlinNothingValueException", "<init>", "()V", false);
|
||||
|
||||
@@ -219,6 +219,9 @@ class GenerationState private constructor(
|
||||
val generateOptimizedCallableReferenceSuperClasses =
|
||||
languageVersionSettings.apiVersion >= ApiVersion.KOTLIN_1_4 &&
|
||||
!configuration.getBoolean(JVMConfigurationKeys.NO_OPTIMIZED_CALLABLE_REFERENCES)
|
||||
val useKotlinNothingValueException =
|
||||
languageVersionSettings.apiVersion >= ApiVersion.KOTLIN_1_4 &&
|
||||
!configuration.getBoolean(JVMConfigurationKeys.NO_KOTLIN_NOTHING_VALUE_EXCEPTION)
|
||||
val samWrapperClasses: SamWrapperClasses = SamWrapperClasses(this)
|
||||
val globalInlineContext: GlobalInlineContext = GlobalInlineContext(diagnostics)
|
||||
val mappingsClassesForWhenByEnum: MappingsClassesForWhenByEnum = MappingsClassesForWhenByEnum(this)
|
||||
|
||||
Reference in New Issue
Block a user