mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
Allowing classes to be better decorated with implicit calls. Issue #548
This commit is contained in:
@@ -206,3 +206,15 @@ class MyElement extends Element
|
||||
ok MyElement.extended is Base.extended
|
||||
ok MyElement.fromHTML is Element.fromHTML
|
||||
ok MyElement.__superClass__ is Element.prototype
|
||||
|
||||
|
||||
# Test classes wrapped in decorators.
|
||||
func = (klass) ->
|
||||
klass::prop = 'value'
|
||||
klass
|
||||
|
||||
func class Test
|
||||
prop2: 'value2'
|
||||
|
||||
ok (new Test).prop is 'value'
|
||||
ok (new Test).prop2 is 'value2'
|
||||
|
||||
Reference in New Issue
Block a user