about summary refs log tree commit diff stats
path: root/061recipe.cc
diff options
context:
space:
mode:
Diffstat (limited to '061recipe.cc')
-rw-r--r--061recipe.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/061recipe.cc b/061recipe.cc
index 09908e1a..2fb9ee13 100644
--- a/061recipe.cc
+++ b/061recipe.cc
@@ -150,3 +150,17 @@ bool is_mu_recipe(reagent r) {
   // End is_mu_recipe Cases
   return false;
 }
+
+:(scenario copy_typecheck_recipe_variable)
+% Hide_errors = true;
+recipe main [
+  3:number <- copy 34  # abc def
+  {1: (recipe number -> number)} <- copy f  # store literal in a matching variable
+  {2: (recipe boolean -> boolean)} <- copy {1: (recipe number -> number)}  # mismatch between recipe variables
+]
+recipe f x:number -> y:number [
+  local-scope
+  load-ingredients
+  y <- copy x
+]
++error: main: can't copy {1: (recipe number -> number)} to {2: (recipe boolean -> boolean)}; types don't match