mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 19:34:27 -05:00
fixing assigning to @properties within an expression
This commit is contained in:
@@ -346,7 +346,7 @@ module CoffeeScript
|
|||||||
end
|
end
|
||||||
|
|
||||||
def properties?
|
def properties?
|
||||||
return !@properties.empty?
|
return !@properties.empty? || @base.is_a?(ThisNode)
|
||||||
end
|
end
|
||||||
|
|
||||||
def array?
|
def array?
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ SecondChild::func: (string) ->
|
|||||||
super('two/') + string
|
super('two/') + string
|
||||||
|
|
||||||
ThirdChild: ->
|
ThirdChild: ->
|
||||||
this.array: [1, 2, 3]
|
@array: [1, 2, 3]
|
||||||
ThirdChild extends SecondChild
|
ThirdChild extends SecondChild
|
||||||
ThirdChild::func: (string) ->
|
ThirdChild::func: (string) ->
|
||||||
super('three/') + string
|
super('three/') + string
|
||||||
@@ -24,7 +24,7 @@ print result is 'zero/one/two/three/four'
|
|||||||
|
|
||||||
|
|
||||||
TopClass: (arg) ->
|
TopClass: (arg) ->
|
||||||
this.prop: 'top-' + arg
|
@prop: 'top-' + arg
|
||||||
|
|
||||||
SuperClass: (arg) ->
|
SuperClass: (arg) ->
|
||||||
super 'super-' + arg
|
super 'super-' + arg
|
||||||
|
|||||||
Reference in New Issue
Block a user