aboutsummaryrefslogtreecommitdiffstats
path: root/tests/variables.bad
diff options
context:
space:
mode:
Diffstat (limited to 'tests/variables.bad')
-rw-r--r--tests/variables.bad20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/variables.bad b/tests/variables.bad
index ce765bc..8043c14 100644
--- a/tests/variables.bad
+++ b/tests/variables.bad
@@ -53,15 +53,15 @@ let particle = entity : {
53} 53}
54set particle = entity : {} 54set particle = entity : {}
55 55
56; ; We can have static arrays and have indexed access. 56; We can have static arrays and have indexed access.
57; let numbers: u32[0xff] 57let numbers: u32[0xff]
58; set numbers[0] = 32 58set numbers[0] = 32
59; set numbers[1] = 42 59set numbers[1] = numbers[0]
60 60
61; ; Arrays are syntactic sugar for pointers (@). 61; Arrays are syntactic sugar for pointers (@).
62; let ptr:@u32 = numbers 62let ptr:@u32 = numbers
63; set ptr[10] = 33 63set ptr[10] = 33
64 64
65; ; Strings hold a .mem and .size fields with the number of bytes it holds. 65; Strings hold a .mem and .size fields with the number of bytes it holds.
66; let hello: str = "hello world" 66let hello: str = "hello world"
67; set c[1] = 'a' ; "hallo world" 67set c[1] = 'a' ; "hallo world"