mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
tests for 1840
This commit is contained in:
parent
bde1c6282e
commit
fba69f5651
1 changed files with 12 additions and 0 deletions
|
@ -506,3 +506,15 @@ test "#1416: don't omit one 'new' when compiling 'new new fn()()'", ->
|
|||
eq obj.prop, nonce
|
||||
eq obj.a, argNonceA
|
||||
eq obj.b, argNonceB
|
||||
|
||||
test "#1840: accessing the `prototype` after function invocation should compile", ->
|
||||
doesNotThrow -> CoffeeScript.compile 'fn()::prop'
|
||||
|
||||
nonce = {}
|
||||
class Test then id: nonce
|
||||
|
||||
dotAccess = -> Test::
|
||||
protoAccess = -> Test
|
||||
|
||||
eq dotAccess().id, nonce
|
||||
eq protoAccess()::id, nonce
|
||||
|
|
Loading…
Reference in a new issue