Open mmatos opened 5 years ago
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)
salud
Any
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
I just enabled the type system and was trying it out (I'm currently using Wollok 1.8) and noticed this:
salud
is inferred asAny
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: