From 80411d01a3a31a8a08819b3d415811f746baab3a Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 10 Apr 2016 21:08:31 -0700 Subject: 2830 - bring back deleted test from 2829 Issue 1 in 2829 is now fixed. --- 056static_dispatch.cc | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to '056static_dispatch.cc') 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; -- cgit 1.4.1-2-gfad0