diff options
Diffstat (limited to '056static_dispatch.cc')
-rw-r--r-- | 056static_dispatch.cc | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/056static_dispatch.cc b/056static_dispatch.cc index 8d1d27b7..1d57872d 100644 --- a/056static_dispatch.cc +++ b/056static_dispatch.cc @@ -134,7 +134,7 @@ for (int i = 0; i < SIZE(caller.products); ++i) check_or_set_invalid_types(caller.products.at(i).type, maybe(caller.name), "recipe header product"); //: after filling in all missing types (because we'll be introducing 'blank' types in this transform in a later layer, for shape-shifting recipes) -:(after "End Type Modifying Transforms") +:(after "Transform.push_back(transform_names)") Transform.push_back(resolve_ambiguous_calls); // idempotent //: In a later layer we'll introduce recursion in resolve_ambiguous_calls, by @@ -545,5 +545,23 @@ def! foo x:address:number -> y:number [ +mem: storing 34 in location 2 $error: 0 +:(scenario dispatch_errors_come_after_unknown_name_errors) +% Hide_errors = true; +def main [ + y:number <- foo x +] +def foo a:number -> b:number [ + local-scope + load-ingredients + return 34 +] +def foo a:boolean -> b:number [ + local-scope + load-ingredients + return 35 +] ++error: main: missing type for x in 'y:number <- foo x' ++error: main: failed to find a matching call for 'y:number <- foo x' + :(before "End Includes") using std::abs; |