You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class A
constructor: (toto, titi) ->
@_toto = toto
@_titi = titi
sayHello: () =>
alert("A")
class B extends A
constructor: (@toto, @titi, @tutu) ->
super(@toto, @titi)
@_tutu = tutu
sayHello: ()=>
alert("B")
b = new B("ttt", "titit", "titi")
b.sayHello()
Binding (=>) in B is done before super call, so sayHello B is binded too soon and overrided by sayHello A. Is it normal?
The text was updated successfully, but these errors were encountered:
When I do something like that:
Binding (=>) in B is done before super call, so sayHello B is binded too soon and overrided by sayHello A. Is it normal?
The text was updated successfully, but these errors were encountered: