]> ocean-lang.org Git - ocean/blobdiff - csrc/oceani-tests.mdc
oceani: mark structure return from functions as not supported.
[ocean] / csrc / oceani-tests.mdc
index 4dceab407eee8c163f4a3e69fedca3b8ccf3afe6..7a408179378b67a59b15062e2ed0946eb417575f 100644 (file)
@@ -999,7 +999,17 @@ Test for type errors with functions
        func test5(a:number):string
                print a
 
+       struct foo
+               a: number
+               b:string = "hello"
+
+       func test6(a:number):foo
+               b:foo
+               b.a = a
+               use b
+
 ###### output: func_err_args
+       .tmp.code:34:5: error: function cannot return value of type foo
        .tmp.code:28:14: error: expected string, found none
        .tmp.code:25:8: error: expected string, found number
        .tmp.code:15:14: error: insufficient arguments to function.