about summary refs log tree commit diff stats
path: root/057static_dispatch.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-11-05 00:27:47 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-11-05 00:27:47 -0800
commit40647090be982dde1ff238221a1ba9ff4f260f16 (patch)
treef10be3669f07cac308e2c8f1ca3c469323c5aa78 /057static_dispatch.cc
parent46b160df5e5780a68962f8b4e0b63b6dc811ef8c (diff)
downloadmu-40647090be982dde1ff238221a1ba9ff4f260f16.tar.gz
2366 - disallow static dispatch inside header-less recipes
Not only can such recipes not have variants, their bodies too will be
oblivious to multiple variants or generics.
Diffstat (limited to '057static_dispatch.cc')
-rw-r--r--057static_dispatch.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/057static_dispatch.cc b/057static_dispatch.cc
index 4de67aa3..3bac046e 100644
--- a/057static_dispatch.cc
+++ b/057static_dispatch.cc
@@ -108,6 +108,7 @@ Transform.push_back(resolve_ambiguous_calls);
 
 :(code)
 void resolve_ambiguous_calls(recipe_ordinal r) {
+  if (!Recipe[r].has_header) return;
   trace(9991, "transform") << "--- resolve ambiguous calls for recipe " << Recipe[r].name << end();
   for (long long int index = 0; index < SIZE(Recipe[r].steps); ++index) {
     instruction& inst = Recipe[r].steps.at(index);