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 {
method initialize() {
console.println("Creando un objeto!")
}
}
class B inherits A {}
Wollok se está comportando de esta forma:
>>> new A()
Creando un objeto!
a A
>>> new B()
a B
El comportamiento del initialize se debería heredar como el de cualquier otro método. Esto como funciona ahora se puede lograr pisando el método con un llamado a super:
class B inherits A {
method initialize() {
super()
}
}
Pero por otro lado esto tira un (razonable, en mi opinión) warning de que no tiene sentido pisar un método sólo para llamar a super.
The text was updated successfully, but these errors were encountered:
Para el código:
Wollok se está comportando de esta forma:
El comportamiento del initialize se debería heredar como el de cualquier otro método. Esto como funciona ahora se puede lograr pisando el método con un llamado a super:
Pero por otro lado esto tira un (razonable, en mi opinión) warning de que no tiene sentido pisar un método sólo para llamar a super.
The text was updated successfully, but these errors were encountered: