nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd97f5a
)
compiler: no-on for `AIsaExpr` without a valid `cast_type`
author
Jean Privat
<jean@pryen.org>
Tue, 16 Jun 2015 14:50:28 +0000
(10:50 -0400)
committer
Jean Privat
<jean@pryen.org>
Tue, 16 Jun 2015 14:50:28 +0000
(10:50 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>
src/compiler/abstract_compiler.nit
patch
|
blob
|
history
diff --git
a/src/compiler/abstract_compiler.nit
b/src/compiler/abstract_compiler.nit
index
221e628
..
8fae169
100644
(file)
--- a/
src/compiler/abstract_compiler.nit
+++ b/
src/compiler/abstract_compiler.nit
@@
-3044,7
+3044,9
@@
redef class AIsaExpr
redef fun expr(v)
do
var i = v.expr(self.n_expr, null)
- return v.type_test(i, self.cast_type.as(not null), "isa")
+ var cast_type = self.cast_type
+ if cast_type == null then return null # no-no on broken node
+ return v.type_test(i, cast_type, "isa")
end
end