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>
This commit is contained in:
parent
ae61e99e06
commit
3d2a103dfb
6 changed files with 10686 additions and 10500 deletions
7
examples/rejected/builtin_name.ludic
Normal file
7
examples/rejected/builtin_name.ludic
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# 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)) }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue