about summary refs log tree commit diff stats
path: root/057static_dispatch.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-12-19 12:41:09 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-12-19 12:41:09 -0800
commit7874586ebdbe4d57dff167d80f9f6d59056d3c73 (patch)
tree2ae73642b3ce8ec55a7b412aa7c4184551cca81f /057static_dispatch.cc
parent67db19a05335c7fbea3ad6737303c8848fd39e74 (diff)
downloadmu-7874586ebdbe4d57dff167d80f9f6d59056d3c73.tar.gz
2546 - another phase-ordering constraint
Thanks Caleb Couch.
Diffstat (limited to '057static_dispatch.cc')
-rw-r--r--057static_dispatch.cc20
1 files changed, 19 insertions, 1 deletions
diff --git a/057static_dispatch.cc b/057static_dispatch.cc
index 222bd97f..b57ff4c9 100644
--- a/057static_dispatch.cc
+++ b/057static_dispatch.cc
@@ -143,7 +143,7 @@ for (long long int i = 0; i < SIZE(caller.products); ++i) {
 }
 
 //: 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
 
 :(code)
@@ -492,3 +492,21 @@ recipe! foo x:address:number -> y:number [
 +mem: storing 34 in location 2
 $error: 0
 $warn: 0
+
+:(scenario dispatch_errors_come_after_unknown_name_errors)
+% Hide_errors = true;
+recipe main [
+  y:number <- foo x
+]
+recipe foo a:number -> b:number [
+  local-scope
+  load-ingredients
+  reply 34
+]
+recipe foo a:boolean -> b:number [
+  local-scope
+  load-ingredients
+  reply 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'