about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--031address.cc14
-rw-r--r--042name.cc2
-rw-r--r--048typecheck.cc2
3 files changed, 16 insertions, 2 deletions
diff --git a/031address.cc b/031address.cc
index d139c4cf..e79ff314 100644
--- a/031address.cc
+++ b/031address.cc
@@ -24,6 +24,20 @@ recipe main [
 
 :(before "long long int base = x.value" following "void write_memory(reagent x, vector<double> data)")
 x = canonize(x);
+if (x.value == 0) {
+  raise << "can't write to location 0\n" << end();
+  return;
+}
+
+//: writes to address 0 always loudly fail
+:(scenario store_to_0_warns)
+% Hide_warnings = true;
+recipe main [
+  1:address:number <- copy 0
+  1:address:number/lookup <- copy 34
+]
+-mem: storing 34 in location 0
++warn: can't write to location 0
 
 :(code)
 reagent canonize(reagent x) {
diff --git a/042name.cc b/042name.cc
index ae27f5bf..7620a7e8 100644
--- a/042name.cc
+++ b/042name.cc
@@ -141,10 +141,12 @@ recipe main [
 
 //: an escape hatch to suppress name conversion that we'll use later
 :(scenario transform_names_passes_raw)
+% Hide_warnings = true;
 recipe main [
   x:number/raw <- copy 0
 ]
 -name: assign x 1
++warn: can't write to location 0
 
 :(scenario transform_names_warns_when_mixing_names_and_numeric_locations)
 % Hide_warnings = true;
diff --git a/048typecheck.cc b/048typecheck.cc
index 090e3033..5c22a436 100644
--- a/048typecheck.cc
+++ b/048typecheck.cc
@@ -80,5 +80,3 @@ recipe main [
   x:number <- copy 2
 ]
 +warn: missing type in 'x <- copy 1'
-+warn: x <- copy 1: reagent not initialized: x
-+warn: main: size mismatch in storing to x at 'x <- copy 1'
lass='oid'>cc4c7f3e ^
30dbbad5 ^

279737ba ^
c72d7ad6 ^
cc4c7f3e ^
c72d7ad6 ^
cc4c7f3e ^

279737ba ^
c72d7ad6 ^
cc4c7f3e ^
c72d7ad6 ^
cc4c7f3e ^

279737ba ^
c72d7ad6 ^
cc4c7f3e ^
1730372e ^
30dbbad5 ^
6bad38c2 ^
c72d7ad6 ^
cc4c7f3e ^

279737ba ^
c72d7ad6 ^
8f486859 ^
1730372e ^
30dbbad5 ^
1730372e ^
c72d7ad6 ^
8f486859 ^
cc4c7f3e ^
279737ba ^

30dbbad5 ^






1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69