Skip to content

Commit

Permalink
Turn on the InlineVariables pass for ES6-out mode.
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=170777330
  • Loading branch information
tbreisacher authored and dimvar committed Oct 3, 2017
1 parent 9cf9f52 commit 1ed6136
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/com/google/javascript/jscomp/DefaultPassConfig.java
Expand Up @@ -1704,7 +1704,7 @@ protected CompilerPass create(AbstractCompiler compiler) {

@Override
protected FeatureSet featureSet() {
return ES5;
return ES8_MODULES;
}
};

Expand Down Expand Up @@ -2528,7 +2528,7 @@ protected CompilerPass create(AbstractCompiler compiler) {

@Override
protected FeatureSet featureSet() {
return ES5;
return ES8_MODULES;
}
};

Expand All @@ -2542,7 +2542,7 @@ protected CompilerPass create(AbstractCompiler compiler) {

@Override
protected FeatureSet featureSet() {
return ES5;
return ES8_MODULES;
}
};

Expand Down
6 changes: 2 additions & 4 deletions test/com/google/javascript/jscomp/IntegrationTest.java
Expand Up @@ -4569,8 +4569,7 @@ public void testDefaultParameters() {
"var a={a:9}; a=void 0===a?{a:5}:a;alert(3+a.a)");
}

// TODO(tbreisacher): Enable this test when InlineVariables is re-enabled in non-transpile mode.
public void disabled_testDefaultParametersNonTranspiling() {
public void testDefaultParametersNonTranspiling() {
CompilerOptions options = createCompilerOptions();
CompilationLevel.ADVANCED_OPTIMIZATIONS.setOptionsForCompilationLevel(options);
options.setLanguageIn(LanguageMode.ECMASCRIPT_2017);
Expand Down Expand Up @@ -4607,8 +4606,7 @@ public void testRestObjectPatternParameters() {
"}(1,1,1,1,1))"));
}

// TODO(tbreisacher): Enable this test when InlineVariables is re-enabled in non-transpile mode.
public void disabled_testRestObjectPatternParametersNonTranspiling() {
public void testRestObjectPatternParametersNonTranspiling() {
CompilerOptions options = createCompilerOptions();
CompilationLevel.ADVANCED_OPTIMIZATIONS.setOptionsForCompilationLevel(options);
options.setLanguageIn(LanguageMode.ECMASCRIPT_2017);
Expand Down

0 comments on commit 1ed6136

Please sign in to comment.