nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8d55ad4
)
typing: skip error message when dealing with bottom types
author
Jean Privat
<jean@pryen.org>
Sat, 7 Nov 2015 04:45:39 +0000
(23:45 -0500)
committer
Jean Privat
<jean@pryen.org>
Sat, 7 Nov 2015 04:45:39 +0000
(23:45 -0500)
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
a6af9ba
..
b4599d0
100644
(file)
--- a/
src/semantize/typing.nit
+++ b/
src/semantize/typing.nit
@@
-117,6
+117,7
@@
private class TypeVisitor
#node.debug("Unsafe typing: expected {sup}, got {sub}")
return sup
end
+ if sup isa MBottomType then return null # Skip error
if sub.need_anchor then
var u = anchor_to(sub)
self.modelbuilder.error(node, "Type Error: expected `{sup}`, got `{sub}: {u}`.")