diff options
author | Kartik Agaram <vc@akkartik.com> | 2018-06-17 11:20:53 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2018-06-17 15:57:37 -0700 |
commit | 01ce563dfe3e6cf58337708b9dbb60a8a99fa0f2 (patch) | |
tree | 696fce7bb207e77952d10b7358f4ce00faed3874 /021check_instruction.cc | |
parent | dd66068298b0a11f2a1f195376cba98e0c8570b5 (diff) | |
download | mu-01ce563dfe3e6cf58337708b9dbb60a8a99fa0f2.tar.gz |
4262 - literal 'null'
Diffstat (limited to '021check_instruction.cc')
-rw-r--r-- | 021check_instruction.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/021check_instruction.cc b/021check_instruction.cc index 48f90078..ee44161a 100644 --- a/021check_instruction.cc +++ b/021check_instruction.cc @@ -102,15 +102,19 @@ bool types_match(const reagent& to, const reagent& from) { if (is_literal(from)) { if (is_mu_array(to)) return false; // End Matching Types For Literal(to) - // allow writing 0 to any address - if (is_mu_address(to)) return from.name == "0"; if (!to.type) return false; + if (is_mu_address(to)) return types_match_literal_to_address(from); // End Literal types_match Special-cases return size_of(to) == 1; // literals are always scalars } return types_strictly_match(to, from); } +bool types_match_literal_to_address(const reagent& from) { + // End Literal->Address types_match(from) Special-cases + return false; +} + //: copy arguments for later layers bool types_strictly_match(reagent/*copy*/ to, reagent/*copy*/ from) { // End Preprocess types_strictly_match(reagent to, reagent from) |