about summary refs log tree commit diff stats
path: root/054static_dispatch.cc
diff options
context:
space:
mode:
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();