Restrict yield outside generators in strict mode

* Move some yield/generic tests from compress/harmony.js to
  compress/yield.js
 * Adjust error messages to conform ecmascript standards
This commit is contained in:
Anthony Van de Gejuchte
2016-06-17 20:39:03 +02:00
committed by Richard van Velzen
parent 6b03b800b3
commit ca04508cd1
7 changed files with 208 additions and 123 deletions

View File

@@ -16,11 +16,11 @@ describe("Class", function() {
}
var error = function(e) {
return e instanceof uglify.JS_Parse_Error &&
e.message === "Unexpected token: expand (...)";
e.message === "SyntaxError: Unexpected token: expand (...)";
}
for (var i = 0; i < tests.length; i++) {
assert.throws(test(tests[i]), error);
}
});
});
});