Add configuration key to enable new inference for compiler tests

This commit is contained in:
Mikhail Zarechenskiy
2017-11-07 14:54:58 +03:00
parent 0b484771dd
commit fbbe396881
4 changed files with 8 additions and 2 deletions
@@ -204,7 +204,7 @@ public abstract class CLICompiler<A extends CommonCompilerArguments> extends CLI
extraLanguageFeatures.put(LanguageFeature.Coroutines, coroutinesState);
}
if (arguments.getNewInference()) {
if (arguments.getNewInference() || configuration.getBoolean(CommonConfigurationKeys.USE_NEW_INFERENCE)) {
extraLanguageFeatures.put(LanguageFeature.NewInference, LanguageFeature.State.ENABLED);
}
@@ -355,6 +355,8 @@ class K2JVMCompiler : CLICompiler<K2JVMCompilerArguments>() {
}
private fun putAdvancedOptions(configuration: CompilerConfiguration, arguments: K2JVMCompilerArguments) {
configuration.put(CommonConfigurationKeys.USE_NEW_INFERENCE, arguments.newInference)
configuration.put(JVMConfigurationKeys.DISABLE_CALL_ASSERTIONS, arguments.noCallAssertions)
configuration.put(JVMConfigurationKeys.DISABLE_RECEIVER_ASSERTIONS, arguments.noReceiverAssertions)
configuration.put(JVMConfigurationKeys.DISABLE_PARAM_ASSERTIONS, arguments.noParamAssertions)