diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-09-13 00:07:38 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-09-13 00:07:38 -0700 |
commit | 431bbb1aa7944c5b67fa25d833d7ca992f72511d (patch) | |
tree | 52f8522713824fc7c8e7423f2efc7827983b6311 /056shape_shifting_recipe.cc | |
parent | 2440e5bd77c573d32c38774713e0b6432744b8dc (diff) | |
download | mu-431bbb1aa7944c5b67fa25d833d7ca992f72511d.tar.gz |
3346
Process type abbreviations in *shape-shifting* function headers.
Diffstat (limited to '056shape_shifting_recipe.cc')
-rw-r--r-- | 056shape_shifting_recipe.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/056shape_shifting_recipe.cc b/056shape_shifting_recipe.cc index 761656fd..1903921e 100644 --- a/056shape_shifting_recipe.cc +++ b/056shape_shifting_recipe.cc @@ -25,8 +25,13 @@ def foo a:_t -> result:_t [ //: be rewriting such instructions to *specializations* with the type //: ingredients filled in. +//: One exception (and this makes things very ugly): we need to expand type +//: abbreviations in shape-shifting recipes because we need them types for +//: deciding which variant to specialize. + :(before "End Transform Checks") -if (any_type_ingredient_in_header(/*recipe_ordinal*/p->first)) continue; +r.transformed_until = t; +if (Transform.at(t) != static_cast<transform_fn>(expand_type_abbreviations) && any_type_ingredient_in_header(/*recipe_ordinal*/p->first)) continue; :(after "Running One Instruction") if (Current_routine->calls.front().running_step_index == 0 |