]> ocean-lang.org Git - ocean/blobdiff - csrc/oceani-tests.mdc
oceani: don't let error in one statement hides errors in next.
[ocean] / csrc / oceani-tests.mdc
index 0feb0d20ba0b86f17869b47931e998705a23a0d3..182c77c8367b2e553c6619f410e2eee512a671cb 100644 (file)
@@ -917,7 +917,7 @@ various places that `type_err()` are called.
 
        func main()
                print "hello" ++ 5, 5 ++ "hello"
-
+               hello := "there"; print 4+hello
                b ::= 3
                b = b + 1
 
@@ -928,6 +928,8 @@ various places that `type_err()` are called.
 ###### output: type_err1
        .tmp.code:3:25: error: expected string found number
        .tmp.code:3:28: error: expected string found number
+       .tmp.code:4:34: error: expected number but variable 'hello' is string
+       .tmp.code:4:8: info: this is where 'hello' was set to string
        .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