nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
7bc61db
)
typing: `or else` on null is no more an error
author
Jean Privat
<jean@pryen.org>
Thu, 18 Jun 2015 01:14:51 +0000
(21:14 -0400)
committer
Jean Privat
<jean@pryen.org>
Thu, 18 Jun 2015 01:14:51 +0000
(21:14 -0400)
A warning at most
Signed-off-by: Jean Privat <jean@pryen.org>
src/semantize/typing.nit
patch
|
blob
|
history
diff --git
a/src/semantize/typing.nit
b/src/semantize/typing.nit
index
b37e4a4
..
9724537
100644
(file)
--- a/
src/semantize/typing.nit
+++ b/
src/semantize/typing.nit
@@
-1304,7
+1304,8
@@
redef class AOrElseExpr
end
if t1 isa MNullType then
- v.error(n_expr, "Type Error: `or else` on `null`.")
+ self.mtype = t2
+ return
else if v.check_can_be_null(n_expr, t1) then
t1 = t1.as_notnull
end