Make classes implicitly strict mode
This commit is contained in:
10
test/compress/directives.js
Normal file
10
test/compress/directives.js
Normal file
@@ -0,0 +1,10 @@
|
||||
class_directives_compression: {
|
||||
input: {
|
||||
class foo {
|
||||
foo() {
|
||||
"use strict";
|
||||
}
|
||||
}
|
||||
}
|
||||
expect_exact: "class foo{foo(){}}"
|
||||
}
|
||||
@@ -120,7 +120,6 @@ yield_as_identifier_outside_strict_mode: {
|
||||
function foo(...yield){}
|
||||
try { new Error("") } catch (yield) {}
|
||||
var yield = "foo";
|
||||
class yield {}
|
||||
}
|
||||
expect: {
|
||||
import yield from "bar";
|
||||
@@ -137,7 +136,6 @@ yield_as_identifier_outside_strict_mode: {
|
||||
function foo(...yield){}
|
||||
try { new Error("") } catch (yield) {}
|
||||
var yield = "foo";
|
||||
class yield {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user