nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
syntax: allow untyped variable declaration
[nit.git]
/
src
/
syntax
/
control_flow.nit
diff --git
a/src/syntax/control_flow.nit
b/src/syntax/control_flow.nit
index
4b8d0fc
..
dd3ca06
100644
(file)
--- a/
src/syntax/control_flow.nit
+++ b/
src/syntax/control_flow.nit
@@
-53,6
+53,8
@@
abstract class VariableContext
do
if v.must_be_set and not is_set(v) then
_visitor.error(n, "Error: variable '{v}' is possibly unset.")
+ else if v.is_typed and stype(v) == null then
+ _visitor.error(n, "Error: variable '{v}' is untyped.")
end
end