Get rid of coroutinesWarn/coroutinesEnable/coroutinesError
Use a single coroutinesState instead. Change the coroutines state in
some tests from "warn" to "enable"/"error" to test that deserialization
of older config files works ("warn" is the default value, so it wasn't
testing anything here)
This commit is contained in:
+11
-13
@@ -91,14 +91,12 @@ public abstract class CommonCompilerArguments implements Serializable {
|
||||
@Argument(value = "-Xno-check-impl", description = "Do not check presence of 'impl' modifier in multi-platform projects")
|
||||
public boolean noCheckImpl;
|
||||
|
||||
@Argument(value = "-Xcoroutines=warn", description = "")
|
||||
public boolean coroutinesWarn;
|
||||
|
||||
@Argument(value = "-Xcoroutines=error", description = "")
|
||||
public boolean coroutinesError;
|
||||
|
||||
@Argument(value = "-Xcoroutines=enable", description = "")
|
||||
public boolean coroutinesEnable;
|
||||
@Argument(
|
||||
value = "-Xcoroutines",
|
||||
valueDescription = "{enable|warn|error}",
|
||||
description = "Enable coroutines or report warnings or errors on declarations and use sites of 'suspend' modifier"
|
||||
)
|
||||
public String coroutinesState = WARN;
|
||||
|
||||
public List<String> freeArgs = new SmartList<>();
|
||||
|
||||
@@ -109,11 +107,7 @@ public abstract class CommonCompilerArguments implements Serializable {
|
||||
|
||||
@NotNull
|
||||
public static CommonCompilerArguments createDefaultInstance() {
|
||||
DummyImpl arguments = new DummyImpl();
|
||||
arguments.coroutinesEnable = false;
|
||||
arguments.coroutinesWarn = true;
|
||||
arguments.coroutinesError = false;
|
||||
return arguments;
|
||||
return new DummyImpl();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -121,6 +115,10 @@ public abstract class CommonCompilerArguments implements Serializable {
|
||||
return "kotlinc";
|
||||
}
|
||||
|
||||
public static final String WARN = "warn";
|
||||
public static final String ERROR = "error";
|
||||
public static final String ENABLE = "enable";
|
||||
|
||||
// Used only for serialize and deserialize settings. Don't use in other places!
|
||||
public static final class DummyImpl extends CommonCompilerArguments {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user