+Test for errors with references
+
+###### test list
+ oceani_failing_tests += ref_err1 ref_err2
+
+###### test: ref_err1
+ func main()
+ ref:@number
+ @foo = ref
+ ref = @old()
+ if ref == @null:
+ print "null"
+
+###### output: ref_err1
+ .tmp.code:4:9: error: only "@free" makes sense here: foo
+ .tmp.code:5:15: error: Only reference function is "@new()": old
+ .tmp.code:6:19: error: Only reference value is "@nil": null
+
+###### test: ref_err2
+ func main()
+ ref:@number
+ ref2:@string
+ num:number = @new()
+ print num@
+ if num == @nil or ref == ref2 or ref == 2 or ref.foo:
+ @free = num
+ ref = 1
+
+###### output: ref_err2
+ .tmp.code:5:22: error: @new() can only be used with references, not number
+ .tmp.code:5:8: info: variable 'num' was set as number here.
+ .tmp.code:6:14: error: Cannot dereference number
+ .tmp.code:7:19: error: @nil can only be used with reference, not number
+ .tmp.code:7:33: error: expected @number but variable 'ref2' is @string
+ .tmp.code:4:8: info: this is where 'ref2' was set to @string
+ .tmp.code:7:48: error: expected @number found number
+ .tmp.code:7:53: error: field reference on number is not supported
+ .tmp.code:7:56: error: have none but need Boolean
+ .tmp.code:8:17: error: @free can only be assigned a reference, not number
+ .tmp.code:8:17: error: @free can only be assigned a reference, not number
+ .tmp.code:9:8: error: Cannot assign an rval to a reference.
+ oceani: type error in program - not running.
+