syntax: while condition can now cast variable
authorJean Privat <jean@pryen.org>
Mon, 22 Jun 2009 18:19:12 +0000 (14:19 -0400)
committerJean Privat <jean@pryen.org>
Wed, 24 Jun 2009 19:48:18 +0000 (15:48 -0400)
commit264fd697a626adb8a21d4d497b2be5a9b2aa51cf
tree001804238075ce4fe2fd619ac4e846e03cfd0218
parent426478abcd8ea04891a0fb4839a246ee0d13ea0f
syntax: while condition can now cast variable

Example:
  var a = foo # foo gives a A
  # Before the while, the base static type of a is set to A
  while a isa B do
    a.some_b_stuff # OK, since a isa B
    a = foo # OK, since 'base' static type of a is A
  end

Signed-off-by: Jean Privat <jean@pryen.org>
src/syntax/typing.nit
tests/base_isa_cast2.nit
tests/sav/base_isa_cast2.sav
tests/sav/base_isa_cast2_alt8.sav