JS backend: remove ECMA 3, but several tests is broken.
Main reason: overload extention property: Int.bar = 1 String.bar = 2
This commit is contained in:
@@ -150,7 +150,10 @@ public class K2JSCompiler extends CLICompiler<K2JSCompilerArguments> {
|
||||
|
||||
@NotNull
|
||||
private static Config getConfig(@NotNull K2JSCompilerArguments arguments, @NotNull Project project) {
|
||||
EcmaVersion ecmaVersion = EcmaVersion.fromString(arguments.target);
|
||||
if (arguments.target != null) {
|
||||
assert arguments.target == "v5" : "Unsupported ECMA version: " + arguments.target;
|
||||
}
|
||||
EcmaVersion ecmaVersion = EcmaVersion.defaultVersion();
|
||||
String moduleId = FileUtil.getNameWithoutExtension(new File(arguments.outputFile));
|
||||
if (arguments.libraryFiles != null) {
|
||||
return new LibrarySourcesConfig(project, moduleId, Arrays.asList(arguments.libraryFiles), ecmaVersion, arguments.sourcemap);
|
||||
|
||||
@@ -40,7 +40,7 @@ public class K2JSCompilerArguments extends CompilerArguments {
|
||||
@Argument(value = "sourcemap", description = "Generate SourceMap")
|
||||
public boolean sourcemap;
|
||||
|
||||
@Argument(value = "target", description = "Generate js files for specific ECMA version (3 or 5, default ECMA 3)")
|
||||
@Argument(value = "target", description = "Generate js files for specific ECMA version (now support only ECMA 5)")
|
||||
public String target;
|
||||
|
||||
@Argument(value = "tags", description = "Demarcate each compilation message (error, warning, etc) with an open and close tag")
|
||||
|
||||
Reference in New Issue
Block a user