diff options
Diffstat (limited to '021check_instruction.cc')
-rw-r--r-- | 021check_instruction.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/021check_instruction.cc b/021check_instruction.cc index 57757446..3d418dce 100644 --- a/021check_instruction.cc +++ b/021check_instruction.cc @@ -78,9 +78,9 @@ recipe main [ bool types_match(reagent lhs, reagent rhs) { // '_' never raises type error if (is_dummy(lhs)) return true; - // to sidestep type-checking, use /raw in the source. - // this is unsafe, and will be highlighted in red inside vim. just for some tests. - if (is_raw(rhs)) return true; + // to sidestep type-checking, use /unsafe in the source. + // this will be highlighted in red inside vim. just for setting up some tests. + if (is_unsafe(rhs)) return true; if (is_literal(rhs)) return valid_type_for_literal(lhs, rhs) && size_of(rhs) == size_of(lhs); if (!lhs.type) return !rhs.type; return types_match(lhs.type, rhs.type); @@ -125,6 +125,10 @@ bool is_raw(const reagent& r) { return has_property(r, "raw"); } +bool is_unsafe(const reagent& r) { + return has_property(r, "unsafe"); +} + bool is_mu_array(reagent r) { if (!r.type) return false; if (is_literal(r)) return false; |