Fix call MetaProperty (#5324)

This commit is contained in:
Geoffrey Booth
2020-06-02 21:00:40 -07:00
committed by GitHub
parent 2fd9ee403c
commit 07f644c392
6 changed files with 30 additions and 9 deletions

View File

@@ -1917,6 +1917,10 @@ test "#4609: Support new.target", ->
new Foo()
eq newTarget, yes
test "#5323: new.target can be the argument of a function", ->
fn = (arg) -> arg
fn new.target
test "#5085: Bug: @ reference to class not maintained in do block", ->
thisFoo = 'initial foo'
thisBar = 'initial bar'

View File

@@ -942,6 +942,13 @@ test "#4834: dynamic import", ->
};
"""
eqJS """
console.log import('foo')
""",
"""
console.log(import('foo'));
"""
test "#5317: Support import.meta", ->
eqJS """
foo = import.meta
@@ -991,3 +998,10 @@ test "#5317: Support import.meta", ->
foo = import.meta.bar;
"""
eqJS """
console.log import.meta.url
""",
"""
console.log(import.meta.url);
"""