From 8f84373b18db9090a3ab23c8df89b15ccbdb28aa Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Fri, 6 Nov 2015 23:45:39 -0500 Subject: [PATCH] typing: skip error message when dealing with bottom types Signed-off-by: Jean Privat --- src/semantize/typing.nit | 1 + 1 file changed, 1 insertion(+) diff --git a/src/semantize/typing.nit b/src/semantize/typing.nit index a6af9ba..b4599d0 100644 --- 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}`.") -- 1.7.9.5