about summary refs log tree commit diff stats
path: root/054static_dispatch.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2017-10-18 20:08:05 -0700
committerKartik K. Agaram <vc@akkartik.com>2017-10-18 20:08:05 -0700
commit636837e7d9733206cba3a1947ec46d4f003b93ce (patch)
treefcb906988cf3fa872253bfad1e7daa23e9567c23 /054static_dispatch.cc
parent292ccba1bbdc8c2ec6cfacefa15f19c8d215b58c (diff)
downloadmu-636837e7d9733206cba3a1947ec46d4f003b93ce.tar.gz
4086 - back to cleaning up delimited continuations
Diffstat (limited to '054static_dispatch.cc')
-rw-r--r--054static_dispatch.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/054static_dispatch.cc b/054static_dispatch.cc
index 450d887f..e4e417d8 100644
--- a/054static_dispatch.cc
+++ b/054static_dispatch.cc
@@ -200,7 +200,7 @@ string best_variant(instruction& inst, const recipe& caller_recipe) {
   if (!candidates.empty()) return best_variant(inst, candidates).name;
 
   // error messages
-  if (get(Recipe_ordinal, inst.name) >= MAX_PRIMITIVE_RECIPES) {  // we currently don't check types for primitive variants
+  if (!is_primitive(get(Recipe_ordinal, inst.name))) {  // we currently don't check types for primitive variants
     if (SIZE(variants) == 1) {
       raise << maybe(caller_recipe.name) << "types don't match in call for '" << to_original_string(inst) << "'\n" << end();
       raise << "  which tries to call '" << original_header_label(get(Recipe, variants.at(0))) << "'\n" << end();