Skip to content

Commit

Permalink
tests for 1840
Browse files Browse the repository at this point in the history
  • Loading branch information
geraldalewis committed Nov 14, 2011
1 parent bde1c62 commit fba69f5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/function_invocation.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit fba69f5

Please sign in to comment.