upload code
This commit is contained in:
commit
3f507064ce
111 changed files with 9258 additions and 0 deletions
7
integration/fail/no-such-field/assignment-bool-field.out
Normal file
7
integration/fail/no-such-field/assignment-bool-field.out
Normal file
|
@ -0,0 +1,7 @@
|
|||
Error: No such field
|
||||
╭─[assignment-bool-field.txt:2:5]
|
||||
│
|
||||
2 │ foo.bar = true;
|
||||
· ─┬─
|
||||
· ╰─── bool is a primitive type and does not have any fields
|
||||
───╯
|
2
integration/fail/no-such-field/assignment-bool-field.txt
Normal file
2
integration/fail/no-such-field/assignment-bool-field.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
let foo: bool = true;
|
||||
foo.bar = true;
|
7
integration/fail/no-such-field/assignment-bool-index.out
Normal file
7
integration/fail/no-such-field/assignment-bool-index.out
Normal file
|
@ -0,0 +1,7 @@
|
|||
Error: No such field
|
||||
╭─[assignment-bool-index.txt:2:5]
|
||||
│
|
||||
2 │ foo.0 = true;
|
||||
· ┬
|
||||
· ╰── bool is a primitive type and does not have any fields
|
||||
───╯
|
2
integration/fail/no-such-field/assignment-bool-index.txt
Normal file
2
integration/fail/no-such-field/assignment-bool-index.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
let foo: bool = true;
|
||||
foo.0 = true;
|
7
integration/fail/no-such-field/assignment-int-field.out
Normal file
7
integration/fail/no-such-field/assignment-int-field.out
Normal file
|
@ -0,0 +1,7 @@
|
|||
Error: No such field
|
||||
╭─[assignment-int-field.txt:2:5]
|
||||
│
|
||||
2 │ foo.bar = 1;
|
||||
· ─┬─
|
||||
· ╰─── int is a primitive type and does not have any fields
|
||||
───╯
|
2
integration/fail/no-such-field/assignment-int-field.txt
Normal file
2
integration/fail/no-such-field/assignment-int-field.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
let foo: int = 1;
|
||||
foo.bar = 1;
|
7
integration/fail/no-such-field/assignment-int-index.out
Normal file
7
integration/fail/no-such-field/assignment-int-index.out
Normal file
|
@ -0,0 +1,7 @@
|
|||
Error: No such field
|
||||
╭─[assignment-int-index.txt:2:5]
|
||||
│
|
||||
2 │ foo.0 = 1;
|
||||
· ┬
|
||||
· ╰── int is a primitive type and does not have any fields
|
||||
───╯
|
2
integration/fail/no-such-field/assignment-int-index.txt
Normal file
2
integration/fail/no-such-field/assignment-int-index.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
let foo: int = 1;
|
||||
foo.0 = 1;
|
|
@ -0,0 +1,9 @@
|
|||
Error: No such field
|
||||
╭─[assignment-tuple-field.txt:2:5]
|
||||
│
|
||||
2 │ foo.first = 0;
|
||||
· ──┬──
|
||||
· ╰──── tuples don't have named fields
|
||||
·
|
||||
· Help: To access the first element in a tuple, use `.0`
|
||||
───╯
|
|
@ -0,0 +1,2 @@
|
|||
let foo: (int,) = (1,);
|
||||
foo.first = 0;
|
|
@ -0,0 +1,9 @@
|
|||
Error: No such field
|
||||
╭─[assignment-tuple-out-of-bounds.txt:2:5]
|
||||
│
|
||||
2 │ foo.2 = 0;
|
||||
· ┬
|
||||
· ╰── this tuple does not have enough elements
|
||||
·
|
||||
· Note: The first element in a tuple has index 0
|
||||
───╯
|
|
@ -0,0 +1,2 @@
|
|||
let foo: (int,) = (1,);
|
||||
foo.2 = 0;
|
Reference in a new issue