uqbar-project / wollok

Wollok Programming Language
GNU General Public License v3.0
60 stars 16 forks source link

Number attribute inferred as Any even though there is a default value and used in numeric operations #1723

Open mmatos opened 5 years ago

mmatos commented 5 years ago

I just enabled the type system and was trying it out (I'm currently using Wollok 1.8) and noticed this: imagen

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
PalumboN commented 5 years ago

Esto no lo puedo replicar :(

PalumboN commented 3 years ago

Related https://github.com/uqbar-project/wollok/issues/1757