diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-02-18 01:19:36 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-02-18 01:21:29 -0800 |
commit | 07ca569193dabb30d1d7da1ec0adc2c9ea061fb6 (patch) | |
tree | 05a9cb129d272213696fefa616de13674ac9fe09 /030container.cc | |
parent | 00472b898df4a7c1d1f4b5b9278d9274fcacd274 (diff) | |
download | mu-07ca569193dabb30d1d7da1ec0adc2c9ea061fb6.tar.gz |
2670 - improvements to generics
Eliminated a few holes, gained more clarity on the shape of others. Maybe I was sleep-deprived, but this was really hard until I wrote a few unit tests directly on replace_type_ingredient. Still one flaw remaining: the type-checker isn't smart enough to handle 'merge' for all the new cases. Tests pass since we don't use those features outside C++ tests yet.
Diffstat (limited to '030container.cc')
-rw-r--r-- | 030container.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/030container.cc b/030container.cc index cd9d3255..a7ae2984 100644 --- a/030container.cc +++ b/030container.cc @@ -808,6 +808,8 @@ void check_merge_call(const vector<reagent>& ingredients, const reagent& product default: { if (!types_coercible(container, ingredients.at(ingredient_index))) { raise_error << maybe(caller.name) << "incorrect type of ingredient " << ingredient_index << " in '" << inst.to_string() << "'\n" << end(); + cerr << " expected " << debug_string(container) << '\n'; + cerr << " got " << debug_string(ingredients.at(ingredient_index)) << '\n'; return; } ++ingredient_index; |