Error reference
Every distinct compiler message that the test suite checks, with a program that triggers it.
196 distinct compiler messages, each with one program from the test suite that triggers it. Messages are written path:line:col: error: message on standard error and the compiler exits with 1. In a heading, <x> stands for a name or type that varies and <n> for a number; the listing under it is a real program and its real output.
This covers the checker and the backend (types, access modes, constants, records, enums, match, control flow, modules). Messages for malformed tokens and syntax are tested separately.
Every program here is refused whole: nothing is run. A message that says "stage-0 backend" is a limit of the current compiler, not a rule of the language.
#a bound must be a <x>, found <x>
Seen in 2 test programs.
nul main() { [4]u8 a; u32 i = 0; []u8 s = a[i..2]; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:45: error: a bound must be a `usz`, found `u32`
#a character literal is one byte, found
Seen in 1 test program.
nul main() { u8 c = 'ab'; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:21: error: a character literal is one byte, found 2
#a conversion takes no access modes
Seen in 1 test program.
N :: u8(wr 1);
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:12: error: a conversion takes no access modes
#a conversion to <x> takes one value
Seen in 7 test programs.
N :: u8();
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:8: error: a conversion to `u8` takes one value
#a length must be a <x>, found <x>
Seen in 1 test program.
nul main() { *u8 p = nil; u32 n = 1; []u8 s = slice(p, n); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:56: error: a length must be a `usz`, found `u32`
#a match on an integer needs an else arm
Seen in 2 test programs.
nul main() { u8 x = 1; match x { } }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:24: error: a `match` on an integer needs an `else` arm
#a pointer cannot be indexed; make a slice of it with <x>
Seen in 3 test programs.
nul main() { *u8 p = nil; p[0] = 1; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:28: error: a pointer cannot be indexed; make a slice of it with `slice(p, n)`
#a pointer cannot be sliced; make a slice of it with <x>
Seen in 1 test program.
nul main() { *u8 p = nil; []u8 s = p[0..1]; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:37: error: a pointer cannot be sliced; make a slice of it with `slice(p, n)`
#a pointer cannot be the right operand of <x>; write <x>
Seen in 3 test programs.
nul f(*u8 p) { *u8 q = 1 + p; }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:26: error: a pointer cannot be the right operand of `+`; write `p + n`
#a range cannot be a pattern for an enum; name the variants
Seen in 1 test program.
enum C { red, green }
enum D { x }
nul main() { C c; match c { .red..=.green { } else { } } }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:3:29: error: a range cannot be a pattern for an enum; name the variants
#a range of elements is not a place; it cannot be assigned or have its address taken
Seen in 2 test programs.
nul main() { [4]u8 a; a[1..3] = 1; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:24: error: a range of elements is not a place; it cannot be assigned or have its address taken
#a record cannot cross the C ABI; pass a pointer
Seen in 1 test program.
rec A { u32 x; }
@lib("x") ext nul f(A a);
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:11: error: a record cannot cross the C ABI; pass a pointer
#a slice cannot cross the C ABI; pass a pointer and a length
Seen in 1 test program.
@lib("k") ext nul f([]u8 s);
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:11: error: a slice cannot cross the C ABI; pass a pointer and a length
#a slice of <x> has no elements; use <x> for an untyped pointer
Seen in 1 test program.
rec A { []nul x; }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:15: error: a slice of `nul` has no elements; use `*nul` for an untyped pointer
#a variable cannot have type <x>
Seen in 1 test program.
nul main() { nul a; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:14: error: a variable cannot have type `nul`
#a <x> cannot be dereferenced; <x> it to a typed pointer first
Seen in 3 test programs.
nul main() { *nul p = nil; *p = 1; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:28: error: a `*nul` cannot be dereferenced; `cast` it to a typed pointer first
#an argument passed as out must be a variable, an element, a field or a dereference that can be written
Seen in 4 test programs.
nul f(out u32 x) { x = 1; }
nul main() { f(out 1); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:20: error: an argument passed as `out` must be a variable, an element, a field or a dereference that can be written
#an argument passed as wr must be a variable, an element, a field or a dereference that can be written
Seen in 16 test programs.
nul f(wr u32 x) { }
nul main() { f(wr 1); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:19: error: an argument passed as `wr` must be a variable, an element, a field or a dereference that can be written
#an array cannot cross the C ABI; pass a pointer
Seen in 1 test program.
@lib("k") ext nul f([4]u8 x);
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:11: error: an array cannot cross the C ABI; pass a pointer
#an array length must be an integer
Seen in 1 test program.
N :: true;
nul main() { [N]u8 a; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:15: error: an array length must be an integer
#an array needs at least one element
Seen in 3 test programs.
nul main() { [0]u8 a; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:14: error: an array needs at least one element
#an array of <x> has no elements
Seen in 1 test program.
nul main() { [4]nul a; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:14: error: an array of `nul` has no elements
#an ext function takes no access modes; pass a pointer
Seen in 3 test programs.
@lib("k") ext nul f(wr u32 x);
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:11: error: an `ext` function takes no access modes; pass a pointer
#an index must be a <x>, found <x>
Seen in 3 test programs.
nul main() { [4]u8 a; a[true] = 1; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:25: error: an index must be a `usz`, found `bool`
#brk outside a loop
Seen in 2 test programs.
nul main() { brk; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:14: error: `brk` outside a loop
#cannot convert <x> to <x>
Seen in 3 test programs.
i32 main() { ret i32("x"); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:22: error: cannot convert `[]u8` to `i32`
#cannot embed <x>: not a regular file
Seen in 1 test program. This program has several modules; all are shown, root module last.
Module main.ln:
nul main() { []u8 s = embed(".."); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:29: error: cannot embed `..`: not a regular file
#cannot embed <x>: only ASCII paths are supported
Seen in 1 test program. This program has several modules; all are shown, root module last.
Module main.ln:
nul main() { []u8 s = embed("\xff.txt"); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:29: error: cannot embed `\xff.txt`: only ASCII paths are supported
#cannot embed <x>: the file cannot be read
Seen in 2 test programs. This program has several modules; all are shown, root module last.
Module main.ln:
nul main() { []u8 s = embed("nope.txt"); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:29: error: cannot embed `nope.txt`: the file cannot be read
#constant <x> = - does not fit in <x>
<x>Seen in 3 test programs.
N :: -1;
nul main() { u32 x = N; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:22: error: constant `N` = -1 does not fit in `u32`
#constant <x> = does not fit in <x>
<x>Seen in 5 test programs.
N :: 300;
nul main() { u8 x = N; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:21: error: constant `N` = 300 does not fit in `u8`
#constant <x> cannot be assigned
Seen in 2 test programs.
N :: 3;
nul main() { N = 4; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:14: error: constant `N` cannot be assigned
#constant <x> is defined in terms of itself
Seen in 4 test programs.
A :: A;
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:1: error: constant `A` is defined in terms of itself
#constant <x> is defined in terms of itself through <x>
Seen in 12 test programs.
A :: B;
B :: A;
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:1: error: constant `A` is defined in terms of itself through `B`
#constant <x> is defined in terms of itself through <x>, <x>
Seen in 2 test programs.
A :: B;
B :: C;
C :: A;
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:1: error: constant `A` is defined in terms of itself through `B`, `C`
#constant <x> is defined in terms of itself through <x>, <x>, <x>, <x>, <x>
Seen in 1 test program.
C0 :: C1 + 1;
C1 :: C2 + 1;
C2 :: C3 + 1;
C3 :: C4 + 1;
C4 :: C5 + 1;
C5 :: C0 + 1;
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:1: error: constant `C0` is defined in terms of itself through `C1`, `C2`, `C3`, `C4`, `C5`
#constant <x> is defined in terms of itself through <x>, <x>, <x>, <x>, <x> and more
Seen in 5 test programs.
C0 :: C1 + 1;
C1 :: C2 + 1;
C2 :: C3 + 1;
C3 :: C4 + 1;
C4 :: C5 + 1;
C5 :: C6 + 1;
C6 :: C0 + 1;
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:1: error: constant `C0` is defined in terms of itself through `C1`, `C2`, `C3`, `C4`, `C5` and 1 more
#division by zero in a constant expression
Seen in 5 test programs.
N :: 10 / 0;
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:9: error: division by zero in a constant expression
#enum <x> has no variants
Seen in 1 test program.
enum E { }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:1: error: enum `E` has no variants
#expected <x>, found a character
Seen in 2 test programs.
nul main() { bool b = 'a'; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:23: error: expected `bool`, found a character
#expected <x>, found an enum value
Seen in 5 test programs.
enum E { a }
nul main() { u32 x = .a; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:22: error: expected `u32`, found an enum value
#expected <x>, found an integer
Seen in 16 test programs.
nul main() { if 1 { } }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:17: error: expected `bool`, found an integer
#expected <x>, found <x>
Seen in 65 test programs.
nul main() { a := 1 }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:21: error: expected `;`, found `}`
#field <x> cannot have type <x>
Seen in 1 test program.
rec A { nul x; }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:13: error: field `x` cannot have type `nul`
#field <x> is declared twice in <x>
Seen in 1 test program.
rec A { u32 x; u8 x; }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:19: error: field `x` is declared twice in `A`
#imported function <x> needs <x> naming its library
Seen in 1 test program.
ext nul f();
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:1: error: imported function `f` needs `@lib("name")` naming its library
#loop variable <x> is read-only
Seen in 3 test programs.
nul main() { for i in u32(0)..3 { i = 1; } }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:35: error: loop variable `i` is read-only
#loop variable <x> is read-only; it cannot be passed as wr
Seen in 1 test program.
nul g(wr u32 y) { }
nul main() { for i in u32(0)..3 { g(wr i); } }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:40: error: loop variable `i` is read-only; it cannot be passed as `wr`
#loop variable <x> is read-only; its address cannot be taken
Seen in 1 test program.
nul main() { for i in u32(0)..3 { p := &i; } }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:41: error: loop variable `i` is read-only; its address cannot be taken
#match needs an integer or an enum, found <x>
Seen in 4 test programs.
nul main() { match true { else { } } }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:20: error: `match` needs an integer or an enum, found `bool`
#module <x> has no function <x>
Seen in 1 test program. This program has several modules; all are shown, root module last.
Module greet.ln:
use io;
pub nul hi() { io.print("hi\n"); }
nul hidden() { }
Verified: one module of a multi-module program.
Module main.ln:
use greet;
nul main() { greet.nope(); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:19: error: module `greet` has no function `nope`
#module <x> has no type <x>
Seen in 2 test programs.
use io;
nul main() { io.Missing m; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:14: error: module `io` has no type `Missing`
#module <x> has no <x>
Seen in 1 test program. This program has several modules; all are shown, root module last.
Module m1.ln:
pub rec S { u8 a; }
pub enum E { a }
Verified: one module of a multi-module program.
Module m2.ln:
pub rec S { u8 a; }
pub enum E { a }
Verified: one module of a multi-module program.
Module main.ln:
use m1;
nul main() { x := m1.ZZ; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:21: error: module `m1` has no `ZZ`
#module <x> is imported twice
Seen in 1 test program.
use io;
use io;
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:1: error: module `io` is imported twice
#module <x> not found
Seen in 1 test program.
use nope;
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:1: error: module `nope` not found
# is not a variant of <x>
<x>Seen in 2 test programs.
enum C { red, green }
enum D { x }
nul main() { C c; match c { C(7) { } else { } } }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:3:29: error: 7 is not a variant of `C`
#nested too deeply: stage 0 allows levels
Seen in 14 test programs.
i32 main() { i32 a = 5; ret ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~a; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:284: error: nested too deeply: stage 0 allows 256 levels
#nil needs a pointer type here
Seen in 4 test programs.
nul main() { a := nil; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:19: error: `nil` needs a pointer type here
#not supported by the stage-0 backend yet: a range outside <x>, an index and a match pattern
Seen in 2 test programs.
N :: 1 .. 2;
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:8: error: not supported by the stage-0 backend yet: a range outside `for ... in`, an index and a `match` pattern
#not supported by the stage-0 backend yet: asm
Seen in 1 test program.
nul main() { asm { nop } }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:14: error: not supported by the stage-0 backend yet: `asm`
#not supported by the stage-0 backend yet: assigning a whole array
Seen in 3 test programs.
nul main() { [4]u8 a; [4]u8 b; a = b; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:32: error: not supported by the stage-0 backend yet: assigning a whole array
#not supported by the stage-0 backend yet: defer
Seen in 1 test program.
nul main() { defer f(); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:14: error: not supported by the stage-0 backend yet: `defer`
#not supported by the stage-0 backend yet: exported ext functions
Seen in 1 test program.
ext nul f() { }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:1: error: not supported by the stage-0 backend yet: exported `ext` functions
#not supported by the stage-0 backend yet: floating point
Seen in 2 test programs.
N :: 1 + 2.5;
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:10: error: not supported by the stage-0 backend yet: floating point
#not supported by the stage-0 backend yet: generic parameters
Seen in 1 test program.
T id($T v) { ret v; }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:1: error: not supported by the stage-0 backend yet: generic parameters
#not supported by the stage-0 backend yet: initializing an array from another array
Seen in 2 test programs.
nul main() { [4]u8 a; b := a; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:28: error: not supported by the stage-0 backend yet: initializing an array from another array
#not supported by the stage-0 backend yet: multiple return values
Seen in 3 test programs.
nul main() { ret 1, 2; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:18: error: not supported by the stage-0 backend yet: multiple return values
#not supported by the stage-0 backend yet: nested module paths
Seen in 1 test program.
use a.b;
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:1: error: not supported by the stage-0 backend yet: nested module paths
#not supported by the stage-0 backend yet: par
Seen in 1 test program.
nul main() { par { } }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:14: error: not supported by the stage-0 backend yet: `par`
#not supported by the stage-0 backend yet: record literals
Seen in 2 test programs.
rec A { u8 a; }
nul main() { A a = A(); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:20: error: not supported by the stage-0 backend yet: record literals
#not supported by the stage-0 backend yet: returning a record; use an out parameter instead
Seen in 3 test programs.
rec A { u32 x; }
pub A f() { }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:5: error: not supported by the stage-0 backend yet: returning a record; use an `out` parameter instead
#not supported by the stage-0 backend yet: returning an array
Seen in 1 test program.
[4]u8 f() { }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:1: error: not supported by the stage-0 backend yet: returning an array
#not supported by the stage-0 backend yet: several targets in one statement
Seen in 3 test programs.
nul f() { }
nul main() { a, b = f(); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:14: error: not supported by the stage-0 backend yet: several targets in one statement
#not supported by the stage-0 backend yet: spread arguments
Seen in 1 test program.
nul f([]u8 a) { }
nul main() { []u8 s = "ab"; f(..s); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:33: error: not supported by the stage-0 backend yet: spread arguments
#not supported by the stage-0 backend yet: the type <x>
Seen in 4 test programs.
nul main() { a.b.c x; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:14: error: not supported by the stage-0 backend yet: the type `a.b.c`
#not supported by the stage-0 backend yet: the <x> attribute here
Seen in 1 test program.
@inline nul f() { }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:9: error: not supported by the stage-0 backend yet: the `@inline` attribute here
#not supported by the stage-0 backend yet: using <x> as a value; call it instead
Seen in 1 test program.
use io;
nul main() { p := io.print; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:21: error: not supported by the stage-0 backend yet: using `io.print` as a value; call it instead
#not supported by the stage-0 backend yet: variadic parameters
Seen in 1 test program.
nul f(..[]u32 a) { }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:1: error: not supported by the stage-0 backend yet: variadic parameters
#not supported by the stage-0 backend yet: vec loops
Seen in 1 test program.
nul main() { vec i in 0..4 { } }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:14: error: not supported by the stage-0 backend yet: `vec` loops
#not supported by the stage-0 backend yet: when
Seen in 1 test program.
nul main() { when true { } }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:14: error: not supported by the stage-0 backend yet: `when`
#not supported by the stage-0 backend yet: when declarations
Seen in 1 test program.
when isa == .avx2 { }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:1: error: not supported by the stage-0 backend yet: `when` declarations
#not supported by the stage-0 backend yet: <x> over anything but a range
Seen in 1 test program.
nul main() { []u8 s = "ab"; for c in s { } }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:38: error: not supported by the stage-0 backend yet: `for ... in` over anything but a range
#nxt outside a loop
Seen in 2 test programs.
nul main() { nxt; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:14: error: `nxt` outside a loop
#out parameter <x> is not assigned on every path to the end of <x>
Seen in 24 test programs.
nul f(out u32 x) { }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:1: error: `out` parameter `x` is not assigned on every path to the end of `f`
#out parameter <x> is not assigned on every path to this ret
Seen in 6 test programs.
u32 f(out u32 x) { ret 1; }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:20: error: `out` parameter `x` is not assigned on every path to this `ret`
#out parameter <x> is read before it is assigned
Seen in 37 test programs.
nul f(out u32 x) { x = x; }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:24: error: `out` parameter `x` is read before it is assigned
#parameter <x> is declared twice
Seen in 1 test program.
nul f(u32 a, u64 a) { }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:1: error: parameter `a` is declared twice
#parameter <x> is read-only
Seen in 10 test programs.
nul f(u32 a) { a = 1; } nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:16: error: parameter `a` is read-only
#parameter <x> is read-only; it cannot be passed as out
Seen in 3 test programs.
nul g(out u32 y) { y = 1; }
nul f(u32 x) { g(out x); }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:22: error: parameter `x` is read-only; it cannot be passed as `out`
#parameter <x> is read-only; it cannot be passed as wr
Seen in 4 test programs.
nul g(wr u32 y) { }
nul f(u32 x) { g(wr x); }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:21: error: parameter `x` is read-only; it cannot be passed as `wr`
#parameter <x> is read-only; its address cannot be taken
Seen in 4 test programs.
nul f(u32 a) { p := &a; } nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:22: error: parameter `a` is read-only; its address cannot be taken
#parameter <x> is read-only; its elements cannot be assigned
Seen in 9 test programs.
nul f([]u8 s) { s[0] = 1; }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:18: error: parameter `s` is read-only; its elements cannot be assigned
#parameter <x> is read-only; its elements cannot be passed as out
Seen in 1 test program.
nul g(out []u8 d) { d = "x"; }
nul f([2][]u8 a) { g(out a[0]); }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:27: error: parameter `a` is read-only; its elements cannot be passed as `out`
#parameter <x> is read-only; its elements cannot be passed as wr
Seen in 3 test programs.
nul g(wr u32 y) { }
nul f([4]u32 a) { g(wr a[1]); }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:25: error: parameter `a` is read-only; its elements cannot be passed as `wr`
#parameter <x> is read-only; its fields cannot be assigned
Seen in 3 test programs.
rec A { u32 x; [2]u32 arr; }
nul f(A r) { r.x = 1; }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:15: error: parameter `r` is read-only; its fields cannot be assigned
#parameter <x> is read-only; its fields cannot be passed as out
Seen in 2 test programs.
nul g(out []u8 d) { d = "x"; }
rec H { []u8 s; }
nul f(H h) { g(out h.s); }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:3:21: error: parameter `h` is read-only; its fields cannot be passed as `out`
#parameter <x> is read-only; its fields cannot be passed as wr
Seen in 2 test programs.
rec A { u32 x; [2]u32 arr; }
nul g(wr u32 y) { }
nul f(A r) { g(wr r.x); }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:3:20: error: parameter `r` is read-only; its fields cannot be passed as `wr`
#parameter <x> is read-only; the address of its elements cannot be taken
Seen in 3 test programs.
nul f([]u8 s) { p := &s[0]; }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:24: error: parameter `s` is read-only; the address of its elements cannot be taken
#parameter <x> is read-only; the address of its fields cannot be taken
Seen in 1 test program.
rec A { u32 x; [2]u32 arr; }
nul f(A r) { p := &r.x; }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:21: error: parameter `r` is read-only; the address of its fields cannot be taken
#parameter <x> of <x> takes no access mode, but the argument has wr
Seen in 3 test programs.
nul f(u32 x) { }
nul main() { u32 a = 1; f(wr a); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:30: error: parameter `x` of `f` takes no access mode, but the argument has `wr`
#parameter <x> of <x> takes out, but the argument has no access mode
Seen in 1 test program.
nul g(out []u8 d) { d = "x"; }
nul main() { []u8 t; g(t); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:24: error: parameter `d` of `g` takes `out`, but the argument has no access mode
#parameter <x> of <x> takes out, but the argument has wr
Seen in 2 test programs.
nul f(out u32 x) { x = 1; }
nul main() { u32 a = 1; f(wr a); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:30: error: parameter `x` of `f` takes `out`, but the argument has `wr`
#parameter <x> of <x> takes wr, but the argument has no access mode
Seen in 5 test programs.
nul f(wr []u8 a) { }
nul main() { [4]u8 b; f(b); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:25: error: parameter `a` of `f` takes `wr`, but the argument has no access mode
#parameter <x> of <x> takes wr, but the argument has out
Seen in 1 test program.
nul f(wr u32 x) { }
nul main() { u32 a = 1; f(out a); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:31: error: parameter `x` of `f` takes `wr`, but the argument has `out`
#record <x> contains itself through <x>, <x>; a field on the way must be a pointer or a slice
Seen in 1 test program.
rec A { [3][2]B b; }
rec B { C c; }
rec C { A a; }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:3:11: error: record `A` contains itself through `B`, `C`; a field on the way must be a pointer or a slice
#record <x> contains itself through <x>; a field on the way must be a pointer or a slice
Seen in 5 test programs.
rec A { B b; }
rec B { A a; }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:11: error: record `A` contains itself through `B`; a field on the way must be a pointer or a slice
#record <x> contains itself; a field of its own type must be a pointer or a slice
Seen in 8 test programs.
rec A { A a; }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:11: error: record `A` contains itself; a field of its own type must be a pointer or a slice
#record <x> has no fields
Seen in 1 test program.
rec A { }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:1: error: record `A` has no fields
#record <x> is larger than the stage-0 limit of GiB
Seen in 1 test program.
rec A { [1073741824]u8 a; u8 b; }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:30: error: record `A` is larger than the stage-0 limit of 1 GiB
#slice parameter <x> cannot be reassigned; assign its elements
Seen in 2 test programs.
nul f(wr []u8 s) { s = "x"; }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:20: error: slice parameter `s` cannot be reassigned; assign its elements
#slice parameter <x> cannot be reassigned; it cannot be passed as out
Seen in 1 test program.
nul g(out []u8 d) { d = "x"; }
nul f(wr []u8 s) { g(out s); }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:26: error: slice parameter `s` cannot be reassigned; it cannot be passed as `out`
#slice parameter <x> is passed as a pointer and a length; its address cannot be taken
Seen in 2 test programs.
nul f(wr []u8 s) { p := &s; }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:26: error: slice parameter `s` is passed as a pointer and a length; its address cannot be taken
#the address of this expression cannot be taken; it is not a variable, an element, a field or a dereference
Seen in 4 test programs.
nul main() { p := &1; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:19: error: the address of this expression cannot be taken; it is not a variable, an element, a field or a dereference
#the array length <x> is larger than the stage-0 limit of GiB
Seen in 3 test programs.
nul main() { [2000000000]u8 a; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:14: error: the array length `2000000000` is larger than the stage-0 limit of 1 GiB
#the array length <x> is negative
Seen in 2 test programs.
nul main() { [-1]u8 a; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:14: error: the array length `-1` is negative
#the constant <x> is too large to compute
Seen in 30 test programs.
N :: 1 << 127;
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:8: error: the constant `1 << 127` is too large to compute
#the enum value does not fit in <x>
<x>Seen in 2 test programs.
enum E { a }
N :: u8(E(1000));
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:10: error: the enum value 1000 does not fit in `u8`
#the left side of an assignment must be a variable, an element, a field or a dereference
Seen in 1 test program.
u32 f() { ret 1; }
nul main() { u32 x = 1; f() = x; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:26: error: the left side of an assignment must be a variable, an element, a field or a dereference
#the program has no <x> function
Seen in 1 test program.
nul f() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln: error: the program has no `main` function
#the range ..= is empty
Seen in 1 test program.
nul main() { u8 x = 1; match x { 5..=4 { } else { } } }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:34: error: the range 5..=4 is empty
#the range ..= overlaps an earlier pattern at
Seen in 3 test programs.
nul main() { u8 x = 1; match x { 1..=5 { } 5..=9 { } else { } } }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:44: error: the range 5..=9 overlaps an earlier pattern at 5
#the range .. is empty
Seen in 2 test programs.
nul main() { u8 x = 1; match x { 5..3 { } else { } } }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:34: error: the range 5..3 is empty
#the range .. overlaps an earlier pattern at
Seen in 3 test programs.
nul main() { u8 x = 1; match x { 5 { } 1..10 { } else { } } }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:40: error: the range 1..10 overlaps an earlier pattern at 5
#the shift count - is outside to
Seen in 3 test programs.
N :: 1 >> -1;
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:8: error: the shift count -1 is outside 0 to 127
#the shift count is outside to
Seen in 2 test programs.
MAXC :: (1 << 126) - 1 + (1 << 126);
MINC :: -(1 << 126) - (1 << 126);
N :: 1 << 128;
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:3:8: error: the shift count 128 is outside 0 to 127
#the target type of <x> is not known here; use it where a pointer or a <x> is expected, as in <x>
Seen in 6 test programs.
nul main() { u32 a = 1; cast(&a); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:29: error: the target type of `cast` is not known here; use it where a pointer or a `usz` is expected, as in `*u8 p = cast(q);`
#the type of this character is not known here; convert it, as in <x>
Seen in 1 test program.
nul main() { c := 'a'; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:19: error: the type of this character is not known here; convert it, as in `u8('a')`
#the type of this enum value is not known here; name the enum, as in <x>
Seen in 2 test programs.
N :: .a;
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:6: error: the type of this enum value is not known here; name the enum, as in `Color.red`
#the type of this integer is not known here; convert it, as in <x>
Seen in 9 test programs.
nul main() { a := 1; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:19: error: the type of this integer is not known here; convert it, as in `u32(1)`
#the value is already matched by an earlier pattern
Seen in 9 test programs.
nul main() { u8 x = 1; match x { 1, 1 { } else { } } }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:37: error: the value 1 is already matched by an earlier pattern
#the variables of this function take more than the stage-0 limit of GiB
Seen in 2 test programs.
nul main() { [1073741824]u8 a; u8 b = 1; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:32: error: the variables of this function take more than the stage-0 limit of 1 GiB
#the variant <x> is already matched by an earlier pattern
Seen in 3 test programs.
enum C { red, green }
nul main() { C c; match c { .red, .red { } else { } } }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:35: error: the variant `C.red` is already matched by an earlier pattern
#this call returns nothing, so there is no value to store
Seen in 1 test program.
nul f() { } nul main() { a := f(); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:32: error: this call returns nothing, so there is no value to store
#this expression does nothing; an expression statement must be a call
Seen in 7 test programs.
nul main() { true; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:14: error: this expression does nothing; an expression statement must be a call
#this is not a constant expression
Seen in 10 test programs.
N :: &5;
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:6: error: this is not a constant expression
#this is not a variable, an element, a field or a dereference
Seen in 1 test program.
nul g(out []u8 d) { d = "x"; }
nul main() { []u8 t; g(out t.ptr); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:29: error: this is not a variable, an element, a field or a dereference
#this match does not cover the variant <x> of <x>; name it or add an else arm
Seen in 2 test programs.
enum C { red, green, blue }
nul main() { C c; match c { .red, .blue { } } }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:19: error: this `match` does not cover the variant `green` of `C`; name it or add an `else` arm
#this match does not cover the variants <x>, <x> of <x>; name them or add an else arm
Seen in 2 test programs.
enum C { red, green, blue }
nul main() { C c; match c { .red { } } }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:19: error: this `match` does not cover the variants `green`, `blue` of `C`; name them or add an `else` arm
#this match does not cover the variants <x>, <x>, <x> of <x>; name them or add an else arm
Seen in 1 test program.
enum C { red, green, blue }
nul main() { C c; match c { } }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:19: error: this `match` does not cover the variants `red`, `green`, `blue` of `C`; name them or add an `else` arm
#unknown escape <x>
Seen in 3 test programs.
nul main() { u8 c = '\q'; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:21: error: unknown escape `\q`
#unknown function <x>
Seen in 4 test programs.
nul main() { f(); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:14: error: unknown function `f`
#unknown module <x>; import it with <x>
Seen in 3 test programs.
nul main() { nope.T m; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:14: error: unknown module `nope`; import it with `use nope;`
#unknown name <x>
Seen in 29 test programs.
nul main() { b = 1; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:14: error: unknown name `b`
#unknown type <x>
Seen in 4 test programs.
nul main() { Missing m; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:14: error: unknown type `Missing`
#variant <x> is declared twice in <x>
Seen in 2 test programs.
enum E { a, a }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:13: error: variant `a` is declared twice in `E`
#<x> cannot be applied to <x>
Seen in 49 test programs.
N :: -true;
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:6: error: `-` cannot be applied to `bool`
#<x> cannot be applied to <x>; <x> it to a typed pointer first
Seen in 4 test programs.
nul f(wr *nul p) { p += 1; }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:20: error: `+=` cannot be applied to `*nul`; `cast` it to a typed pointer first
#<x> cannot be assigned
Seen in 5 test programs.
nul main() { [4]u8 a; a.len = 1; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:24: error: `.len` cannot be assigned
#<x> cannot be indexed
Seen in 3 test programs.
nul main() { u32 x = 1; u8 v = x[0]; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:33: error: `u32` cannot be indexed
#<x> cannot be sliced
Seen in 1 test program.
nul main() { bool x = true; []u8 v = x[0..1]; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:39: error: `bool` cannot be sliced
#<x> cannot convert <x> to <x>; it converts between pointer types, and between a pointer and <x>
Seen in 3 test programs.
nul main() { *u8 p = cast(u32(3)); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:30: error: `cast` cannot convert `u32` to `*u8`; it converts between pointer types, and between a pointer and `usz`
#<x> does not fit in <x>
Seen in 34 test programs.
nul main() { u8 a = -1; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:21: error: `-1` does not fit in `u8`
#<x> gives a pointer or a <x>, but <x> is expected here
Seen in 2 test programs.
nul main() { bool b = cast(usz(1)); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:27: error: `cast` gives a pointer or a `usz`, but `bool` is expected here
#<x> has no field <x>
Seen in 16 test programs.
nul main() { u32 a = 1; b := a.len; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:31: error: `u32` has no field `len`
#<x> has no size
Seen in 1 test program.
N :: size_of(nul);
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:14: error: `nul` has no size
#<x> has no variant <x>
Seen in 7 test programs.
enum E { a }
nul main() { E e = .b; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:20: error: `E` has no variant `b`
#<x> is a constant, not a type
Seen in 2 test programs.
N :: 1;
nul main() { N x; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:14: error: `N` is a constant, not a type
#<x> is a constant, which has no address
Seen in 2 test programs.
N :: 3;
nul main() { p := &N; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:20: error: `N` is a constant, which has no address
#<x> is a predeclared function and cannot be declared
Seen in 57 test programs.
cast :: 1;
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:1: error: `cast` is a predeclared function and cannot be declared
#<x> is a predeclared type and cannot be declared
Seen in 136 test programs.
i8 :: 1;
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:1: error: `i8` is a predeclared type and cannot be declared
#<x> is a type, not a constant
Seen in 1 test program.
rec A { u8 a; }
N :: A;
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:6: error: `A` is a type, not a constant
#<x> is a type, not a value
Seen in 4 test programs.
enum E { a }
nul main() { x := E; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:19: error: `E` is a type, not a value
#<x> is a variable, not a constant
Seen in 5 test programs.
nul main() { u32 v = 1; K :: v; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:30: error: `v` is a variable, not a constant
#<x> is already declared
Seen in 13 test programs.
nul main() { u8 a; u8 a; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:20: error: `a` is already declared
#<x> is already declared in this module
Seen in 7 test programs.
N :: 1;
N :: 2;
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:1: error: `N` is already declared in this module
#<x> is larger than the stage-0 limit of GiB for one array
Seen in 20 test programs.
nul main() { [1073741824]u16 a; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:14: error: `[1073741824]u16` is larger than the stage-0 limit of 1 GiB for one array
#<x> is and does not fit in <x>
<x>Seen in 2 test programs.
rec A { [300]u8 a; }
nul main() { u8 x = size_of(A); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:28: error: `size_of(A)` is 300 and does not fit in `u8`
#<x> is named by two arguments of one call, and one of them is passed as out
Seen in 6 test programs.
nul f(out []u8 d, []u8 s) { d = s; }
nul main() { []u8 t; f(out t, t); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:31: error: `t` is named by two arguments of one call, and one of them is passed as `out`
#<x> is named by two arguments of one call, and one of them is passed as wr
Seen in 33 test programs.
nul f(wr u32 a, u32 b) { }
nul main() { u32 x = 1; f(wr x, x); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:33: error: `x` is named by two arguments of one call, and one of them is passed as `wr`
#<x> is not a function
Seen in 1 test program.
nul main() { u32 a = 1; a(); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:25: error: `a` is not a function
#<x> is not a pointer, so it cannot be dereferenced
Seen in 3 test programs.
nul main() { u32 x = 1; *x = 2; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:25: error: `u32` is not a pointer, so it cannot be dereferenced
#<x> is not pub
Seen in 37 test programs.
use os;
nul main() { u32 a = os.CHUNK; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:24: error: `os.CHUNK` is not `pub`
#<x> is too large for any integer type
Seen in 3 test programs.
nul main() { u64 a = 99999999999999999999; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:22: error: `99999999999999999999` is too large for any integer type
#<x> must be <x> or <x>
Seen in 2 test programs.
nul main(u32 a) { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:1: error: `main` must be `nul main()` or `i32 main()`
#<x> needs a pointer, found <x>
Seen in 1 test program.
nul main() { usz p = 1; []u8 s = slice(p, usz(1)); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:40: error: `slice` needs a pointer, found `usz`
#<x> needs a typed pointer, not <x>; <x> it first
Seen in 2 test programs.
nul main() { *nul p = nil; []u8 s = slice(p, usz(1)); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:43: error: `slice` needs a typed pointer, not `*nul`; `cast` it first
#<x> needs operands of the same type, found an integer and <x>
Seen in 1 test program.
N :: 1 == true;
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:8: error: `==` needs operands of the same type, found an integer and `bool`
#<x> needs operands of the same type, found <x> and an integer
Seen in 2 test programs.
N :: true == 1;
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:11: error: `==` needs operands of the same type, found `bool` and an integer
#<x> needs operands of the same type, found <x> and <x>
Seen in 13 test programs.
N :: u8(1) + u16(1);
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:12: error: `+` needs operands of the same type, found `u8` and `u16`
#<x> needs pointers of the same type, found <x> and <x>
Seen in 2 test programs.
nul f(*u8 p, *u32 q) { usz d = p - q; }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:34: error: `-` needs pointers of the same type, found `*u8` and `*u32`
#<x> needs two hexadecimal digits
Seen in 2 test programs.
nul main() { u8 c = '\x4'; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:21: error: `\x` needs two hexadecimal digits
#<x> on a pointer needs a <x> or a pointer of the same type, found <x>
Seen in 1 test program.
nul f(*u8 p, i32 n) { *u8 q = p - n; }
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:33: error: `-` on a pointer needs a `usz` or a pointer of the same type, found `i32`
#<x> on a pointer needs a <x>, found <x>
Seen in 5 test programs.
nul main() { u32 a = 1; p := &a; q := p + p; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:41: error: `+` on a pointer needs a `usz`, found `*u32`
#<x> returns nothing; ret takes no value
Seen in 2 test programs.
nul main() { ret 1; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:18: error: `main` returns nothing; `ret` takes no value
#<x> returns <x>, but not every path ends with ret
Seen in 14 test programs.
i32 main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:1: error: `main` returns `i32`, but not every path ends with `ret`
#<x> returns <x>; ret needs a value
Seen in 2 test programs.
i32 main() { ret; }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:14: error: `main` returns `i32`; `ret` needs a value
#<x> takes a library name in quotes
Seen in 1 test program.
@lib(kernel32) ext nul f();
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:16: error: `@lib` takes a library name in quotes
#<x> takes a pointer and a length
Seen in 2 test programs.
nul main() { *u8 p = nil; []u8 s = slice(p); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:41: error: `slice` takes a pointer and a length
#<x> takes a string literal naming the file
Seen in 3 test programs. This program has several modules; all are shown, root module last.
Module main.ln:
nul main() { []u8 s = embed(1); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:29: error: `embed` takes a string literal naming the file
#<x> takes a type name
Seen in 1 test program.
N :: size_of(5);
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:14: error: `size_of` takes a type name
#<x> takes argument, found
Seen in 1 test program.
use io;
nul main() { io.print(); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:2:22: error: `print` takes 1 argument, found 0
#<x> takes arguments, found
Seen in 1 test program.
nul f(u32 a, u32 b) { } nul main() { f(1); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:39: error: `f` takes 2 arguments, found 1
#<x> takes no access modes
Seen in 7 test programs.
N :: size_of(wr u8);
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:17: error: `size_of` takes no access modes
#<x> takes one string literal
Seen in 2 test programs. This program has several modules; all are shown, root module last.
Module main.ln:
nul main() { []u8 s = embed(); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:28: error: `embed` takes one string literal
#<x> takes one type name
Seen in 3 test programs.
N :: size_of();
nul main() { }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:13: error: `size_of` takes one type name
#<x> takes one value
Seen in 2 test programs.
nul main() { *u8 p = cast(); }
Verified: the compiler refuses this program (exit code 1). Compiler output:
main.ln:1:26: error: `cast` takes one value