]> ocean-lang.org Git - ocean/blobdiff - csrc/oceani-tests.mdc
oceani: add tracking of rval vs lval
[ocean] / csrc / oceani-tests.mdc
index fc26950189e93bdc61e11e590a4d29429f294c2b..50a26dff61400a621ca9f4acdfd7f861feb196d9 100644 (file)
@@ -875,17 +875,17 @@ various places that `type_err()` are called.
 
                if 3 * 4 and not True: print "Weird"
                d:number = .fred
+               (d + b) = 12
 
 ###### output: type_err1
        .tmp.code:3:25: error: expected string found number
        .tmp.code:3:28: error: expected string found number
        .tmp.code:6:8: error: Cannot assign to a constant: b
        .tmp.code:5:8: info: name was defined as a constant here
-       .tmp.code:6:8: error: Cannot assign to a constant: b
-       .tmp.code:5:8: info: name was defined as a constant here
        .tmp.code:8:11: error: Arithmetic returns number but Boolean expected
        .tmp.code:9:20: error: expected number found label
        .tmp.code:9:8: info: variable 'd' was set as number here.
+       .tmp.code:10:8: error: cannot assign to an rval
        oceani: type error in program - not running.
 
 ###### test: type_err2