+ .tmp.code:3:12: Syntax error in constant: :
+ .tmp.code:4:12: Syntax error in constant: :
+
+###### test: missing_program
+ const
+ foo::="bar"
+
+###### output: missing_program
+ oceani: no main function found.
+
+###### test: bad_main
+ func main(foo:string)
+ print foo
+
+###### output: bad_main
+ .tmp.code:??:??: error: expected []string but variable 'foo' is string
+ .tmp.code:??:??: info: this is where 'NOTVAR' was set to string
+ oceani: main has wrong type.
+
+Test for type errors with functions
+
+###### test list
+ oceani_failing_tests += func_err_args func_err_redeclare
+
+###### test: func_err_args
+
+ func test1(a:number; b:string; c:[3]Boolean)
+ print a, b, c[1]
+
+ func test2(a:number; b:string; c:[3]Boolean)
+ print a, b, c[1]
+
+ func test3()
+ # use undefined names
+ print a, z
+
+ func main()
+ truth:[3]Boolean
+ truth[1] = True
+ test1(1,"hello")
+ test1("hello",1)
+ test1(1, "two", truth)
+ test1(1, 2, truth)
+ test1(1, "lo", truth, 4)
+ print test(), test1(1,2,3)
+ if test1 == test2:
+ pass
+
+ func test4(a:number):string
+ use a * a
+
+ 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.
+ .tmp.code:16:14: error: expected number found string
+ .tmp.code:16:22: error: expected string found number
+ .tmp.code:16:14: error: insufficient arguments to function.
+ .tmp.code:18:17: error: expected string found number
+ .tmp.code:19:14: error: too many arguments to function.
+ .tmp.code:20:14: error: attempt to call a non-function.
+ .tmp.code:20:32: error: expected string found number
+ .tmp.code:20:28: error: insufficient arguments to function.
+ .tmp.code:21:20: error: expected *invalid*type* but variable 'test2' is *invalid*type*
+ .tmp.code:??:??: info: this is where 'NOTVAR' was set to *invalid*type*
+ .tmp.code:10:14: error: variable used but not declared: a
+ .tmp.code:10:17: error: variable used but not declared: z
+ oceani: type error in program - not running.