syntax: allow untyped variable declaration
authorJean Privat <jean@pryen.org>
Thu, 20 Aug 2009 02:29:55 +0000 (22:29 -0400)
committerJean Privat <jean@pryen.org>
Thu, 20 Aug 2009 02:29:55 +0000 (22:29 -0400)
commit220823e713cef8915241679a614fbfb53ddaece0
treea63ea9264a000585e1c5efec8baadfe4a1603f8e
parent4241a612bc895928cebea59f0ab3d1b9c8518d84
syntax: allow untyped variable declaration

It means there is now a distinction between variables with a null static
type because of a previous error and untyped variables that also have null
static type. So introduce Variable::is_typed.

Enhance check_is_set with untyped variable verification.

Compile untyped variable as 'nullable Object' registers.

Signed-off-by: Jean Privat <jean@pryen.org>
14 files changed:
src/syntax/control_flow.nit
src/syntax/icode_generation.nit
src/syntax/syntax_base.nit
src/syntax/typing.nit
tests/base_var_untyped.nit [new file with mode: 0644]
tests/sav/base_var_untyped.sav [new file with mode: 0644]
tests/sav/base_var_untyped_alt1.sav [new file with mode: 0644]
tests/sav/base_var_untyped_alt2.sav [new file with mode: 0644]
tests/sav/base_var_untyped_alt3.sav [new file with mode: 0644]
tests/sav/base_var_untyped_alt4.sav [new file with mode: 0644]
tests/sav/base_var_untyped_alt5.sav [new file with mode: 0644]
tests/sav/base_var_untyped_alt6.sav [new file with mode: 0644]
tests/sav/base_var_untyped_alt7.sav [new file with mode: 0644]
tests/sav/base_var_untyped_alt8.sav [new file with mode: 0644]