mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
Add test for static super
calls.
Tests jashkenas/coffee-script#1598. Fails currently as expected.
This commit is contained in:
parent
41b8b3256d
commit
0b3029dd3f
1 changed files with 14 additions and 0 deletions
|
@ -513,3 +513,17 @@ test "#1482: classes can extend expressions", ->
|
|||
class A then nonce: nonce
|
||||
class B extends id A
|
||||
eq nonce, (new B).nonce
|
||||
|
||||
test "#1598: super works for static methods too", ->
|
||||
|
||||
class Parent
|
||||
method: ->
|
||||
'NO'
|
||||
@method: ->
|
||||
'yes'
|
||||
|
||||
class Child extends Parent
|
||||
@method: ->
|
||||
'pass? ' + super
|
||||
|
||||
eq Child.method(), 'pass? yes'
|
||||
|
|
Loading…
Reference in a new issue