From e46306432ddb75a89f69d92ccc175a23f0b72072 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 25 Jul 2015 14:19:28 -0700 Subject: 1848 - core instructions now check for ingredients Also standardized warnings. --- 027trace.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to '027trace.cc') diff --git a/027trace.cc b/027trace.cc index 12cc7ca3..742432fa 100644 --- a/027trace.cc +++ b/027trace.cc @@ -12,6 +12,10 @@ TRACE, Recipe_ordinal["trace"] = TRACE; :(before "End Primitive Recipe Implementations") case TRACE: { + if (SIZE(ingredients) != 2) { + raise << current_recipe_name() << ": 'trace' takes exactly two ingredients rather than '" << current_instruction().to_string() << "'\n" << end(); + break; + } assert(is_literal(current_instruction().ingredients.at(0))); string label = current_instruction().ingredients.at(0).name; assert(is_literal(current_instruction().ingredients.at(1))); -- cgit 1.4.1-2-gfad0