X-Git-Url: https://ocean-lang.org/code/?a=blobdiff_plain;f=csrc%2Foceani-tests.mdc;h=7be2d2502b1e99deed67e58830498a7b984404b5;hb=73aaa11833e35b28c84696f4d69739adbb14467d;hp=881fee7229e7642869bca66b3cc79c9d808ad63d;hpb=5a438bb96ff5bd82e67312b79f593ecfcbf32529;p=ocean diff --git a/csrc/oceani-tests.mdc b/csrc/oceani-tests.mdc index 881fee7..7be2d25 100644 --- a/csrc/oceani-tests.mdc +++ b/csrc/oceani-tests.mdc @@ -824,12 +824,20 @@ various places that `type_err()` are called. foo := 4 print foo, bar + // trigger duplicate-main error + func main() + foo := 6 + print bar, foo + ###### output: type_err_const .tmp.code:4:16: error: expected number found string .tmp.code:6:8: error: name already declared: bar .tmp.code:4:8: info: this is where 'bar' was first declared .tmp.code:8:8: error: variable 'foo' redeclared .tmp.code:3:8: info: this is where 'foo' was first declared + .tmp.code:13:8: error: variable 'foo' redeclared + .tmp.code:3:8: info: this is where 'foo' was first declared + .tmp.code:13:8: "main" defined a second time ###### test: type_err_const1 const