Finch/tests/fail
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nexoniarz 1dc976bd8f Structs, arrays, owned strings, memory model, modules, debug info
- struct with default values; constructors Point(1, 2) / Point(x: 1); field access, auto-deref through pointers
- []T arrays with bounds checks, literals, for-each, push/pop/insert/remove/clear/resize/find/contains/join/slice/reverse/sort
- str carries its length: .len, s[i], +, comparison, sub/find/split/trim/upper/lower/replace/repeat/bytes, str(x), int(s), float(s)
- Memory: values own their memory and are freed at the end of their block; assignment copies, temporaries move;
  parameters are lent and only copied when the function changes them; defer; new()/free() for manual heap memory
- input(), read_file/write_file/file_exists, exit(), fn main([]str args)
- Finch modules: import name, module.fn(), module.Struct
- C structs from headers (fields, fixed arrays, nested); passed and returned by value with the System V x86-64 ABI;
  addr(fn) gives C a callback
- link "file.c" compiles and links your own C code
- -g emits DWARF debug info (gdb/lldb)
- Small C runtime (runtime/finch_rt.c) embedded in the compiler, cached in ~/.cache/finch
- Tests: 58, all clean under valgrind (MEMCHECK=1 tests/run.sh)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 18:57:37 +02:00
..
array_compare.fn Structs, arrays, owned strings, memory model, modules, debug info 2026-10-08 18:57:37 +02:00
bad_int.fn Structs, arrays, owned strings, memory model, modules, debug info 2026-10-08 18:57:37 +02:00
bad_link_name.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00
bool_bitand.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00
condition_not_bool.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00
defer_return.fn Structs, arrays, owned strings, memory model, modules, debug info 2026-10-08 18:57:37 +02:00
div_zero_const.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00
div_zero_runtime.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00
each_readonly.fn Structs, arrays, owned strings, memory model, modules, debug info 2026-10-08 18:57:37 +02:00
empty_array.fn Structs, arrays, owned strings, memory model, modules, debug info 2026-10-08 18:57:37 +02:00
float_to_int.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00
forgot_import.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00
free_value.fn Structs, arrays, owned strings, memory model, modules, debug info 2026-10-08 18:57:37 +02:00
index_range.fn Structs, arrays, owned strings, memory model, modules, debug info 2026-10-08 18:57:37 +02:00
lib_hint.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00
lib_hint.h Finch 1.0.0 2026-10-08 18:21:06 +02:00
literal_too_big.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00
loop_var_readonly.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00
missing_header.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00
missing_lib.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00
missing_return.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00
mixed_signs.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00
module_missing.fn Structs, arrays, owned strings, memory model, modules, debug info 2026-10-08 18:57:37 +02:00
module_not_imported.fn Structs, arrays, owned strings, memory model, modules, debug info 2026-10-08 18:57:37 +02:00
no_main.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00
non_ascii_name.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00
null_value.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00
old_function_syntax.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00
pop_empty.fn Structs, arrays, owned strings, memory model, modules, debug info 2026-10-08 18:57:37 +02:00
push_type.fn Structs, arrays, owned strings, memory model, modules, debug info 2026-10-08 18:57:37 +02:00
redeclare.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00
str_null.fn Structs, arrays, owned strings, memory model, modules, debug info 2026-10-08 18:57:37 +02:00
str_plus_int.fn Structs, arrays, owned strings, memory model, modules, debug info 2026-10-08 18:57:37 +02:00
struct_count.fn Structs, arrays, owned strings, memory model, modules, debug info 2026-10-08 18:57:37 +02:00
struct_no_field.fn Structs, arrays, owned strings, memory model, modules, debug info 2026-10-08 18:57:37 +02:00
struct_self.fn Structs, arrays, owned strings, memory model, modules, debug info 2026-10-08 18:57:37 +02:00
two_statements.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00
type_mismatch.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00
unclosed_brace.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00
undefined_var.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00
unreachable.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00
untyped_null.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00
untyped_ptr.fn Finch 1.0.0 2026-10-08 18:21:06 +02:00