upload code

This commit is contained in:
Dominic 2022-10-16 20:14:55 +02:00
commit 3f507064ce
Signed by: msrd0
GPG key ID: DCC8C247452E98F9
111 changed files with 9258 additions and 0 deletions

View 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
───╯

View file

@ -0,0 +1,2 @@
let foo: bool = true;
foo.bar = true;

View 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
───╯

View file

@ -0,0 +1,2 @@
let foo: bool = true;
foo.0 = true;

View 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
───╯

View file

@ -0,0 +1,2 @@
let foo: int = 1;
foo.bar = 1;

View 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
───╯

View file

@ -0,0 +1,2 @@
let foo: int = 1;
foo.0 = 1;

View file

@ -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`
───╯

View file

@ -0,0 +1,2 @@
let foo: (int,) = (1,);
foo.first = 0;

View file

@ -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
───╯

View file

@ -0,0 +1,2 @@
let foo: (int,) = (1,);
foo.2 = 0;