Init new repository

This commit is contained in:
Krzosa Karol
2024-04-13 15:29:53 +02:00
commit 5a2e3dcec4
335 changed files with 61571 additions and 0 deletions

19
tests/string_errors.txt Normal file
View File

@@ -0,0 +1,19 @@
// #failed: resolve
main :: proc(): int {
indexing_const := "something"[0];
string: String = "something other";
indexing_string := string[0];
indexing_string2 := string + indexing_const;
str: *char = :String("Something");
other_str: String = :*char("Something");
return 0;
}
// #error: trying to index non indexable type 'String'
// #error: cannot perform binary operation, types don't qualify for it, left: 'String' right: 'char'
// #error: cannot assign, types are incompatible, variable type: '*char' expression type: 'String'
// #error: cannot assign, types are incompatible, variable type: 'String' expression type: '*char'