diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-11-27 10:32:34 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-11-27 10:32:34 -0800 |
commit | bb7142dbc422dbb61de8320e6695289835fd29d5 (patch) | |
tree | 648065c1e366d9a44cd59cbf9f38dabc3470cf08 /032array.cc | |
parent | c193f23217142a1ae365485f28cba9e1fb8aed15 (diff) | |
download | mu-bb7142dbc422dbb61de8320e6695289835fd29d5.tar.gz |
2475 - allow addresses to be converted to numbers
It's just the other direction we want to avoid.
Diffstat (limited to '032array.cc')
-rw-r--r-- | 032array.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/032array.cc b/032array.cc index 81bfbe18..d1fec2f5 100644 --- a/032array.cc +++ b/032array.cc @@ -160,7 +160,7 @@ case INDEX: { canonize_type(product); reagent element; element.type = new type_tree(*array_element(base.type)); - if (!types_match(product, element)) { + if (!types_coercible(product, element)) { raise_error << maybe(get(Recipe, r).name) << "'index' on " << base.original_string << " can't be saved in " << product.original_string << "; type should be " << debug_string(element.type) << '\n' << end(); break; } @@ -300,7 +300,7 @@ case INDEX_ADDRESS: { reagent element; element.type = new type_tree(*array_element(base.type)); element.type = new type_tree(get(Type_ordinal, "address"), element.type); - if (!types_match(product, element)) { + if (!types_coercible(product, element)) { raise_error << maybe(get(Recipe, r).name) << "'index' on " << base.original_string << " can't be saved in " << product.original_string << "; type should be " << debug_string(element.type) << '\n' << end(); break; } |