diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2017-06-02 00:44:27 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2017-06-02 00:44:27 -0700 |
commit | 71190ea5df7a77364e1efdbbf02d3d99afe813e3 (patch) | |
tree | a79fbefaaa486c67d04c3e7e4df290d0f628f7ab /071recipe.cc | |
parent | 6424e19999499719014395cc2ecd025e8efb8a91 (diff) | |
download | mu-71190ea5df7a77364e1efdbbf02d3d99afe813e3.tar.gz |
3899
Diffstat (limited to '071recipe.cc')
-rw-r--r-- | 071recipe.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/071recipe.cc b/071recipe.cc index 033bc21a..9d77869d 100644 --- a/071recipe.cc +++ b/071recipe.cc @@ -378,3 +378,18 @@ def foo {f: (recipe num -> num)} [ ] +error: foo: missing type for 'f' in 'b:num <- call f, 1' +error: did you forget 'load-ingredients'? + +:(before "End Mu Types Initialization") +put(Type_abbreviations, "function", new_type_tree("recipe")); + +:(scenario call_function) +def main [ + {1: (function number -> number)} <- copy f + 2:num <- call {1: (function number -> number)}, 34 +] +def f x:num -> y:num [ + local-scope + load-ingredients + y <- copy x +] ++mem: storing 34 in location 2 |