ludic/examples/rejected/builtin_name.ludic
Orkuncakilkaya 3d2a103dfb fix(lang): a function named like a compiler built-in is refused; reseed
A program's own `run` was never called: every call to it lowered to the
built-in System.run (C's system()), and clang failed on the IR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 22:09:29 +03:00

7 lines
399 B
Text

# builtin_name.ludic - a function named like a compiler built-in. `run` is the low-level System.run
# (C's system()): every call to a program's own `run` compiled into that instead, and the program
# failed in clang with a type error in the IR. (Rejected on purpose: tools/ludic-cli/test.ludic.)
program BuiltinName {
function run(hz: int) -> string { return `{hz}` }
entry { print(run(60)) }
}