Examples
broken.mul
Intentionally invalid: the literal does not fit in i32, and the i64 type does not exist yet.
Source
examples/broken.mul is stored in the compact layout, as AI agents write it: a space only between two words, no other whitespace. The page lays it out for reading; the Compact button shows the stored text, and Copy always copies it.
// Intentionally invalid: the literal does not fit in i32, and the i64 type does not exist yet.
module demo pub fn main()->i64{return 3000000000*2}
Check
The program is rejected at compile time; each error has a stable MUL-* code.
$ mul check examples/broken.mul; echo "exit code $?"
examples/broken.mul:2:28: error[MUL-T002]: unknown type `i64` (expected `i32`, `bool` or `string`) [byte 123]
| module demo pub fn main()->i64{return 3000000000*2}
| ^^^
examples/broken.mul:2:39: error[MUL-T003]: literal 3000000000 does not fit in `i32` [byte 134]
| module demo pub fn main()->i64{return 3000000000*2}
| ^^^^^^^^^^
exit code 1