mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
Fix call MetaProperty (#5324)
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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);
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user