about summary refs log tree commit diff stats
path: root/054static_dispatch.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-05-24 20:06:13 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-05-24 20:06:13 -0700
commit6b59e98683a0311794cf8bb6f59766bb85c33d8f (patch)
treedbcded4e56337be751095094c94504ed38c465db /054static_dispatch.cc
parentba7b4f643defaba112bdd6e098f4ff4ed5129315 (diff)
downloadmu-6b59e98683a0311794cf8bb6f59766bb85c33d8f.tar.gz
3006
Diffstat (limited to '054static_dispatch.cc')
-rw-r--r--054static_dispatch.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/054static_dispatch.cc b/054static_dispatch.cc
index 106c757a..dd9fc84b 100644
--- a/054static_dispatch.cc
+++ b/054static_dispatch.cc
@@ -274,10 +274,8 @@ bool all_header_reagents_strictly_match_except_literal_zero_against_address(cons
 }
 
 bool types_strictly_match_except_literal_zero_against_address(const reagent& to, const reagent& from) {
-  // to sidestep type-checking, use /unsafe in the source.
-  // this will be highlighted in red inside vim. just for setting up some tests.
   if (is_literal(from) && is_mu_address(to))
-    return from.name == "0" && !contains_type_ingredient_name(to);
+    return from.name == "0";
   return types_strictly_match(to, from);
 }
 
@@ -311,14 +309,10 @@ bool all_header_reagents_strictly_match_except_literal_against_address_or_boolea
 }
 
 bool types_strictly_match_except_literal_against_address_or_boolean(const reagent& to, const reagent& from) {
-  // to sidestep type-checking, use /unsafe in the source.
-  // this will be highlighted in red inside vim. just for setting up some tests.
   if (is_literal(from)
       && to.type && to.type->value == get(Type_ordinal, "boolean"))
     return boolean_matches_literal(to, from);
-  if (is_literal(from) && is_mu_address(to))
-    return from.name == "0" && !contains_type_ingredient_name(to);
-  return types_strictly_match(to, from);
+  return types_strictly_match_except_literal_zero_against_address(to, from);
 }
 
 // phase 5