wollok
wollok copied to clipboard
Number attribute inferred as Any even though there is a default value and used in numeric operations
I just enabled the type system and was trying it out (I'm currently using Wollok 1.8) and noticed this:
salud
is inferred as Any
even though it has a default value of 100 and is used like this: salud = 0.max(salud - danio * 2)
Then it was inferred as Number when I added:
method sinVida() = salud == 0
Esto no lo puedo replicar :(
Related https://github.com/uqbar-project/wollok/issues/1757