From f344b250f6f062a1a1902bf69b23ebf9b565de0e Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 17 Sep 2016 15:01:51 -0700 Subject: 3395 --- html/021check_instruction.cc.html | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'html/021check_instruction.cc.html') diff --git a/html/021check_instruction.cc.html b/html/021check_instruction.cc.html index 801c60f6..111355b4 100644 --- a/html/021check_instruction.cc.html +++ b/html/021check_instruction.cc.html @@ -80,51 +80,51 @@ Transform.push_back(:(scenario copy_checks_reagent_count) % Hide_errors = true; def main [ - 1:number <- copy 34, 35 + 1:num <- copy 34, 35 ] -+error: main: ingredients and products should match in '1:number <- copy 34, 35' ++error: main: ingredients and products should match in '1:num <- copy 34, 35' :(scenario write_scalar_to_array_disallowed) % Hide_errors = true; def main [ - 1:array:number <- copy 34 + 1:array:num <- copy 34 ] -+error: main: can't copy '34' to '1:array:number'; types don't match ++error: main: can't copy '34' to '1:array:num'; types don't match :(scenario write_scalar_to_array_disallowed_2) % Hide_errors = true; def main [ - 1:number, 2:array:number <- copy 34, 35 + 1:num, 2:array:num <- copy 34, 35 ] -+error: main: can't copy '35' to '2:array:number'; types don't match ++error: main: can't copy '35' to '2:array:num'; types don't match :(scenario write_scalar_to_address_disallowed) % Hide_errors = true; def main [ - 1:address:number <- copy 34 + 1:address:num <- copy 34 ] -+error: main: can't copy '34' to '1:address:number'; types don't match ++error: main: can't copy '34' to '1:address:num'; types don't match :(scenario write_address_to_number_allowed) def main [ - 1:address:number <- copy 12/unsafe - 2:number <- copy 1:address:number + 1:address:num <- copy 12/unsafe + 2:num <- copy 1:address:num ] +mem: storing 12 in location 2 $error: 0 :(scenario write_boolean_to_number_allowed) def main [ - 1:boolean <- copy 1/true - 2:number <- copy 1:boolean + 1:bool <- copy 1/true + 2:num <- copy 1:bool ] +mem: storing 1 in location 2 $error: 0 :(scenario write_number_to_boolean_allowed) def main [ - 1:number <- copy 34 - 2:boolean <- copy 1:number + 1:num <- copy 34 + 2:bool <- copy 1:num ] +mem: storing 34 in location 2 $error: 0 @@ -196,6 +196,8 @@ $error: 0 CHECK(types_strictly_match(a, b)); } +//: helpers + bool is_unsafe(const reagent& r) { return has_property(r, "unsafe"); } @@ -204,7 +206,6 @@ $error: 0 // End Preprocess is_mu_array(reagent r) return is_mu_array(r.type); } - bool is_mu_array(const type_tree* type) { if (!type) return false; if (is_literal(type)) return false; @@ -217,7 +218,6 @@ $error: 0 // End Preprocess is_mu_address(reagent r) return is_mu_address(r.type); } - bool is_mu_address(const type_tree* type) { if (!type) return false; if (is_literal(type)) return false; @@ -260,7 +260,6 @@ $error: 0 bool is_mu_scalar(reagent/*copy*/ r) { return is_mu_scalar(r.type); } - bool is_mu_scalar(const type_tree* type) { if (!type) return false; if (is_mu_address(type)) return true; -- cgit 1.4.1-2-gfad0