handle comments and use strict directives better - fixes #1030

This commit is contained in:
Sebastian McKenzie
2015-03-16 13:07:28 +11:00
parent 25fa10e592
commit d94bb2e048
8 changed files with 33 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
// opt
"use strict";
// opt
var a = 1;
var b = 2;
var a = 1;

View File

@@ -1,8 +1,8 @@
"use strict";
// we need to deopt `test` if it's reassigned as we can't be certain of it's
// state, ie. it could have been rebound or dereferenced
"use strict";
function test(exit) {
if (exit) {
return this.x;

View File

@@ -0,0 +1,4 @@
// comments
"use strict";
module.exports = {};

View File

@@ -0,0 +1,4 @@
// comments
"use strict";
module.exports = {};

View File

@@ -0,0 +1,3 @@
// comments
module.exports = {};

View File

@@ -0,0 +1,5 @@
// comments
"use strict";
module.exports = {};