diff options
Diffstat (limited to 'tests/errors')
| -rw-r--r-- | tests/errors/static_const_typo.zc | 5 | ||||
| -rw-r--r-- | tests/errors/static_typo.zc | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/errors/static_const_typo.zc b/tests/errors/static_const_typo.zc new file mode 100644 index 0000000..c7f2b7b --- /dev/null +++ b/tests/errors/static_const_typo.zc @@ -0,0 +1,5 @@ +namespace; + +// expect: MAXX: is not a static function of this struct; did you mean 'MAX'? +struct Text { const MAX = 24; int len; }; +fn main() { return Text.MAXX; } diff --git a/tests/errors/static_typo.zc b/tests/errors/static_typo.zc new file mode 100644 index 0000000..97f6513 --- /dev/null +++ b/tests/errors/static_typo.zc @@ -0,0 +1,5 @@ +namespace; + +// expect: itao: is not a static function of this struct; did you mean 'itoa'? +struct Text { int len; static int itoa(int n) { return n; } }; +fn main() { return Text.itao(1); } |
