diff options
Diffstat (limited to 'test/compress/new.js')
-rw-r--r-- | test/compress/new.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/compress/new.js b/test/compress/new.js index 83da88e6..640f201a 100644 --- a/test/compress/new.js +++ b/test/compress/new.js @@ -82,3 +82,19 @@ new_with_unary_prefix: { } expect_exact: 'var bar=(+new Date).toString(32);'; } + +dot_parenthesis_1: { + input: { + console.log(new (Math.random().constructor) instanceof Number); + } + expect_exact: "console.log(new(Math.random().constructor)instanceof Number);" + expect_stdout: "true" +} + +dot_parenthesis_2: { + input: { + console.log(typeof new function(){Math.random()}.constructor); + } + expect_exact: "console.log(typeof new function(){Math.random()}.constructor);" + expect_stdout: "function" +} |