about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--055recipe_header.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/055recipe_header.cc b/055recipe_header.cc
index 229a514d..29787fae 100644
--- a/055recipe_header.cc
+++ b/055recipe_header.cc
@@ -33,6 +33,8 @@ void load_recipe_header(istream& in, recipe& result) {
   result.has_header = true;
   while (has_data(in) && in.peek() != '[' && in.peek() != '\n') {
     string s = next_word(in);
+    if (s == "<-")
+      raise << "recipe " << result.name << " should say '->' and not '<-'\n" << end();
     if (s == "->") break;
     result.ingredients.push_back(reagent(s));
     trace(9999, "parse") << "header ingredient: " << result.ingredients.back().original_string << end();
@@ -71,6 +73,12 @@ def bar [
 ]
 +mem: storing 4 in location 1
 
+:(scenario recipe_handles_wrong_arrow)
+% Hide_errors = true;
+def foo a:number <- b:number [
+]
++error: recipe foo should say '->' and not '<-'
+
 :(scenario recipe_handles_missing_bracket)
 % Hide_errors = true;
 def main