Reference
Every word, directive, intrinsic, diagnostic, command and option, read from the compiler itself.
Where it comes from
The reference is read from the compiler's own tables at every docs build, never typed: the words from the lexer's token and context word tables, the directives and intrinsics from its directive and intrinsic rows, the diagnostic codes from every ADAM_ERR_* constant, the commands and options from the tables adam help prints. Each word, directive and intrinsic carries the meaning the editor's hover shows for it (Hover and doc comments), and each diagnostic code the meaning written on its constant: what it means and how to fix it. A diagnostic code is two letters for the part that reports it and four digits (SM0018: Semantics), and its row lists the message texts it is reported with (Diagnostics).
Words
Keywords
| Word | Meaning |
|---|---|
module | Starts every source file: module exe Name;, module dll Name;, module lib Name; or module unit Name; names the module and what it builds. |
exe | A module kind: the module builds a program (an executable) and is the main module of its build. |
dll | A module kind: the module builds a shared library (a DLL on Windows, a shared object on Linux) exporting its public routines. |
lib | A module kind: the module builds a static library (an archive) that other programs link. |
unit | A module kind: a unit, imported by other modules and compiled into the build of the program that imports it. |
import | Brings units into scope: import System.SysUtils, System.IO; makes their public declarations visible here. |
initialize | A module section run once when the program starts, before the main block, in import order. |
finalize | A module section run once when the program ends, in reverse import order, however it ends (return, Halt or an uncaught raise). |
begin | Opens a block of statements that end closes: a routine body, the main block or a nested block. |
end | Closes a block, a type (record .. end) or a statement (if .. end;); the main block ends with end. |
var | Declares variables (var LCount: int32;); a var parameter is passed by reference, so the routine can change the caller's variable. |
const | Declares constants (const ADAM_MAX: int32 = 10;); a const parameter is read-only and passed with no copy; a const method leaves its object unchanged. |
type | Declares types: type Point = record X: int32; Y: int32; end; |
func | Declares a routine: func Add(const A: int32; const B: int32): int32;. Also a routine type func(..) and a func literal func(..) begin .. end (a closure). |
forward | Announces a routine or a type declared further down, so code before it can name it: forward func Later(): int32; |
method | Declares a routine of an object type, run on an object (self): method Grow(const AStep: int32); |
public | Exports a declaration from its module (public func, public type, public const); without it a declaration is private to its module. |
clink | C linkage: the routine uses its plain C name and the C calling convention, so C can call it or it binds a C function. |
cpplink | C++ linkage: the routine gets a mangled (Itanium) symbol, so a C library's routine of the same name never clashes with it at link time. |
external | Binds a declaration to a library's symbol: external "user32"; after its heading (name "sym" binds another symbol name). |
record | A value type of named fields, copied on assignment: Point = record X: int32; Y: int32; end;. It may declare operators. |
object | A type with fields, methods, properties and init / done; it may inherit (object(Base)) and implement interfaces, and is held by own, ref or weak. |
overlay | A type whose fields share one storage (C's union): overlay I: int64; F: float64; end |
choices | An enumeration: Color = choices(Red, Green, Blue);. A value is always written with its type: Color.Red. |
array | An array type: array[0..9] of int32 (static) or array of string (dynamic, sized with setlength). |
of | Names an element type (array of T, set of T, sequence of T); also match X of. |
ptr | A pointer type: ptr to T (typed), ptr (untyped), ptr to const T (a read-only target). P^ is what P points to. |
to | In ptr to T, the type pointed to; in for I := A to B do, the loop counts up. |
set | A set type over a choices type or a small integer range: set of Color. Test a member with in. |
packed | Lays a record out with no padding between its fields; packed(N) aligns its fields to at most N bytes (C's #pragma pack(N)). |
align | Sets a record's alignment in bytes: record align(16) .. end |
if | Runs its statements when the condition is true: if X > 0 then .. else .. end; |
then | Ends an if condition: if X > 0 then |
else | The other branch: of an if, of a match (no arm matched) or of a trylock (the mutex was not taken). |
while | Repeats its statements while the condition is true, testing before each pass: while X < 10 do .. end; |
do | Starts the body of a while, for, for .. in, lock or trylock. |
for | A counted loop: for I := 0 to 9 do .. end; (downto counts down). for X in Items do walks an array, a string, a set or a sequence; for parallel runs the passes on worker threads. |
downto | In for I := A downto B do, the loop counts down. |
repeat | Repeats its statements until the condition is true, testing after each pass: repeat .. until LDone; |
until | Ends a repeat loop with its stop condition. |
match | Runs the arm whose label matches the value: match K of 1, 2: .. 3..9: .. else .. end; |
guard | Runs its statements under exception handling: guard .. except .. finally .. end;. except runs on a raise, finally always. |
except | In a guard, the statements run when its body raised; exccode() and excmsg() read the exception. |
finally | In a guard, the statements that always run, whether its body raised or not. |
return | Leaves the routine, giving its value when it has one: return X;. In an exe's main block return N; sets the exit code. |
leave | Leaves the innermost loop (C's break). |
skip | Goes on with the next pass of the innermost loop (C's continue). |
or | Logical or of two bools; bitwise or of two integers. |
and | Logical and of two bools; bitwise and of two integers. |
xor | Exclusive or: of two bools, or bit by bit of two integers. |
not | Logical not of a bool; bitwise not of an integer. |
in | Membership: X in S is true when X is a member of the set S. Also for X in Items do. |
shl | Shifts an integer's bits left: X shl 2 |
shr | Shifts an integer's bits right: X shr 2 |
div | Integer division, the remainder dropped: 7 div 2 is 3. |
mod | The remainder of an integer division: 7 mod 2 is 1. |
addr | addr of X is a pointer to X. |
true | The bool value true. |
false | The bool value false. |
nil | The empty pointer: no object, no memory, no routine. |
self | Inside a method, the object it runs on. |
parent | Inside a method, the parent type's version of a member: parent.init(..) |
varargs | Reads the variable arguments of a routine declared with ...: varargs.count, varargs.next(int32), varargs.get(I, T). |
test | A unit test after the module's end.: test "adds" begin .. end;, run by @unitTestMode on; |
mutex | A lock for lock (M) do .. end; and trylock: zero is unlocked, the thread holding it may take it again, never copied. |
virtual | A method or property that a descendant type may override. |
operator | Declares an operator of a record or object type: operator +(const A: Vec; const B: Vec): Vec; |
threadstatic | Declares module variables with one copy per thread: threadstatic GCount: int64; |
default | Marks an indexed property as its object's default: O[I] reads it. |
literal | A parameter mode: the argument must be a compile-time constant (a literal or a constant's name); it is passed as const. |
Builtin types
| Word | Meaning |
|---|---|
int8 | A signed 8-bit integer, -128 to 127. |
int16 | A signed 16-bit integer, -32768 to 32767. |
int32 | A signed 32-bit integer, -2147483648 to 2147483647. |
int64 | A signed 64-bit integer. |
uint8 | An unsigned 8-bit integer, 0 to 255. |
uint16 | An unsigned 16-bit integer, 0 to 65535. |
uint32 | An unsigned 32-bit integer, 0 to 4294967295. |
uint64 | An unsigned 64-bit integer. |
clong | C's long, sized by the target: 4 bytes on x86_64-windows-gnu, 8 on x86_64-linux-gnu. |
culong | C's unsigned long, sized by the target: 4 bytes on x86_64-windows-gnu, 8 on x86_64-linux-gnu. |
float32 | A 32-bit IEEE 754 float (C's float). |
float64 | A 64-bit IEEE 754 float (C's double). |
bool | A truth value: true or false. |
char | One 8-bit character, a byte of UTF-8 text (C's char). |
wchar | One 16-bit character, a UTF-16 code unit: an element of a wstring. |
string | UTF-8 text, reference counted and copied on write; len(S) is its length. |
wstring | UTF-16 text, reference counted and copied on write; utf8(W) gives it as a string. |
Operators and punctuation
( ) [ ] , ; : := . .. ... ^ ? ~ ! -> + ++ += - -- -= * *= / /= % %= & && &= | || |= = <> < <= <=> << <<= > >= >> >>=
Context words
| Word | Meaning |
|---|---|
abstract | A method or property accessor with no body here: every concrete descendant gives one. |
as | Casts an object or interface to a type, checked when it runs: LShape as Circle |
async | Starts a call on another thread and gives its task: LTask := async Work(1);. async begin .. end runs a block. |
await | Waits for a task to end and gives its result: LValue := await LTask; |
copy | Declares an object type's copy routine, run when a value of it is copied: copy(const AFrom: Box);. Also varargs.copy(). |
defer | Runs a statement when its enclosing statement list ends, however it ends (return, leave, raise): defer CloseFile(LF); |
done | Declares an object type's teardown, run when the object is released: done; begin .. end; |
embed | Embeds a type's fields and members into an object type, reachable as its own: embed Place: SourcePlace; |
extend | Adds methods and operators to an existing type, a generic one too: extend Vector2 .. end;, extend List<T> .. end; |
final | An object type nothing may inherit from, or a virtual method or property no descendant may override. |
from | In yield from S;, hands out every value of the sequence S. |
hash | operator hash gives a record or object type its hash for hash(X) and for Map / Set keys. |
hidden | Hides a member of an object type: only the type itself reaches it. |
implements | Lists the interfaces an object type implements: object implements IShape |
init | Declares an object type's initializer, run by own T(..), ref T(..) or a value T(..): init(const ASize: int32); |
inline | Marks a routine whose body is copied into every call, at every @optimize level (debug too): no call is made, no frame. |
interface | A type of method and property headings that object types implement, reached through any object that implements it. |
is | Tests an object's type when it runs: if LShape is Circle then |
lock | lock (M) do .. end; runs its statements holding the mutex M, released however they end. |
name | In an external clause, the library's symbol when it differs from the declaration's name: external "lib" name "sym"; |
noreturn | Marks a routine that never returns (as Halt): what follows a call of it is unreachable. |
override | Replaces a virtual method or property of the parent type. |
own | An owning pointer: own T holds an object alone and frees it when it goes; own T(..) makes one. |
parallel | for parallel I := 0 to N - 1 do .. end; runs the passes on worker threads; for parallel (W) sets how many. |
property | Declares a property of an object type: property Size: int32 read FSize; write FSize; |
read | A property's getter: a field's name or a body. |
ref | A shared, counted pointer: ref T holds an object with others and frees it when the last one goes; ref T(..) makes one; ref func(..) is a closure type. |
sequence | A generator type: sequence of T, given by a func that yields its values, walked by for .. in or pull. |
static | A method called on its type, with no object: static method FromFile(const APath: string): JSON;, called as JSON.FromFile(..). |
task | A call started by async: task int32. await gives its result; ready, cancel and cancelled act on it. |
trylock | trylock (M) do .. else .. end; takes the mutex M only when it is free, else runs the else. |
wait | In trylock (M) wait N do, waits up to N milliseconds for the mutex. |
weak | A watching pointer: weak T sees an object without keeping it alive; alive(W) tests it, lock(W) gives a ref to it. |
write | A property's setter: a field's name or a body. |
yield | In a sequence's func, hands out the next value: yield X;. yield from S; hands out all of S. |
Directives
Build directives
| Directive | Argument | Values | Where | Times | Meaning |
|---|---|---|---|---|---|
@optimize | a name | debug safe fast small | main module only | once | The build's optimization level: @optimize debug; (or safe, fast, small). Only in the main module's prologue; adam -opt wins over it. |
@subsystem | a name | console gui | main module only | once | A Windows exe's subsystem: @subsystem console; or @subsystem gui; (no console window). |
@addverinfo | a name | on off | main module only | once | @addverinfo on; stamps the exe's version info from the @vi* directives (Windows). |
@unitTestMode | a name | on off | main module only | once | @unitTestMode on; runs the test blocks instead of the main block; the exit code is the number of failed tests. |
@vimajor | an integer or an integer constant's name | main module only | once | The version's major number (0 to 65535, or an integer constant's name), stamped with @addverinfo on; | |
@viminor | an integer or an integer constant's name | main module only | once | The version's minor number (0 to 65535, or an integer constant's name), stamped with @addverinfo on; | |
@vipatch | an integer or an integer constant's name | main module only | once | The version's patch number (0 to 65535, or an integer constant's name), stamped with @addverinfo on; | |
@viproductname | a string or a string constant's name | main module only | once | The version info's product name (a string, or a string constant's name). | |
@videscription | a string or a string constant's name | main module only | once | The version info's file description (a string, or a string constant's name). | |
@vifilename | a string or a string constant's name | main module only | once | The version info's original file name (a string, or a string constant's name). | |
@vicompanyname | a string or a string constant's name | main module only | once | The version info's company name (a string, or a string constant's name). | |
@vicopyright | a string or a string constant's name | main module only | once | The version info's copyright text (a string, or a string constant's name). | |
@exeicon | a string or a string constant's name | main module only | once | The exe's icon, an icon file: its file icon on Windows, its window's icon on other targets. | |
@addmodulepath | a string | main module only | repeatable | Adds a folder where import finds units: @addmodulepath "$P:src"; | |
@outputpath | a string | main module only | once | The build's output folder; adam -o wins over it. | |
@target | a string | any module | once | The build's target triple: @target "x86_64-linux-gnu";. adam -t wins over it. | |
@copydll | a string | any module | repeatable | Copies a DLL beside the built program. | |
@linklibrary | a string | any module | repeatable | Links a library by name: @linklibrary "user32"; | |
@addlibrarypath | a string | any module | repeatable | Adds a folder searched for @linklibrary and external libraries. | |
@breakpoint | no argument | any module, also inside a body | repeatable | A breakpoint: the debugger stops here. | |
@message | a severity (hint, warn, error or fatal) and a string | any module, also inside a body | repeatable | Reports a message when the build reads it: @message warn "text"; (hint, warn, error or fatal). | |
@addresdata | two strings (a key and a path) | any module | repeatable | Builds a file into the binary under a key, read back when it runs with FindResData: @addresdata "logo" "$P:logo.png"; |
Conditional directives
| Directive | Meaning |
|---|---|
@define | Defines a name for the conditional directives: @define FAST |
@undef | Removes a defined name: @undef FAST |
@ifdef | Compiles what follows only when the name is defined: @ifdef DEBUG .. @endif |
@ifndef | Compiles what follows only when the name is not defined: @ifndef TARGET_X86_64_WINDOWS_GNU .. @endif |
@elseif | In an @ifdef / @ifndef, the next branch, taken when its name is defined. |
@else | In an @ifdef / @ifndef, the branch taken when no other was. |
@endif | Ends an @ifdef / @ifndef. |
Intrinsics
| Intrinsic | Arguments | Gives | Meaning |
|---|---|---|---|
len | (string, wstring or array) | a value | The length of a string, a wstring or an array: len("four") is 4. |
size | (a type) (a type is accepted) | a value | The size of a type in bytes: size(int64) is 8. |
utf8 | (wstring) | a value | A wstring's text as a UTF-8 string. |
paramcount | () | a value | How many command-line arguments the program got, after its own name. |
paramstr | (int32) | a value | Command-line argument N, paramstr(0) the program's own name; "" past the last one. |
getmem | (int64) | a value | Allocates N bytes and gives a pointer to them; freemem frees them. |
resizemem | (pointer, int64) | a value | Resizes a block from getmem to N bytes and gives its pointer (the block may move). |
exccode | () | a value | In a guard's except, the code of the exception being handled. |
excmsg | () | a value | In a guard's except, the message of the exception being handled. |
alive | (weak) | a value | True while the object a weak watches still exists. |
lock | (weak) | a value | A ref to the object a weak watches, nil once it is gone. |
ready | (task) | a value | True once a task's call has ended (a result or an exception), without waiting. |
atomicadd | (int32, int64, uint32 or uint64 variable, its type) | a value | Adds N to a shared variable in one atomic step and gives its old value. |
atomicswap | (int32, int64, uint32, uint64 or ptr variable, its type) | a value | Writes N to a shared variable in one atomic step and gives its old value. |
atomiccas | (int32, int64, uint32, uint64 or ptr variable, its type, its type) | a value | Writes N to a shared variable only when it equals E, in one atomic step; true when it wrote. |
atomicload | (int32, int64, uint32, uint64 or ptr variable) | a value | Reads a shared variable atomically. |
ProjectPassword | () | a value | The project file's pack password, handed to the program scrambled; "" when there is none. Project builds only. |
FormatStr | (format string, its arguments) | a value | The text print would write, as a string: FormatStr("{} + {}", 1, 2) is 1 + 2. |
create | (record or overlay pointer variable) | nothing (a statement) | Allocates the record or overlay a pointer variable points to, zeroed: create(LP) |
destroy | (record or overlay pointer variable) | nothing (a statement) | Frees what create made and sets the pointer to nil: destroy(LP) |
freemem | (pointer) | nothing (a statement) | Frees a block from getmem. |
setlength | (dynamic array or string variable, int64) | nothing (a statement) | Sets the length of a dynamic array or a string: setlength(LItems, 10) |
raise | (string) | nothing (a statement) | Raises an exception with a message: raise("bad input") |
raisecode | (int32, string) | nothing (a statement) | Raises an exception with a code and a message: raisecode(2, "bad input") |
print | checked by its own rule | nothing (a statement) | Writes formatted text to the console: print("{} items", LCount). {} takes the next argument. |
println | checked by its own rule | nothing (a statement) | Writes formatted text to the console and ends the line: println("{} items", LCount) |
atomicstore | (int32, int64, uint32, uint64 or ptr variable, its type) | nothing (a statement) | Writes N to a shared variable atomically. |
testAssert | (bool) | nothing (a statement) | In a test block, fails the test when the condition is false. |
testAssertTrue | (bool) | nothing (a statement) | In a test block, fails the test unless the value is true. |
testAssertFalse | (bool) | nothing (a statement) | In a test block, fails the test unless the value is false. |
testAssertNil | (pointer) | nothing (a statement) | In a test block, fails the test unless the pointer is nil. |
testAssertNotNil | (pointer) | nothing (a statement) | In a test block, fails the test when the pointer is nil. |
testFail | (string) | nothing (a statement) | In a test block, fails the test with a message. |
testAssertEqualInt | (int64, int64) | nothing (a statement) | In a test block, fails the test unless the two integers are equal. |
testAssertEqualUInt | (uint64, uint64) | nothing (a statement) | In a test block, fails the test unless the two unsigned integers are equal. |
testAssertEqualFloat | (float64, float64) | nothing (a statement) | In a test block, fails the test unless the two floats are equal. |
testAssertEqualStr | (string, string) | nothing (a statement) | In a test block, fails the test unless the two strings are equal. |
testAssertEqualBool | (bool, bool) | nothing (a statement) | In a test block, fails the test unless the two bools are equal. |
testAssertEqualPtr | (pointer, pointer) | nothing (a statement) | In a test block, fails the test unless the two pointers are equal. |
workerindex | () | a value | In a for parallel body, the worker running this pass (0 is the calling thread). |
workercount | () | a value | In a for parallel body, how many workers the loop runs on. |
cancel | (task) | nothing (a statement) | Asks a task's call to stop by setting its cancel flag; the call reads it with cancelled(). |
cancelled | () or (task) | a value | True once the task was cancelled; cancelled() reads the flag of the task running on this thread. |
pull | (sequence of T, a variable of type T) | a value | Takes the next value of a sequence into a variable: true, or false once the sequence has ended. |
byteswap | (an integer) | a value | An integer with its bytes reversed: byteswap(uint16(0x1234)) is 0x3412. |
leadingzeros | (an integer) | a value | The zero bits above an integer's highest set bit (its width for 0). |
trailingzeros | (an integer) | a value | The zero bits below an integer's lowest set bit (its width for 0). |
popcount | (an integer) | a value | The number of set bits of an integer. |
hash | (a value) | a value | A uint64 hash of a value, the same on every target and every run; a record or object type gives its own with operator hash. |
nameof | (a choices value, or a type) (a type is accepted) | a value | The name of a choices value or of a type, as a string: nameof(Color.Red) is "Red". |
sourcehash | () | a value | A uint64 hash of the build's sources, the same on every host; main module only. |
Diagnostics
AR
Reported by Backend.Archive, COFF.Archive.
| Code | Message | Meaning |
|---|---|---|
AR0001 | '…' is not an archive: it does not start with !<arch> | A file linked as a static library is no archive: it does not start with !<arch>. Check the library named, and that it is a static library (.a / .lib). |
AR0002 | '…' is damaged: the member header at offset … … | A static library is damaged: a member header is cut off or not valid (the message gives the offset). Build or copy the library again. |
AR0003 | '…' is damaged: the member at offset … names '…' in the long-name table, which … | A static library is damaged: a member names a long name its long-name table does not hold. Build or copy the library again. |
AR0004 | '…' is damaged: its symbol index … | A static library is damaged: its symbol index is cut off or points past the file. Build or copy the library again. |
AR0005 | '…' is damaged: the short import member at offset … does not hold the two names its size says | An import library is damaged: a short import member does not hold the two names its size says. Build or copy the import library again. |
AU
Reported by ACU.Reader.
| Code | Message | Meaning |
|---|---|---|
AU0001 | compiled unit '…' is damaged: … | A compiled unit (.acu) is damaged (the message says how). Delete it from the output's acu folder: the next build compiles the unit again from its source. |
AU0002 | compiled unit '…' uses '…' of unit '…', which no longer declares it | A compiled unit (.acu) uses a declaration its import no longer declares: it was compiled against an older import. Delete it from the output's acu folder: the next build compiles it again. |
AU0003 | compiled unit '…' uses unit '…', which is not loaded | A compiled unit (.acu) uses a unit the build has not loaded. Delete it from the output's acu folder so the next build compiles it again, and check that the unit it names can be found. |
BN
Reported by Driver.Bench.
| Code | Message | Meaning |
|---|---|---|
BN0001 | '…' is not a benchmark kernel; the kernels: … | A kernel name the benchmark does not have |
BN0002 | the benchmark did not build for … at …:…… | The benchmark program did not build for a triple at a level |
BN0003 | '…' could not run '…' (exit code …) | A benchmark program (Adam's or C's) could not run, or ended with an exit code |
BN0004 | no C benchmark for … at '…'; rebuild it with res/bench/c/build.cmd or build.sh | A triple's prebuilt C benchmark is missing |
BN0005 | kernel … at … on … gave check …, its C twin … | A kernel's checksum differs from its C twin's |
BN0006 | '…' printed no result line for kernel … | A run printed no result line for its kernel |
BN0007 | no --baseline file in '…' is adam bench's results for … | --check: no --baseline file is results for the triple |
BN0008 | kernel … at … on …: … times C, the baseline's … (over …% slower) | --check: a kernel's ratio to C grew past the margin over the baseline's |
BN0009 | '…' could not be written | The JSON results could not be written |
BN0010 | this host cannot run … programs; leave it out of -t | A triple whose programs this host cannot run |
BN0011 | '…' could not be written | The HTML report could not be written |
BN0012 | the report template failed: … | The report template could not be read, parsed or rendered |
BN0013 | '…' cannot be read as adam bench's results (format …) | A --render or --baseline file is no adam bench results (of this format) |
BN0014 | two --baseline files are results for …: '…' and '…' | --check: two --baseline files are results for the same triple |
CC
Reported by CImport.Parser.
| Code | Message | Meaning |
|---|---|---|
CC0001 | '…' is expected here, not '…' | The headers have another token where the C grammar wants the one the message names. Check the header there, or the defines that shape it. |
CC0001 | a type name has no declarator name: '…' is one | |
CC0002 | a declaration needs a type: '…' is no type the headers declare | A declaration whose type is no type the headers declare. Import the header that declares it, or set the define that does. |
CC0003 | '…' cannot be combined with the type specifiers before it | Type specifiers that do not combine into one C type (as short long). Check the header there, or the defines that shape it. |
CC0003 | these type specifiers do not make one C type | |
CC0004 | … of a type with no size here | An integer constant expression was wanted (an array size, a bit width, an enum value) and this is none, or takes the size of a type with no size. Check the header there. |
CC0004 | an integer constant expression is expected here; '…' is not one | |
CC0005 | division by zero in a constant expression | Division by zero in a constant expression of the headers. Check the header there, or the defines that shape it. |
CC0006 | the array size … is below zero | An array size below zero in the headers. Check the header there, or the defines that shape it. |
CC0007 | '…' was declared as a … before | A struct, union or enum tag used as another kind than it was declared before. Check the header there. |
CC0008 | '… …' is defined twice | A struct, union or enum defined twice. Check that a header is not read twice without an include guard, or the defines that shape it. |
CC0009 | '…' is a C form the importer does not read | A C form the importer does not read. Leave that declaration out of the import (the spec's [skip]), or give its binding by hand in an [[insert]]. |
CC0010 | the headers end inside a declaration | The headers end inside a declaration. Check the last header for a missing ; or closing brace, or the defines that cut it short. |
CC0011 | a declaration at file scope needs a name, not '…' | A declaration at file scope with no name. Check the header there. |
CD
Reported by Compiler.Conditionals.
| Code | Message | Meaning |
|---|---|---|
CD0001 | '…' needs a symbol (an identifier) | A conditional directive has no symbol after it. Write the symbol it tests, an identifier such as DEBUG (@ifdef DEBUG). |
CD0002 | '…' has no @ifdef or @ifndef to belong to | An @elseif, @else or @endif with no open @ifdef / @ifndef before it. Remove the stray directive, or add the @ifdef / @ifndef it belongs to. |
CD0003 | '…' after @else: @else is the last branch | An @elseif or a second @else after a branch's @else. @else is the last branch: move it below every @elseif, or close the block with @endif first. |
CD0004 | the '…' here is never closed by an @endif | An @ifdef / @ifndef is still open at the end of the file (the message points at it). Add its @endif. |
CD0005 | @target stands only in the directive prologue, right after the module header | @target stands outside the directive prologue, the directives right after the module header. Move it up, directly below the module header. |
CD0006 | @target stands outside any conditional branch | @target inside an @ifdef / @ifndef branch. A module's target cannot depend on a branch: put @target outside every conditional block. |
CD0007 | @target comes before the first conditional directive | @target after a conditional directive. The target comes first: put @target above the first @ifdef / @ifndef. |
CD0008 | @target is given twice | @target is given twice. A module names one target: keep one @target. |
CD0009 | @target takes a plain string literal (a target triple) | @target takes a plain string literal naming a target triple (@target "x86_64-linux-gnu";). |
CD0010 | '…' is not a target triple (arch-os-abi or arch-vendor-os-abi) | The @target text is not shaped like a target triple (arch-os-abi or arch-vendor-os-abi, such as x86_64-windows-gnu). Check its spelling. |
CD0011 | '…' is not a supported target; supported: … | The triple is well formed, but Adam does not build for it. Use one of the supported targets the message lists. |
CD0012 | @target '…' differs from the main module's '…' | An imported unit's @target names another triple than the main module's. A build has one target: make the unit's @target match, or drop it from the unit. |
CD0013 | @optimize stands outside any conditional branch | @optimize inside an @ifdef / @ifndef branch. Put it outside every conditional block. |
CD0014 | @optimize comes before the first conditional directive | @optimize after a conditional directive. Put it above the first @ifdef / @ifndef. |
CD0015 | @optimize is given twice | @optimize is given twice. Keep one. |
CD0016 | '…' is not an optimization level; accepted: … | The @optimize value is not an optimization level. Use one of the levels the message lists. |
CD0017 | '…' is a retired optimization level: write '…' | The @optimize value is the old spelling of a level. Write the name the message shows. |
CI
Reported by CImport.Writer.
| Code | Message | Meaning |
|---|---|---|
CI0001 | '…' is not bound: … | Warning: a C declaration the unit does not bind (the message gives the reason). Bind it by hand in an [[insert]] if the program needs it. |
CI0002 | the [[insert]] anchor '…' is not in the written unit | An [[insert]] anchor that is not in the written unit, or not as many times as its occurrence asks. Fix the anchor text or the occurrence. |
CI0002 | the [[insert]] anchor '…' is in the written unit … times; occurrence … is asked for | |
CI0003 | '…' would be the Adam name of both '…' and '…' | Two C declarations would get one Adam name. Rename one of them in the spec. |
CI0004 | the unit file '…' cannot be written | A file cimport writes (the unit, or its layout probe) cannot be written. Check that the output folder can be written. |
CI0005 | [macro_params] names '…', which is no function-like macro of the bound headers | A [macro_params] entry that names nothing: no function-like macro of the headers, no parameter of that macro, or no C type name. Fix the entry. |
CI0005 | [macro_params] names '…', which is no parameter of the macro '…' | |
CI0005 | [macro_params]'s '…' is no C type name of the headers (a typedef or tag, as a cast spells it) |
CL
Reported by Driver.CLI.
| Code | Message | Meaning |
|---|---|---|
CL0002 | '…' is not a command; see 'adam help' | The first word on the command line is no adam command. Check its spelling; adam help lists the commands. |
CL0003 | '…' needs the main module's file: adam … <file>; see '…' | A command that builds or checks was given no file. Name the main module's file (or a project folder) after the command. |
CL0004 | '…' takes one argument: '…' is one more after '…'; see '…' | One positional argument too many: the command takes one (or two) and the message names the extra one. Drop it, or quote a path that holds spaces. |
CL0004 | '…' takes two arguments: '…' is one more after '…'; see '…' | |
CL0005 | '…' is not an option of '…'; see '…' | An option the command given does not have. Check its spelling; adam help <command> lists that command's options. |
CL0006 | '…' is not a command, so it has no help; see 'adam help' | adam help was asked about a word that is no command, so there is no help for it. adam help alone lists the commands. |
CL0007 | '…' needs … after it; see '…' | An option that takes a value was given none (it ended the line, or another option came next). Put its value right after it. |
CL0008 | '…' is given twice; see '…' | The same option is given twice. Give it once. |
CL0009 | '…' is not a target; the targets: …; see '…' | -t names no target Adam has. Use one of the triples the message lists (for example x86_64-windows-gnu or x86_64-linux-gnu). |
CL0010 | the arguments after '--' are for the program -r or -d runs: give one of them too; see '…' | Arguments after -- with neither -r nor -d: they are the program's arguments, so they need a run. Add -r (or -d), or drop them. |
CL0011 | '…' was built but could not be started | The program was built, but -r could not start it. Check that the exe is there and that nothing on the machine blocks it, then run it again. |
CL0012 | '…' was built but not run: this machine does not run … programs | Warning: the program was built for a target this machine does not run, so -r did not run it. Run it on a machine of that target. |
CL0013 | No … in …; see '…' | build was given a folder with no project.toml in it. Name a project folder, or the main module's file; adam init makes a new project. |
CL0014 | Cannot use the project folder …: it cannot be resolved; see '…' | The project folder given cannot be resolved to a path. Check that it exists and that the path is spelled right. |
CL0015 | '…' needs a project name and a type: adam … <name> <exe|dll|lib>; see '…' | init needs a project name and a type: adam init <name> <exe, dll or lib>. Give both. |
CL0016 | '…' is not a project type: use exe, dll or lib; see '…' | init was given a project type other than exe, dll or lib. Use one of those. |
CL0017 | The project has no assets folder: … | pack found no assets folder in the project. Make the assets folder the message names and put the files to pack in it. |
CL0018 | Cannot make the folder … | pack cannot make the folder the archive goes into. Check the path and that it can be written. |
CL0019 | Cannot pack … into …: … | pack cannot write the archive (the message gives the reason). Check that the path can be written and that no program holds the file open. |
CL0020 | '…' is a retired optimization level: write '…'; see '…' | -opt names no optimization level (the message lists them), or a retired one (the message gives the name to write). Use a listed level. |
CL0020 | '…' is not an optimization level; the levels: …; see '…' | |
CL0021 | Cannot copy … to … | pack wrote the archive but cannot update its copy beside a built exe. Check that the copy can be written and that no running program holds it open. |
CL0022 | '…' was built but not run: a dll runs only inside a program that loads it | Warning: -r on a dll. A dll runs only inside a program that loads it: run that program, or debug the dll with -d and --host. |
CL0023 | '…' was built but not run: a lib runs only inside a program that links it | Warning: -r on a lib. A lib runs only inside a program that links it: build and run that program. |
CL0024 | '…' needs an import spec: adam … <spec>; see '…' | cimport was given no import spec. Name the spec file after the command. |
CL0025 | '…' was built without debug information, so it cannot be debugged: -d needs a debug build | -d on a build with no debug information. Build in debug mode to debug it. |
CL0026 | -r and -d both run the program: give one of them; see '…' | -r and -d together: both run the program. Give one of them. |
CL0027 | '…' takes no argument, but '…' was given; see '…' | An argument given to a command that takes none. Drop it. |
CL0028 | --host names the exe a dll is debugged in: it needs -d; see '…' | --host without -d. It names the exe a dll is debugged in: add -d, or drop it. |
CL0029 | '…' is a dll: debug it with --host <exe>, the program that loads it | -d on a dll with no --host. A dll runs inside a program: name that program with --host <exe>. |
CL0030 | '…' is a program: --host is only for a dll | --host on a build that wrote a program. It is only for a dll: drop it. |
CL0031 | The editor is not installed: … is missing | adam editor cannot find the editor beside adam (the message names the missing file). Install it there, from the release. |
CL0032 | The editor … could not be started | The editor is there but could not be started. Check that nothing on the machine blocks it, then try again. |
CL0033 | '…' is not available on this host: this adam has no debugger for … programs | A command or option this adam has no support for on this host (the debugger's, for this host's programs). Use it on a host that has it. |
CL0034 | '…' is not a deps action: use add, remove or list; see '…' | deps was given an action it does not have. Use add, remove or list. |
CL0035 | 'deps …' takes …; see '…' | deps <action> was given too few or too many arguments (the message gives what it takes). |
CL0036 | --check needs --baseline <file,...>; see '…' | bench --check was given with no --baseline <file>. Name the earlier results to compare with. |
CL0037 | --render makes the page from saved results alone: … does not go with it (name every results file in its one comma list); see '…' | bench --render was given a kernel name or a measuring option (-opt, -t, -o, --check, --baseline): --render only makes the page again from saved results, so these would be ignored. Name every results file in --render's one comma list. |
CP
Reported by CImport.Headers, CImport.Preprocessor, CImport.Spec.
| Code | Message | Meaning |
|---|---|---|
CP0001 | the import spec is not valid TOML: … | The import spec cannot be read, or is not valid TOML (the message gives where). Check that the file is there and fix the TOML. |
CP0001 | the import spec cannot be read | |
CP0002 | the import spec has no '…' key | The import spec lacks a key it needs (the message names it). Add it. |
CP0003 | '…' must be … | An import spec key holds the wrong kind of value (the message says what it must be). Fix the value. |
CP0004 | '…' is not a key or table of an import spec: … | A key or table the import spec does not know (the message lists the ones it takes). Check its spelling, or remove it. |
CP0004 | '…' is not a key of […]: … | |
CP0005 | the import spec is format …; this compiler reads formats 1 to … | The import spec is in a format this adam does not read (the message gives the formats it reads). Use a newer adam, or a spec of a format it reads. |
CP0006 | '…' is not a unit name: identifiers joined by '.', none an Adam keyword | A unit name that is not valid: a unit name is identifiers joined by ., none of them an Adam keyword. Fix the name. |
CP0007 | '…' is not a linkage: use static or dll | A linkage other than static or dll. Use one of those. |
CP0008 | '…' is not a target triple; the targets: … | A triple Adam has no target for (the message lists the targets). Use one of them. |
CP0009 | the folder '…' does not exist (…) | A folder the import spec names does not exist. Fix the path, or create the folder. |
CP0010 | '…' is not a define: NAME or NAME=value, NAME a C identifier | A define, undefine or C name that is not valid. A define is NAME or NAME=value, and every name is a C identifier. Fix it. |
CP0010 | '…' is not a C identifier | |
CP0011 | '…' cannot be renamed '…': an Adam name is an identifier and no Adam keyword | A rename to an Adam name that is not valid: an Adam name is an identifier and no Adam keyword. Choose another name. |
CP0012 | an [[insert]] takes exactly one of before, after or replace | An [[insert]] with no anchor, or more than one. It takes exactly one of before, after or replace. |
CP0013 | occurrence counts the matches from 1, not … | An [[insert]] whose occurrence is below 1. Occurrence counts the anchor's matches from 1. |
CP0014 | '…' names no target | An empty text where a name is wanted (a target, a header or another name; the message names the key). Fill it in, or remove the entry. |
CP0014 | '…' holds an empty text | |
CP0014 | '…' names no header | |
CP0015 | '…' is not an import spec: its name must end in … | The file given to cimport is no import spec: its name must end the way the message says. Name the spec file, or rename it. |
CP0016 | the header folder '…' cannot be opened | A header folder (one of the spec's includes, or a system header folder) cannot be opened. Check that it exists and can be read. |
CP0017 | the header '…' is in none of the … folders searched (the spec's includes, then the system headers) | A header that none of the folders searched holds (the spec's includes, then the system headers). Add its folder to the spec's includes, or fix the name. |
CP0018 | the header '…' cannot be read | A header was found but cannot be read. Check that the file can be read. |
CP0019 | this #… has no #endif before the end of its file | A conditional (#if, #ifdef, #ifndef) with no #endif before the end of its file. Close it in the same file. |
CP0020 | #… without an #if | An #elif, #else or #endif with no #if open. Remove it, or add the #if. |
CP0021 | #… after #else | An #elif or #else after the #else of the same conditional. Put it before the #else, or close the conditional first. |
CP0022 | '…' is not a preprocessor directive | A # line that is no preprocessor directive. Fix its spelling, or remove it. |
CP0023 | 'defined' needs a macro name, as defined NAME or defined(NAME) | A macro name missing where one is wanted (#define, #undef, #ifdef, defined), or one that is not a name (defined itself is none). Give a macro name. |
CP0023 | #… needs a macro name | |
CP0023 | 'defined' cannot be a macro name | |
CP0024 | the parameters of macro '…' are not valid: identifiers or '...' separated by ',', then ')' | A function-like macro whose parameter list is not valid: identifiers or ... separated by ,, then ). Fix the list. |
CP0025 | '#' in function-like macro '…' is not followed by a parameter | A # in a function-like macro not followed by one of its parameters. # makes a string of a parameter: name one after it. |
CP0026 | '##' cannot be at either end of macro '…' | A ## at the start or the end of a macro body. It pastes two tokens: put it between them. |
CP0027 | the call of macro '…' has no closing ')' | A function-like macro call with no closing ). Close the call. |
CP0028 | macro '…' takes at least … arguments, … given | A macro called with the wrong number of arguments (the message gives both counts). Pass as many as the macro takes. |
CP0028 | macro '…' takes … arguments, … given | |
CP0029 | pasting '…' and '…' does not give a valid token | A ## paste whose two tokens do not make one valid token. Paste tokens that do, or drop the ##. |
CP0030 | #… has no expression | An #if or #elif expression that is empty or not valid. Write a valid integer expression there. |
CP0030 | '…' is not expected here in the #if expression | |
CP0030 | a ':' is missing after '?' in the #if expression | |
CP0030 | the #if expression ends early | |
CP0030 | a ')' is missing in the #if expression | |
CP0030 | '…' is not an integer constant #if takes | |
CP0030 | '…' is too large for any integer type | |
CP0031 | division by zero in the #if expression | Division by zero in an #if expression. Fix the expression. |
CP0032 | #… needs a header name: <name> or "name" | An #include with no header name. Write it as <name> or "name". |
CP0033 | #include nested … deep: too deep (an include cycle?) | Includes nested too deep, most likely an include cycle. Give the header an include guard, or break the cycle. |
CP0034 | #error … | An #error the headers reach, with its text. The headers refuse this set of defines or this target: fix the defines in the import spec. |
CP0035 | #warning … | Warning: a #warning the headers reach, with its text. Read it; the import goes on. |
CP0036 | macro '…' is redefined differently | Warning: a macro defined again with another body. The later one is used: check which the headers mean, or the spec's defines. |
CP0037 | #line needs a line number from 1, then an optional "file name" | A #line that is not valid: it takes a line number from 1, then an optional "file name". |
CP0038 | '…' needs its argument in ( ) | A preprocessor builtin used where it is not taken: it needs its argument in ( ), or is taken only in #if and #elif. Use it there, that way. |
CP0038 | '…' is only taken in #if and #elif | |
CP0039 | _Pragma needs one string literal in ( ) | _Pragma that is not valid: it takes one string literal in ( ). |
CP0040 | '…' is named twice in … | A target named twice in targets. Name each target once. |
DB
Reported by Debug.Runtime, Debug.Symbols, Debug.Target.
| Code | Message | Meaning |
|---|---|---|
DB0001 | the program to debug, '…', does not exist | The program to debug does not exist. Build it first, or fix its path. |
DB0002 | '…' could not be started under the debugger: … | The program could not be started under the debugger (the message gives the system's reason). Check that it is a program for this host and can be run. |
DB0003 | the debugger has started its program already | A debugger request made in a state that does not take it: starting a program already started, or resuming one that is not stopped at an event. |
DB0003 | the program is not stopped at an event, so it cannot be resumed | |
DB0004 | thread … is not a thread of the program | A thread id the program does not have (the thread may have ended). Use a thread the debugger lists. |
DB0005 | the registers of thread … could not be read: … | A thread's registers could not be read or written, or the registers given are not the ones read from that thread (the message gives the reason). |
DB0005 | the registers given for thread … are not the ones read from it | |
DB0005 | the registers of thread … could not be written: … | |
DB0006 | … bytes at 0x… could not be read: … | The program's memory could not be read or written at that address (the message gives the reason). Check the address: it must be memory the program has. |
DB0006 | … bytes at 0x… could not be written: … | |
DB0007 | no breakpoint could be put at 0x…: … | A breakpoint could not be put at that address (the message gives the reason). Put it on a line with code. |
DB0008 | the program could not be paused: … | The program could not be paused (the message gives the system's reason). |
DB0009 | the debugger lost the program: … | The debugger lost the program while waiting on it or resuming it (the message gives the system's reason). Start the debug session again. |
DB0010 | the debug information of '…' could not be loaded: … | A module's debug information could not be loaded, or it has none. Build the program as a debug build: it writes the debug information. |
DB0010 | '…' has no debug information (a debug build writes it) | |
DB0011 | no module's debug information is loaded | A stack walk asked for before any module's debug information was loaded. Start the program under the debugger first. |
DB0012 | the registers given for thread … are not the ones read from it | A stack walk given registers that were not read from a thread of this program. Read them from the thread first. |
DB0013 | the program is not stopped, so it cannot … | A debugger request that needs the program stopped (the message names it), made while it runs. Pause it, or wait for a breakpoint. |
DB0014 | no program is being debugged | A debugger request made with no program being debugged. Start one first. |
DB0015 | '…' ended before it reached its entry | The program ended before it reached its entry: it stopped while it was being loaded. Run it outside the debugger to see why. |
DG
Reported by Compiler.Diagnostics.
| Code | Message | Meaning |
|---|---|---|
DG0001 | the error budget (…) is reached; later errors are not shown | The build reached its error budget (the number in the message) and shows no more errors. Fix the errors shown, the first ones first: later errors are often caused by an earlier one, and build again. |
DG0002 | internal: '…' is not a diagnostic code (two capitals, four digits) | Internal: the compiler reported a diagnostic whose code is not two capitals and four digits. This is a compiler bug, not a fault in your code: please report it with the source that shows it. |
DG0003 | internal: the message of … does not fit its arguments (holes: …, arguments: …) | Internal: a diagnostic's message and its arguments do not match (the message gives the counts). This is a compiler bug, not a fault in your code: please report it with the source that shows it. |
DR
Reported by Driver.Compiler.
| Code | Message | Meaning |
|---|---|---|
DR0001 | the folder of adam.exe cannot be told, so the standard library's folder '…' is not searched for imports | Warning: the folder of adam cannot be told, so the standard library's folder is not searched for imports. Run adam from its own install folder, with res beside it. |
DR0002 | the main module's path '…' cannot be resolved | The main module's (or unit's) path cannot be resolved. Check that the file exists and that the path is spelled right. |
DR0003 | internal: one compile checks one program, and '…' would be a second | Internal: one compile checks one program, and a second was asked of it. This is a compiler fault: report it. |
DR0004 | Adam has no target '…', so nothing is laid out or named; the targets it builds for: … | The program's target triple names no target Adam has. Use one of the targets the message lists. |
DR0005 | the folder of adam.exe cannot be told, so the runtime's folder '…' is not searched for the runtime unit | Warning: the folder of adam cannot be told, so the runtime's folder is not searched for the runtime unit. Run adam from its own install folder, with res beside it. |
DR0006 | Adam generates no code for the target '…' yet; the targets it generates code for: … | Adam has the target but generates no code for it yet. Build for one of the targets the message lists. |
DR0007 | the output folder '…' cannot be made | The output folder cannot be made. Check the path and that it can be written. |
DR0008 | the exe '…' cannot be written | The exe cannot be written. Check that its folder can be written and that the exe is not running or held open. |
DR0010 | project.toml says the project is a …, but its main module … is not | project.toml's type (exe, dll or lib) is not the kind its main module declares. Make the two agree: fix the type, or the main module's module line. |
DR0011 | the compiled unit '…' cannot be written | A unit's compiled .acu cannot be written. Check that the output folder can be written and that no program holds the file open. |
DR0012 | the compiled unit '…' cannot be read | A unit's compiled .acu cannot be read back (for the link, or to bring its source's size and time up to date). Build again; if it repeats, delete the output folder and build from clean. |
DR0013 | the IR file '…' cannot be written | The file --emit-ir writes cannot be written. Check that its folder can be written. |
DR0014 | the assets archive '…' cannot be copied beside the exe as '…' | The project's assets archive cannot be copied beside the exe. Check that the exe's folder can be written and that no running program holds the copy open. |
DR0015 | the dll's import library '…' cannot be written | A dll's import library cannot be written. Check that the output folder can be written and that no program holds the file open. |
DR0016 | the lib's static library '…' cannot be written | A lib's static library cannot be written. Check that the output folder can be written and that no program holds the file open. |
DR0017 | the C header '…' cannot be written | The C header of a dll or lib cannot be written. Check that the output folder can be written. |
DR0018 | the debug file '…' cannot be written | A debug build's debug file cannot be written. Check that the output folder can be written and that no debugger holds the file open. |
DR0019 | the binding unit '…' cannot be written | The binding unit of a dll or lib cannot be written. Check that the output folder can be written. |
DR0020 | the exe '…' was written but cannot be made executable | The exe (or dll) was written but cannot be made executable. Check the output folder's file system and permissions. |
DR0021 | the dependency's dll '…' cannot be copied beside the exe as '…' | A dll project the build depends on ([deps]) cannot be copied beside the exe. Check that the output folder can be written and that no program holds the dll open. |
DV
Reported by Dev.Editor.
| Code | Message | Meaning |
|---|---|---|
DV0001 | The editor's source folder '…' is not there | Dev command: the editor's source folder is not there. Check the path. |
DV0002 | The editor's package.json '…' cannot be read as a JSON object | Dev command: the editor's package.json cannot be read as a JSON object. Fix the file. |
DV0003 | The editor's source folder '…' holds no file | Dev command: the editor's archive cannot be made: its source folder holds no file, a file in it cannot be read, or the archive cannot be written. |
DV0003 | The editor's file '…' cannot be read: no archive written | |
DV0003 | The archive '…' cannot be written | |
DV0004 | '…' is there: Electron loads it before app.asar, so remove it | Dev command: a resources\app folder is beside the archive, and Electron loads it before app.asar. Remove that folder. |
DV0005 | The editor's program '…' is not there | Dev command: the editor's program is not there. Check the path. |
DV0006 | The editor's icon '…' is no icon file | Dev command: the editor's icon is no icon file. Give a valid .ico. |
DV0007 | '…' could not be stamped: … (system error …) | Dev command: the editor's program could not be stamped with its version and icon (the message gives the system's reason). Check that it is not running. |
EF
Reported by ELF.Foreign.
| Code | Message | Meaning |
|---|---|---|
EF0001 | static library '…' cannot be read | A static library cannot be read. Check that it is there and can be read. |
EF0002 | '…' is built for machine … as file type …: the target links relocatable objects (type 1) for machine … | An object in a static library is built for another machine, or is no relocatable object (the message gives both). Link a library built for this target. |
EF0003 | '…' is defined twice: '…' defines it again | A symbol defined twice: a second object defines it again (the message names both). Link only one of the objects or libraries that define it. |
EF0004 | '…' holds …, which adam does not link | An object holds something adam does not link (the message says what). Build the library without it, or use another build of it. |
EF0005 | '…' is damaged: … | An object is damaged (the message says how). Build or copy the library again. |
EF0006 | '…' has a relocation to '…' in its section …, which the link left out | An object has a relocation into a section the link left out. Link the object that keeps that section, or build the library again. |
EL
Reported by ELF.Linker.
| Code | Message | Meaning |
|---|---|---|
EL0002 | '…' is used, but nothing in the program, its static libraries or the shared libraries of the version tables defines it | A symbol is used but nothing defines it: not the program, its static libraries or the shared libraries it links. Link the library that defines it, or fix the name. |
EL0003 | library '…' is not found: looked for … in … | A library, or the C runtime's version table, is not found in the library paths (the message gives where it looked). Add its folder to the library paths, or fix the name. |
EL0003 | the C runtime's version table '…' is not found: looked in … | |
EL0004 | library '…' names a folder: a library is named by its file name and found in the library paths | A library named with a folder. Name it by its file name, and add its folder to the library paths. |
EL0005 | a relocation in '…' at offset … to '…' does not reach its target: … does not fit in … bits | A relocation does not reach its target: the distance does not fit in its bits. Build the C object again with -fPIC. |
EL0006 | '…' is data of the shared library '…', reached in '…' at offset … without a GOT slot: an exe reaches shared data only through one (a C object built with -fPIC does) | A shared library's data reached without a GOT slot: an exe reaches shared data only through one. Build the C object with -fPIC. |
EL0007 | the .eh_frame of '…' holds a record adam cannot read at offset … | An object's .eh_frame holds a record adam cannot read. Build the C object again, or report the object that shows it. |
EL0008 | the C runtime's version table '…' is damaged at line … | A version table (the C runtime's, or a shared library's) is damaged, or lacks its start routine. Install adam's res folder again from the release. |
EL0008 | the shared library table '…' is damaged at line …: its library's symbols are not bound | |
EL0008 | the C runtime's version table '…' does not hold its start routine '…' | |
EL0009 | '…' takes a C stream (FILE *), which System.HookIO in this program does not hook: a stream System.HookIO opened would reach the C runtime's own code | A C routine that takes a C stream (FILE *) which System.HookIO does not hook, in a program that uses System.HookIO: a stream it opened would reach the C runtime's own code. Use a stream routine System.HookIO hooks instead. |
EO
Reported by ELF.Reader.
| Code | Message | Meaning |
|---|---|---|
EO0001 | '…' is damaged: … | An ELF object is damaged (the message says how). Build or copy it again. |
EX
Reported by COFF.Exports.
| Code | Message | Meaning |
|---|---|---|
EX0001 | library '…' names a folder: a library is named by its file name and found in the library paths | A library named with a folder. Name it by its file name, and add its folder to the library paths. |
EX0002 | library '…' is not found: looked for … in … | A library is not found in the library paths (the message gives where it looked). Add its folder to the library paths, or fix the name. |
EX0003 | '…' cannot be read | A library file cannot be read. Check that it is there and can be read. |
EX0004 | '…' is not a PE image: … | A file linked as a DLL is no PE image (the message says why). Check the file named. |
EX0005 | '…' is not a 64-bit image: its optional header's magic is …, PE32+'s is 0x20B | A DLL that is no 64-bit (PE32+) image. Link the DLL's 64-bit build. |
EX0006 | '…' is damaged: … | A DLL or import library is damaged: its headers or a table lie outside its bytes. Copy it again. |
EX0007 | import library '…' imports from '…' and from '…': one import library is one DLL's | An import library that imports from two DLLs: one import library is one DLL's. Use one import library per DLL. |
FO
Reported by COFF.Foreign.
| Code | Message | Meaning |
|---|---|---|
FO0001 | static library '…' cannot be read | A static library cannot be read. Check that it is there and can be read. |
FO0002 | '…' is built for machine …, and the target's machine is … | A member of a static library is built for another machine than the target's. Link a library built for this target. |
FO0003 | '…' is defined twice: '…' defines it again | A symbol defined twice: a second object defines it again (the message names both). Link only one of the objects or libraries that define it. |
FO0004 | '…' holds …, which adam does not link | A member holds something adam does not link (the message says what). Build the library without it, or use another build of it. |
FO0005 | '…' is damaged: … | A member of a static library is damaged (the message says how). Build or copy the library again. |
FO0006 | '…' has a relocation in section '…' to '…', which is in no section the program keeps | A member has a relocation to a symbol in no section the program keeps. Link the object that defines it, or build the library again. |
LK
Reported by COFF.Linker.
| Code | Message | Meaning |
|---|---|---|
LK0001 | '…' is used, but nothing in the program defines it | A symbol is used but nothing in the program defines it. Link the library that defines it, or fix the name. |
LK0002 | '…' is built for machine …, and the target's machine is … | A DLL built for another machine than the target's. Link the DLL built for this target. |
LK0003 | variable '…' is not exported by '…' | A routine or variable its DLL does not export. Check the name, and the DLL its external names. |
LK0003 | routine '…' is not exported by '…' | |
LK0004 | the program's image would be … bytes, past the … bytes a 64-bit image holds | The program's image would be past the 2 GB a 64-bit image holds. Make the program smaller: move large data out of it, to a file it loads. |
LK0006 | the exception table is no run of whole …-byte entries: its piece '…' breaks it | The exception table is no run of whole entries: a piece of it (the message names it), most likely from a C object, breaks it. Build that object again. |
LK0007 | @exeicon: the icon file '…' cannot be read | The @exeicon file cannot be read, or holds no icon. Give a valid .ico file. |
LK0007 | @exeicon: the icon file '…' is cut short: an image lies past its end | |
LK0007 | @exeicon: '…' is no icon file: it does not start with an icon directory | |
LK0007 | @exeicon: the icon file '…' holds no image | |
LK0008 | the debug information of '…' is left out of the program's PDB: … | Warning: an object's debug information cannot be merged into the program's PDB (the message says why). The program links; that object is not debuggable. |
LK0009 | '…' takes a C stream (FILE *), which System.HookIO in this program does not hook: a stream System.HookIO opened would reach the C runtime's own code | A C routine that takes a C stream (FILE *) which System.HookIO does not hook, in a program that uses System.HookIO: a stream it opened would reach the C runtime's own code. Use a stream routine System.HookIO hooks instead. |
LW
Reported by Backend.Lowering.
| Code | Message | Meaning |
|---|---|---|
LW0001 | code generation does not handle … yet | The code generator does not handle this construct yet (the message names it). This is a gap in the compiler, not a fault in your code: please report it with a small program that shows it. |
LW0002 | @exeicon: the largest image of the icon file '…' cannot be decoded: it is no BMP or PNG image the compiler reads, or it is damaged | The @exeicon file is no usable icon: it does not start with an icon directory, holds no image, is cut short, or its largest image is no BMP or PNG image the compiler can read (the message says which). Point @exeicon at a valid Windows icon file. |
LW0002 | @exeicon: '…' is no icon file: it does not start with an icon directory | |
LW0002 | @exeicon: the icon file '…' holds no image | |
LW0002 | @exeicon: the icon file '…' is cut short: an image lies past its end |
LX
Reported by Compiler.Lexer.
| Code | Message | Meaning |
|---|---|---|
LX0001 | the string literal is not closed on its line | A string or character literal has no closing quote before the end of its line. Close it on the same line; for text over several lines use a raw string (R"(...)") or join pieces with +. |
LX0001 | the character literal is not closed on its line | |
LX0002 | the raw string R"…( is not closed before the end of the file | A raw string R"delim( has no matching )delim" before the end of the file. Close it with ), the same delimiter it opened with, and the quote. |
LX0003 | the block comment is not closed before the end of the file | A block comment is not closed before the end of the file. Add its closing */; block comments do not nest, so the first */ ends the comment. |
LX0004 | unexpected character … | A character that starts no token: Adam's syntax has no use for it outside a string literal or a comment. Remove it, or put it inside a string or a comment. |
LX0005 | '…' has no digits | A malformed number: a digit its base does not allow, a digit separator ' that does not stand between two digits, an unknown suffix, an exponent with no digits, or a hex float with no p exponent. Fix the literal as the message says; a float64 takes no suffix, a float32 takes f. |
LX0005 | '…' has a digit its base does not allow | |
LX0005 | a digit separator in '…' does not stand between two digits | |
LX0005 | the hex float '…' takes no digit separators | |
LX0005 | the hex float '…' needs a 'p' exponent | |
LX0005 | the exponent of '…' has no digits | |
LX0005 | '…' is not a suffix of the number '…' | |
LX0005 | the float suffix '…' is not supported: write … for a float64 or …f for a float32 | |
LX0006 | '…' does not fit int64: write '…' to make it unsigned | A number too large for any type: an integer past uint64 (the largest integer type), an integer past int64 written without the unsigned form the message shows, or a float past float64's range (about 1.8e308). Use a smaller value, or write the integer the way the message shows to make it unsigned. |
LX0006 | '…' does not fit any integer type (uint64 is the largest) | |
LX0006 | '…' is past the largest float64 (about 1.8e308) | |
LX0007 | '…' starts with 0, and Adam has no octal literals: write '…' for the decimal value | A decimal number starts with 0 (017). Adam has no octal literals, so a leading zero is refused rather than misread: drop the leading zeros (the message shows the decimal value), or write a hex or binary value with its 0x or 0b prefix. |
LX0009 | '@' is not followed by a directive name | An @ with no directive name after it. Write the name straight after the @ (@ifdef DEBUG), or remove the stray @. |
LX0010 | the raw string delimiter '…' is invalid: at most 16 characters, none of ( ) \ blanks or controls | A raw string's delimiter (the text between R" and () is too long or holds a character it may not: at most 16 characters, none of them a parenthesis, a backslash, a blank or a control character. Pick a short delimiter of plain characters. |
LX0011 | the byte 0x… is not valid UTF-8 | The source holds a byte that is not valid UTF-8 (the message shows it). Adam reads source as UTF-8: save the file as UTF-8 in your editor, or replace the damaged text. |
LX0201 | whitespace between '\' and the end of the line: the lines are still joined | Warning: blanks stand between a line-ending \ and the newline. The lines are still joined, but the blanks are easy to miss: remove them so the \ ends the line. |
LX0202 | '*' and '/' are split by a line splice: the block comment still ends here | Warning: a block comment's closing */ is split by a line splice (*, then \ and a newline, then /). The comment still ends there: write */ on one line. |
LX0203 | a comment opener inside a block comment: block comments do not nest | Warning: a comment opener inside a block comment. Block comments do not nest, so the first */ ends the whole comment and what follows is read as code: remove the inner opener, or comment the lines with //. |
OB
Reported by COFF.Reader.
| Code | Message | Meaning |
|---|---|---|
OB0001 | '…' is damaged: … | A COFF object is damaged (the message says how). Build or copy it again. |
PJ
Reported by Driver.Project.
| Code | Message | Meaning |
|---|---|---|
PJ0001 | Cannot read the project file '…': … | project.toml cannot be read or parsed (the message gives the reason). Check that the file is there and is valid TOML. |
PJ0002 | The project file '…' has no '…' key | project.toml lacks a key a project needs (the message names it). Add it. |
PJ0003 | In the project file '…', '…' must be … | A project.toml key holds the wrong kind of value (the message says which it must be, for example a string or an integer). Fix the value. |
PJ0004 | The project file '…' has an unknown key '…' (ignored) | Warning: project.toml has a key or table Adam does not know, and it is ignored. Check its spelling, or remove it. |
PJ0005 | The project name '…' is not valid: … | The project name is not valid (the message gives the reason). Choose a name that passes. |
PJ0006 | The project type '…' is not valid: use exe, dll or lib | The project type is not exe, dll or lib. Use one of those. |
PJ0007 | The main module '…' is not valid: … | The main module path in project.toml is not valid (the message gives the reason). Fix the path. |
PJ0008 | The main module '…' does not exist (…) | The main module project.toml names does not exist. Fix the path, or create the file. |
PJ0009 | The output folder '…' is not valid: … | The output folder in project.toml is not valid: it is the project folder itself, or inside a folder the project keeps for itself (the message names it). Name another folder. |
PJ0010 | The pack password holds a character that is not printable ASCII (at position …) | The pack password holds a character that is not printable ASCII (the message gives its position). Use printable ASCII only. |
PJ0011 | The project file '…' is format …; this compiler reads formats 1 to … | project.toml is in a format this adam does not read (the message gives the formats it reads). Use a newer adam, or a file of a format it reads. |
PJ0012 | Cannot save the project file '…': … | project.toml cannot be saved. Check that its folder can be written and that no program holds the file open. |
PJ0013 | Cannot look for a project file above '…': … | The search for a project.toml above a path failed (the path cannot be resolved). Check the path. |
PJ0014 | The folder '…' already exists: a new project needs a folder of its own | init found the new project's folder already there. A new project needs a folder of its own: choose another name, or move the folder. |
PJ0015 | Cannot create '…': … | init cannot create a folder or file of the new project (the message names it). Check that the place can be written. |
PJ0016 | Cannot make a pack password: … | init cannot make a pack password: the system's secure random generator failed. Try again. |
PJ0017 | The dependency '…' names the folder '…', which holds no project.toml | A [deps] entry names a folder that holds no project.toml (the message gives the folder). Fix the folder, relative to the project's own. |
PJ0018 | The dependency '…' names the folder '…', whose project is named '…' | A [deps] entry's name is not the name of the project in its folder (the message gives both). The key is the dependency's project name: spell it as its project.toml does. |
PJ0019 | The dependency '…' is an exe project: a dependency must be a dll or a lib project | A [deps] entry names an exe project. A dependency is a dll or a lib project: a program cannot be built into another. |
PJ0020 | The dependencies form a cycle: … | The [deps] entries form a cycle (the message gives the chain). A project cannot depend on itself, directly or through another: break the cycle. |
PJ0021 | The project file '…' already names the dependency '…' | deps add found the name already in [deps]. Remove it first, or choose another. |
PJ0022 | The project file '…' names no dependency '…' | deps remove found no such name in [deps] (adam deps list shows the names). |
PR
Reported by Compiler.Parser.
| Code | Message | Meaning |
|---|---|---|
PR0001 | expected …, found … | The parser expected one thing and found another (the message names both): a missing ;, end, then, ) and the like. Add what is expected, or remove what stands in its way; look at the line before too, where the real slip often is. |
PR0002 | expected a module kind (exe, dll, lib or unit), found … | The module header has no module kind. Write one of exe, dll, lib or unit after module (module exe hello;). |
PR0003 | the module '…' must be named as its file: '…' | The module's name differs from its file's name. Rename the module or the file so they match (the message shows the name the file asks for). |
PR0004 | the unit '…' cannot be the main module: a unit builds nothing of its own | A unit was given as the main module of a build. A unit builds nothing of its own: build the exe, dll or lib module that imports it. |
PR0005 | '…' is not a build directive | An @ word that is no build directive. Check the spelling against the directives on the reference page. |
PR0006 | '…' takes … | A directive's arguments do not fit its shape (the message shows what it takes). Write the arguments that directive expects. |
PR0007 | '…' is not a severity: hint, warn, error or fatal | An @message severity that is none of hint, warn, error or fatal. Use one of those. |
PR0008 | the build directive '…' stands only in the directive prologue, right after the module header | A build directive stands outside the directive prologue, the directives right after the module header. Move it up, below the module header and above the imports. |
PR0009 | invalid string literal: … | A string literal with no value: a bad escape sequence, or text that is not valid UTF-8 (the message says which). Fix the escape or the text. |
PR0010 | a module has one import clause, right after its directives | An import outside the module's one import clause. A module has one import clause, right after its directives: list every unit there. |
PR0011 | importing '…' makes a cycle: … | The imports form a cycle (the message shows it): units that import each other, directly or through others. Move the shared part into a unit both import, so the imports run one way only. |
PR0012 | the unit '…' is not found: no '…' in the importer's folder or the module paths | An imported unit is not found: no file of its name in the importer's folder or in the module paths. Check the unit's name, or add its folder with @addmodulepath. |
PR0012 | the runtime unit '…' is not found: no '…' in the module paths | |
PR0013 | only units can be imported: '…' is … | An import names a module that is no unit (an exe, dll or lib module). Only units can be imported: move the shared code into a unit. |
PR0014 | '…' is imported twice in the import clause | A unit is imported twice in the import clause. Remove the second one. |
PR0016 | only an exe has a begin body: … ends with 'end.' alone | A module other than an exe has a begin body. Only an exe runs a body: end a unit, dll or lib with end. alone (an initialize section runs code at load). |
PR0017 | an exe needs a begin body before its 'end.' | An exe module has no begin body. Add begin ... end. with the code the program runs. |
PR0018 | the … section is given twice | An initialize or finalize section given twice, or finalize before initialize. Keep one of each, initialize first. |
PR0018 | the initialize section comes before the finalize section | |
PR0019 | a test block stands after the module's 'end.' | A test block stands before the module's end.. Test blocks follow the module: move it after end.. |
PR0020 | only test blocks may follow the module's 'end.' | Something other than a test block follows the module's end.. Only test blocks may stand there: move the code inside the module, or remove it. |
PR0021 | string literal: … | Warning: a string literal holds an escape Adam does not know; the text is kept as written. Use a known escape, or double the backslash for a plain one. |
PR0022 | '…' path '…' cannot be resolved | A path directive's value cannot be resolved to a folder or file (the message shows it). Check the path and the prefix it starts with. |
PR0023 | '…' is the main module's only: a unit cannot give it | A unit gives a directive only the main module may give. Move it to the exe, dll or lib module of the build. |
PR0024 | 'public' must precede a var, const or type block, a routine or a forward, found … | public stands before something it cannot mark (another public, a body, a word). Put it right before a var, const or type block, a routine or a forward. |
PR0025 | a test takes one var block before its begin, found … | A const or type block before a method's begin, or a second var block in a test. A method takes only var blocks there, a test one var block: declare constants and types at module level. |
PR0025 | only var blocks stand before a method's begin, found … | |
PR0026 | a '…' type is declared in a type block (type Name = ...;) and used by its name | A record, object, overlay, choices or set type written inside another type expression. Declare it in a type block (type Name = ...;) and use its name. |
PR0032 | a record's words come in this order, each once: (parent), packed, align(...); found … | A record's prefix words out of order or repeated. They come in this order, each once: the parent in parentheses, packed, then align(...). |
PR0033 | '…' is not written on an overlay | packed or align written on an overlay or an object, which take neither. Remove the word; to lay out a value, use a record. |
PR0033 | '…' is not written on an object | |
PR0034 | '…' is not a member of … | A member this kind of type does not take (the message names it), or a word that member does not take. Remove it, or move it to a type that takes it. |
PR0034 | '…' does not go before … | |
PR0035 | a choices type names at least one value | A choices type with no values. Name at least one value. |
PR0038 | comparisons do not chain; join them with and, found … | Comparisons chained without and (a < b < c). Join them: (a < b) and (b < c). |
PR0039 | '…' is not Adam: Adam writes … | A C operator form (== or !=). Adam compares with = and <>. |
PR0041 | '…(...)' takes exactly one argument | A cast given more than one argument. A cast T(X) takes exactly one value. |
PR0042 | nested too deeply: more than … levels | Code nested deeper than the parser allows (the message gives the limit). Split the deep part into routines or name its pieces with local variables. |
PR0048 | '=' compares and the answer is dropped: write ':=' to assign | An expression statement whose operator is =: it compares, and the answer is dropped. To assign, write :=. |
PR0052 | a guard needs an except or a finally part | A guard with neither an except nor a finally part. Add one, or remove the guard. |
PR0053 | a set names its range or element type: set of 0..63, set of char | A bare set with no range or element type. Name one: set of 0..63, set of char. |
PR0054 | invalid character literal: … | A character literal with no value: empty, more than one character, or a bad escape (the message says which). Fix the literal; for text use a string. |
PR0055 | '…' is not a library name: … takes a name such as user32 or name.lib, never a path | An @linklibrary or external library value that is no library name: it is a path, or holds a blank. Give the library's name only (user32), and its folder with @addlibrarypath. |
PR0057 | '…' stands only at module level: a body's own declarations are its own | public before a block among a routine body's own declarations. A body's declarations are its own: public stands only at module level. |
PR0058 | '…' does not go before … | A word (such as virtual or hidden) before an init, copy or done, which take none. Remove the word. |
PR0059 | '…' has no … | An init or copy with a result type or ..., or a done with parameters or a result. Inits and copies return nothing; a done takes no parameters: remove what the message names. |
PR0060 | an interface's method or accessor has no body: its heading only | An interface method or accessor with a body or abstract. An interface member is a heading only: remove the body or the word. |
PR0061 | expected an accessor (a field, abstract, or a body), found … | A property written wrong: no read accessor, an accessor of another shape, an index passed by var, or an indexed property whose accessor is a field. Give it a read accessor (a field or a body), and bodies for an indexed one; pass its index by value or const. |
PR0061 | the write of '…' takes a field name or a value name and a body, found …: write write <field>; or write(AValue) begin ... end; | |
PR0061 | a property needs its read accessor (read Field; or read begin ... end;) | |
PR0061 | a property's index is passed by value or const | |
PR0061 | an indexed property's accessors are bodies: the field '…' cannot take its index (read begin ... end;) | |
PR0062 | … is not an operator a type declares: + - * / div mod = <> < <= > >= in hash | An operator a type cannot declare, or ... on an operator. A type declares + - * / div mod = <> < <= > >= in hash, with its operands only. |
PR0062 | an operator takes its operands only: no '...' | |
PR0063 | the '…' here is never closed | An opener (a parenthesis, bracket, begin and the like) is never closed before the end of the file; the message points at it. Add its closer. |
PR0064 | character literal: … | Warning: a character literal holds an escape Adam does not know; the character is kept as written. Use a known escape. |
PR0065 | '…' path '…' uses $R: (the project root), and this build has no project root: no project.toml is at or above the main module, or the main module is not its main | A path uses $R: (the project root), but this build has no project root: no project.toml is at or above the main module, or the main module is not its main. Build through the project, or use another path prefix. |
PR0066 | the file '…' cannot be read | A source file cannot be read (the message names it). Check that it exists and that nothing else holds it locked. |
PR0067 | '…' is not a symbol name: an external clause's name is the linker symbol, not empty, no blank or control character | An external clause's name "..." is no symbol name: it is empty, or holds a blank or control character. Give the linker symbol exactly as the library exports it. |
PR0068 | a member of an external type has no body: its heading only (the library has it) | A member of an external type has a body. The library holds the code: write the heading only. |
PR0069 | '…' cannot be external: only an object or an interface type is another binary's | A type made external that is no object or interface type. Only those can come from another binary; declare other types in Adam. |
PR0070 | '…' is an external type: its clause names a library, never a symbol (each member binds its own) | An external type's clause names a symbol (name "..."). The clause names the library only: each member binds its own symbol. |
PR0071 | '…' is generic: a generic type is never external (each instance is made where it is used) | A generic type made external. A generic type is never external: each instance is made where it is used. |
PR0072 | '…' does not go before … | A word a static method does not take, such as abstract, virtual or const. A static method has no self, so it has no dispatch: remove the word. |
PR0072 | 'abstract' does not go on a static method: it has no self, so no override can give it a body | |
PR0073 | doc comment documents nothing | Hint: a /// doc comment that documents nothing. A doc block goes directly above a declaration (a trailing /// documents its own line's declaration): move it there, or make it a plain // comment. |
SM
Reported by Compiler.Folding, Compiler.Layout, Compiler.Semantics, Compiler.Symbols.
| Code | Message | Meaning |
|---|---|---|
SM0001 | '…' is used in its own declaration | A name is used inside its own declaration (X: int32 = X + 1;). A declaration cannot read itself: use another name or value. |
SM0002 | '…' is used before its declaration: declare it first or add forward | A name is used before its declaration. Declare it first, or give a forward declaration above the use. |
SM0003 | '…' names itself in its own declaration: a type is complete only after it, so write 'forward type …;' before it | A type names itself inside its own declaration; a type is complete only after it. Write forward type Name; before it (a ptr to it can then be a field). |
SM0004 | '…' is already declared in this scope (first at line …) | A name declared twice in one scope, or two members of one type with one name (the message shows the first). Rename one; only methods share a name, as overloads. |
SM0004 | '…' is already a member of '…' (first at line …): a type's member names are unique, only its methods share one (they overload) | |
SM0005 | '…' has no '…' | A module has no declaration of that name (Unit.Name). Check the spelling, or the unit that declares it. |
SM0006 | '…' is not public in '…' | The name exists in the unit but is not public there. Mark it public in its unit, or use what the unit does make public. |
SM0007 | '…' is not an imported module | A dotted prefix that is no imported module: the unit is not imported, or a declaration of the same name hides it. Import the unit, or rename the declaration. |
SM0007 | '…' here is the declaration at line …, no module: it hides the imported module of that name | |
SM0008 | a qualified type has exactly two parts: Module.Type | A qualified type with more parts than Module.Type. A type is reached as Module.Type; its members follow as values, not as more type parts. |
SM0009 | '…' has no member '…' | A type has no member of that name. Check the spelling, or the type the value really has. |
SM0010 | choices '…' has no value '…' | A choices type has no value of that name. Check the spelling against the choices type's values. |
SM0011 | '…' names no object here: only a method, an init, a copy, a done or a property accessor of a type has one | self or parent where there is no object: outside a method, init, copy, done or property accessor, or inside an operator (whose operands are its parameters). Use the routine's parameters there. |
SM0011 | '…' names no object here: an operator has no self, its operands are its parameters | |
SM0012 | parent: '…' has no parent type | parent in a method of a type that has no parent type. Remove it, or give the type a parent. |
SM0013 | '…' is not a type | A name in a type's place that is no type (a variable, routine or constant). Use a type name there. |
SM0014 | '…' is a module or a type: reach its names with '.' | -> on a module or a type. -> follows a pointer; a module's or a type's names are reached with .. |
SM0015 | '…' is a choice value: write ….… | A choice value written bare. Write it with its type, Color.Red (the message shows the form). |
SM0016 | parent is written only as parent.<member>: it names an inherited member, it is no value | parent used as a value. It names an inherited member only: write parent.Member. |
SM0017 | '…' starts with '…', which the compiler keeps for the symbols it makes: name it otherwise | A declared name starts with the prefix the compiler keeps for the symbols it makes. Name it otherwise. |
SM0018 | '…' is a member of '…': write self.… | A member of the method's own type written bare. Write it through self: self.Member. |
SM0019 | '…' is hidden in '…': only the methods of '…' and of its descendants reach it | A hidden member reached from outside its type's methods (or its descendants'). Use the type's public members, or reach it from one of its methods through self. |
SM0019 | '…' is hidden in '…': a method of '…' reaches it only through self or a '…' value | |
SM0021 | '…' is not declared | A name declared nowhere in reach. Check the spelling, declare it, or import the unit that declares it. |
SM0022 | invalid string literal for '…': … | A string literal that cannot be written in the type it is used as (the message says why, for example a character that type cannot hold). Change the text or the type. |
SM0023 | invalid character literal for '…': … | A character literal that cannot be written in the type it is used as (the message says why). Change the character or the type. |
SM0024 | symbol '…' is defined twice: '…' defines it already | Two definitions give the linker one symbol (the message names both): two routines or variables whose link names are the same, or two that define one C symbol. Rename one, or keep a single definition of the C name. |
SM0024 | C symbol '…' is defined twice: '…' defines it already | |
SM0100 | '…' is not a value of …: it takes … | A directive given a value it does not take (the message lists the values it takes). Use one of those. |
SM0101 | … takes 0..65535, not … | A version directive (@vimajor, @viminor, @vipatch) past 65535. Use 0 to 65535. |
SM0102 | … is already given at line … | A directive that takes one value is given twice in one module (the message shows the first). Keep one. |
SM0103 | … does not apply to …: it is not used | Warning: a directive this module kind or target does not use; it has no effect. Remove it, or move it to the module it is meant for. |
SM0104 | … has no effect without @addverinfo on | Warning: a version-info directive with no @addverinfo on, so it has no effect. Add @addverinfo on;, or remove the directive. |
SM0108 | … | An @message in the source: the text and the severity are the module's own. Read the text: it says what the module's author wants done. |
SM0109 | @breakpoint in the directive prologue has no effect: it stops a program where it stands among statements | Warning: @breakpoint in the directive prologue, where it does nothing. Put it among statements, where the program should stop. |
SM0110 | @unitTestMode is an exe's: … runs no tests | @unitTestMode in a module that is no exe. Only an exe runs tests: put it in the exe module. |
SM0111 | a test's name is empty | A test with an empty name. Give each test a name. |
SM0112 | the test '…' is already in this module (line …) | Two tests of one module with one name (the message shows the first). Rename one. |
SM0113 | the tests of … never run: no program runs them | Warning: a dll or lib module has tests, which never run: no program runs them. Move them to a test exe that imports the code. |
SM0119 | @addresdata: the key is empty or holds a control character | An @addresdata key that is empty or holds a control character. Give it a plain, non-empty key. |
SM0120 | @addresdata: the key '…' starts with 'adam/', the compiler's own keys | An @addresdata key that starts with adam/, which the compiler keeps for its own keys. Choose another key. |
SM0121 | @addresdata: the key '…' is already added to this build (line …) | An @addresdata key added twice in one build (the message shows the first). Keep one, or rename the other. |
SM0122 | no @addresdata of this build adds the key '…': it is never found | Warning: a literal resource key that no @addresdata of the build adds, so it is never found. Add it with @addresdata, or fix the key's spelling. |
SM0123 | … takes …: '…' is not one | A version-info or @exeicon directive names a constant of the wrong kind (the message says what it takes: an integer, or a string constant). |
SM0124 | '…' path '…' (the value of '…') uses $R: (the project root), and this build has no project root: no project.toml is at or above the main module, or the main module is not its main | A directive's constant holds a path with $R: (the project root), but this build has no project root: no project.toml is at or above the main module, or the main module is not its main. Build through the project, or use another path prefix. |
SM0125 | '…' path '…' (the value of '…') cannot be resolved | A directive's constant holds a path that resolves to no folder or file. Check the constant's value and its prefix. |
SM0200 | … does not fit in '…' (…..…) | A value that does not convert implicitly to the type it is used as, or a constant that does not fit its type's range (the message shows the types, or the range). Write the explicit cast the message suggests, or use a value or a type that fits. |
SM0200 | '…' does not convert implicitly to '…'; write … | |
SM0200 | '…' does not convert implicitly to '…' | |
SM0202 | … must be a constant | A place that needs a constant holds an expression that is not one: a constant's value, a choices value, a match label, an array bound and the like. Use a literal, a declared constant, or an expression made of constants only. |
SM0250 | operator '…' does not take '…' | An operator that does not take its operand types (the message names them), or member access on a pointer without ^. / ->. Convert an operand, use the operator the types take, or write the form the message shows. |
SM0250 | operator '…' does not take '…' and '…' | |
SM0250 | '…' is an untyped ptr and points at no type: cast it to a typed pointer first (ptr to T(…)) | |
SM0250 | '…' is a pointer: write …^.… or …->… | |
SM0251 | '…' would convert signed '…' to unsigned '…': write …(...) | A signed operand that the common type would make unsigned, changing a negative value. Write the cast the message shows to say it is meant. |
SM0252 | operator '…' cannot compare '…': an object compares only through an operator its type declares | A record, overlay or object compared with no operator declared for it. Records and overlays are not comparable: compare their fields; an object compares only through an operator its type declares. |
SM0252 | operator '…' cannot compare '…': records and overlays are not comparable, compare their fields | |
SM0253 | '…' is an untyped ptr and points at no type: cast it to a typed pointer first (ptr to T(…)) | ^ or [i] on the untyped ptr, which points at no type. Cast it to a typed pointer first (ptr to T(P)). |
SM0254 | '…' has no address: only a variable, a field, an element or a dereference has one | The address of a value that is not stored (a call's result, a literal, an expression). Only a variable, a field, an element or a dereference has an address: store the value in a variable first. |
SM0255 | '…' cannot be assigned | An assignment to something that cannot be assigned (a constant, a const parameter, a call's result). Assign to a variable or a field. |
SM0256 | constant overflows '…' | A constant expression overflows its type when the compiler works it out. Use a wider type for its operands, or values whose result fits. |
SM0257 | '…' by zero | An integer div or mod by a constant zero. Fix the divisor. (Float / by zero is allowed: it gives an infinity or a NaN, as IEEE 754 says.) |
SM0258 | '… … -1' overflows '…' | A signed type's lowest value div or mod -1: the true quotient is one past the type's highest value, so the division overflows. Use a wider type, or keep that pair of values apart. |
SM0259 | shift count … outside 0..… | A constant shift count outside 0 to the operand's bit width minus one (the message shows the range). Use a count in that range. |
SM0260 | '…' cannot be indexed | A value that cannot be indexed. Only arrays, strings and the like take [i]; check the value's type. |
SM0261 | an index of '…' is a '…' value, got '…' | An index of the wrong type (the message shows the type wanted). Index with an integer, or a value of the array's index type. |
SM0261 | an index is an integer, got '…' | |
SM0262 | the bitfield '…' has no address: it cannot be taken with 'addr of' or passed to a var parameter | The address of a bitfield, taken with addr of or by passing it to a var parameter. A bitfield has no address: copy it into a variable first. |
SM0263 | a condition is bool, got '…' | A condition that is no bool (if N then with an integer N). Compare it: if N <> 0 then. |
SM0264 | '…' cannot be cast to '…' | A cast that does not take that value (the message names both types). Cast through a type both convert to, or convert the value another way. |
SM0265 | '…' cannot be cast to '…': a pointer cast takes a pointer that keeps const, or an integer of pointer width | A pointer cast of a value it does not take. A pointer cast takes a pointer that keeps its const, or an integer of pointer width. |
SM0266 | '…' is not an ordinal type: a set holds integers, chars, bools or choices | A set literal element that is no ordinal value, or elements of two ordinal types. A set holds integers, chars, bools or choices of one type. |
SM0266 | set literal elements are of different ordinal types: '…' and '…' | |
SM0267 | low bound … is above high bound … | A match label or set literal range whose low bound is above its high bound. Swap them, or fix the one that is wrong. |
SM0268 | 'in': '…' is not the element type of '…' | in with a value that is not of the set's element type. Test a value of that type, or cast it. |
SM0269 | '…' is a module, not a value | A type or a module used as a value. Use a value of the type, or one of the module's declarations. |
SM0269 | '…' is a type, not a value | |
SM0270 | var parameter '…' cannot take '…': a packed record holds it, it may be misaligned | A field of a packed record bound by address (addr of, a var argument and the like); it may be misaligned there. Copy it into a variable, work on that, and write it back. |
SM0270 | '…' cannot be used as '…': packed '…' holds that part, it may be misaligned | |
SM0270 | cannot take the address of '…': a packed record holds it, it may be misaligned | |
SM0270 | '…' cannot write to '…': a packed record holds it, it may be misaligned | |
SM0271 | '…' tests a polymorphic object (one with a virtual method) or a ptr to, own or ref of one; '…' is '…' | is / as on a value that is no polymorphic object (one with a virtual method), nor a ptr to, own or ref of one. Only those carry the type facts the test reads. |
SM0272 | '… …': '…' is not an object or an interface type | is / as names a type that is no object or interface type. Name one of those. |
SM0273 | '…' never holds: a '…' is never a '…' | is / as that can never hold: no object is of both types. Check the types, or remove the test. |
SM0274 | '…' holds exactly a '…', never a '…': only a var or const parameter, a deref, self, or a ptr, own or ref may hold a descendant | is / as that can never hold: the operand holds exactly its declared type, never a descendant. Only a var or const parameter, a deref, self, or a ptr, own or ref may hold a descendant. |
SM0275 | '…' is a weak: test lock(…) instead | is / as on a weak reference. Test what it locks to: lock(W) (the message shows the form). |
SM0276 | index … is outside '…' (…..…) | A constant index outside a static array's bounds (the message shows them). Use an index in range. |
SM0277 | '…' is too large: a type holds at most … bytes | A type is larger than a type may be (the message gives the limit in bytes). Make it smaller, or hold the data in a dynamic array allocated at run time. |
SM0300 | '…' is only forward-declared: use ptr to … or declare it first | A forward-declared type held by value before its full declaration, when its size is not known yet. Use ptr to T there, or move the full declaration above. |
SM0301 | an external variable takes no initializer: its value is the one its library gives it | An external variable given an initializer. Its value is the one its library gives it: remove the initializer. |
SM0302 | external variable '…' is declared at module level only | An external variable declared inside a routine. Declare it at module level. |
SM0303 | forward type '…' has no full declaration here | A forward type with no full declaration in its scope. Add the full declaration in the same type section scope, or remove the forward. |
SM0304 | '…' is already declared: a forward after its full declaration declares nothing (full declaration at line …) | A forward type after its full declaration, where it declares nothing (the message shows the full one). Remove the forward. |
SM0305 | a forward type is completed by a record, object or overlay (the forward of '…' at line …) | A forward type completed by something that is no record, object, interface or overlay. Only those take a forward declaration. |
SM0306 | forward and full declaration of '…' differ: … (forward at line …) | A forward declaration and its full declaration differ (one public and not the other, or another shape; the message says what). Make them say the same. |
SM0307 | forward routine '…' has no matching full declaration | A forward routine that no full declaration pairs with (the message may show the nearest one). Give the full routine the same name, parameters and result. |
SM0307 | forward routine '…' has no matching full declaration (nearest full declaration at line …) | |
SM0308 | '…' is an interface: an object never names it as its parent, write 'implements …' | A parent of the wrong kind: an object names a non-object (an interface goes after implements), or a record names a non-record. Name a parent of the same kind. |
SM0308 | '…' is no object type: an object's parent is an object | |
SM0308 | '…' is no record type: a record's parent is a record | |
SM0309 | '…' is a member name of its parent '…' or a type above it: a name is unique down the parent chain, but a method may reuse a parent method's and a property a parent property's | A member reuses a name of its parent type or a type above it. Names are unique down the parent chain; only a method may reuse a parent method's name, and a property a parent property's. Rename the member. |
SM0310 | align … is not a power of two | The align value is not a power of two. Use 1, 2, 4, 8 and so on, up to 8192. |
SM0311 | align … is below the natural alignment … of '…', lower it with packed | align below the type's natural alignment (the message shows it). align only raises alignment: to lower it, use packed. |
SM0312 | align … exceeds 8192 | The align value is past 8192, the largest alignment. Use at most 8192. |
SM0313 | field '…' of '…' cannot share an overlay's storage: '…' holds a string or dynamic array, hold a ptr to it | An overlay field is or holds a string or a dynamic array. An overlay's fields share their storage, which a managed value cannot: hold a ptr to the data instead. |
SM0314 | a bitfield is an integer, bool, char, wchar or choices field | A bitfield (f: T : N;) of a type that takes no width. A bitfield is an integer, bool, char, wchar or choices field. |
SM0315 | bitfield width … outside …..… | A bitfield width outside 1 to its type's bit count (the message shows the range). Use a width in that range. |
SM0316 | bitfield width … does not hold the ordinals of '…' as signed values | A choices bitfield too narrow to hold every ordinal of its type as a signed value. Widen the bitfield. |
SM0318 | a set of integers names its range: set of 0..255 | A set of an integer type. A set of integers names its range: set of 0..255. |
SM0319 | set of wchar: its member count differs by target: write set of 0..65535 | A set of wchar: its member count differs by target. Name the range instead (set of 0..65535). |
SM0320 | set range bounds are integer, char or choices of one family | A set range whose bounds are of different families. Both bounds are integers, both chars, or both values of one choices type. |
SM0321 | a set has at most 65536 members, this range has … | A set with more than 65536 members (the message gives the count). Narrow its range. |
SM0322 | array bounds are integer, char or choices of one family | Array bounds of different families. Both bounds are integers, both chars, or both values of one choices type. |
SM0323 | '…' is overloaded: C linkage dropped, it gets C++ linkage | Warning: an overloaded clink routine. C has one plain name per routine, so the overloads get C++ linkage instead. Give each overload its own name if C must call it, or mark it cpplink to say so. |
SM0324 | '…' is already declared with these parameter types | A routine, method or init declared again with the same parameter types (the message shows the first). Overloads differ by parameter types: change them, or rename one. |
SM0324 | '…' has a method '…' with these parameter types already (line …): methods overload by parameter types | |
SM0324 | '…' has an init with these parameter types already (line …): inits overload by parameter types | |
SM0325 | '…' has C linkage and a body: it needs a fixed parameter before '...' (C reads the extra arguments from the last fixed one) | A clink variadic routine with a body and no fixed parameter before .... C reads the extra arguments from the last fixed one: add a fixed parameter. |
SM0326 | '…' must be a const string (external library) | An external clause's library is no const string. Write the library name as a string literal or a string constant. |
SM0327 | '…' is not a library name: external takes a name such as ucrtbase or user32, never a path | An external clause's library is no library name: it is a path, or holds a blank. Give the name only (user32), and its folder with @addlibrarypath. |
SM0328 | low bound … is above high bound … | A range whose low bound is above its high bound. Swap them, or fix the one that is wrong. |
SM0329 | a set element is char, bool or choices: '…' is not | A set of a type that is no char, bool or choices type (an integer set names its range, set of 0..255). Use one of those as the element type. |
SM0330 | variadic routine '…' cannot share its name with another routine (line …) | A variadic routine shares its name with another routine. A variadic routine does not overload: give it its own name. |
SM0331 | field '…' of packed record '…' cannot be packed: '…' holds a string or dynamic array | A packed record's field is or holds a string or a dynamic array, which cannot be packed. Move the field out of the packed record, or hold a ptr to the data. |
SM0332 | '…' is virtual in '…': write 'override method …' | A method or property of a parent's virtual name, declared without override. To replace the parent's, write override method / override property (the message shows it); otherwise rename it. |
SM0332 | '…' is virtual in '…': write 'override property …' | |
SM0333 | '…' overrides nothing: no level above '…' has a virtual method '…' of these parameter types | override where no type above has a virtual method of these parameter types (or a virtual property of that name). Check the name and parameters, or drop override. |
SM0333 | '…' overrides nothing: no level above '…' has a virtual property '…' | |
SM0334 | '…' must have the type, index and write of '….…' it overrides | An override that differs from what it overrides: other parameters or result, or for a property another type, index or write. Match the overridden one. |
SM0334 | '…' must take the parameters and return the type of '….…' it overrides | |
SM0335 | '….…' is final: it cannot be overridden | An override of a final method or property. A final member cannot be overridden: rename yours, or remove final above. |
SM0336 | 'final' closes a virtual method: write 'virtual final method' or 'override final method' | final on what is not virtual or an override. final closes a virtual member: write virtual final method or override final method (or property). |
SM0336 | 'final' closes a virtual property: write 'virtual final property' or 'override final property' | |
SM0337 | an abstract method is virtual: write 'virtual method …' | abstract on what is not virtual. An abstract method is virtual: write virtual method (an abstract accessor belongs to a virtual property). |
SM0337 | an abstract accessor belongs to a virtual property: write 'virtual property …' | |
SM0338 | '…' is an interface: it is reached through var, const, ptr to, own or ref, never held by value or created | An abstract object (one with a method that has no body) or an interface held by value or created. Build a descendant that gives every body; reach an interface through var, const, ptr to, own or ref. |
SM0338 | '…' is abstract ('….…' has no body): it cannot be held by value or created | |
SM0339 | '…' is final: no type may extend it | A final object type named as a parent. No type may extend a final one: extend another type, or remove final. |
SM0340 | '….…' is abstract: it has no body to call | parent.M() of an abstract method, which has no body to call. Remove the call. |
SM0341 | '…' declares done twice: an object has one done | A type declares done twice. An object has one done: merge them. |
SM0342 | init runs when an object is built: it is never called (only parent.init(...) and self.<field>.init(...) begin an init) | An init or copy called by hand. Init runs when an object is built and copy when it is copied; only parent.init(...) and self.F.init(...) begin an init. |
SM0342 | copy runs when an object is copied (:=, a value argument): it is never called | |
SM0343 | done runs when an object ends: it is never called | A done called by hand. Done runs when the object ends: remove the call. |
SM0344 | parent.init(...) is the first statement of an init | parent.init(...) that is not the first statement of an init. Move it to the top. |
SM0345 | self.….init(...) is written twice: a field is built once | self.F.init(...) given twice, or out of the fields' declared order. Build each field once, in declaration order, right after parent.init(...). |
SM0345 | self.….init(...) comes after self.….init(...): fields are built in declaration order | |
SM0346 | '…' does not exist yet: the arguments of …(...) run before the object is built | A lead call's argument names self, parent or a local of the init. Those do not exist yet: the lead call's arguments run before the object is built. Use the init's parameters. |
SM0347 | '…' has no init without arguments: begin every init of '…' with parent.init(...) | A field or parent part whose type has no init without arguments, and no lead call builds it. Begin every init with self.F.init(...) or parent.init(...) as the message shows. |
SM0347 | field '…': '…' has no init without arguments: begin every init of '…' with self.….init(...) | |
SM0348 | '…' is virtual: in an init, a copy or a done a call does not dispatch, call a plain method or parent.…() | A virtual method called through self in an init, a copy or a done, where a call does not dispatch. Call a plain method, or parent.M(). |
SM0349 | '…' has no init without arguments: build it with arguments, …(...) | An object built without arguments when its type has no init without them. Build it with arguments: T(...). |
SM0350 | '…' takes no init arguments: only an object has an init | Init arguments on a type that is no object. Only an object has an init: build other values with a literal or by assignment. |
SM0351 | '…' declares no init: it is built without arguments | No init of the object takes these arguments (or it declares none). Pass the arguments an init declares. |
SM0351 | no init of '…' takes (…) | |
SM0352 | the arguments (…) fit more than one init of '…': convert them to pick one | The arguments fit more than one init. Convert them to the parameter types of the one you mean. |
SM0353 | a copy takes one const parameter of its own type: copy(const ASource: …) | A copy that takes other than one const parameter of its own type. Write copy(const ASource: T). |
SM0354 | '…' declares a copy already: one copy per type | A type declares a second copy. One copy per type: merge them. |
SM0355 | '…' cannot be copied, so its descendant '…' cannot declare a copy | A copy declared in a type whose parent cannot be copied. A descendant of a non-copyable type cannot be copied either: drop the copy. |
SM0356 | a copy copies the parent part by the parent's own copy: parent.init(...) is not written in a copy | parent.init(...) in a copy. The parent part is copied by the parent's own copy: remove the call. |
SM0357 | field '…' of '…' holds an object or an own / ref / weak: a record or an overlay holds none | A record or overlay field holds an object, or an own / ref / weak value. A record or overlay holds none: make the holder an object type, or keep that value outside it. |
SM0358 | '…': own, ref and weak hold an object, and '…' is none | own, ref or weak of a type that is no object. They hold objects only: hold other values directly, or through ptr to. |
SM0359 | '…' builds nothing: a weak watches an object a ref holds (build it with ref …(...)) | weak T(...): a weak builds nothing; it watches an object a ref holds. Build the object with ref T(...) and make the weak from it. |
SM0360 | '….…': a weak may watch an object that is gone: read it through lock(…), which is nil then | A member read straight through a weak, whose object may be gone. Read it through lock(W), which is nil then. |
SM0361 | create does not build an object ('…' is one): write own …(...) or ref …(...) | create or destroy on an object. Objects are built and freed by what holds them: write own T(...) or ref T(...), and let the owner free it. |
SM0361 | destroy does not free an object ('…' is one): the own or ref that holds it frees it | |
SM0362 | '…' is not an interface: implements names interfaces only | A name after implements that is no interface. implements names interfaces only; a parent object goes in parentheses. |
SM0363 | '…' is named twice after implements of '…' | An interface named twice after implements. Name it once. |
SM0364 | '…' does not implement '….…': declare virtual method … with its parameters and result | The object does not implement a member of an interface it names. Declare that virtual method or virtual property with the interface's shape. |
SM0364 | '…' does not implement '….…': declare virtual property … with its type and accessors | |
SM0365 | '….…' implements '….…': write 'virtual method …' | A method or property that implements an interface member but is not virtual. Write virtual method / virtual property. |
SM0365 | '….…' implements '….…': write 'virtual property …' | |
SM0366 | '….…' does not implement '….…': its type, index or write differ | A method or property meant to implement an interface member, with another shape (parameter modes, result, or a property's type, index or write). Match the interface. |
SM0366 | '….…' does not implement '….…': its parameter modes or result differ | |
SM0367 | '….…' implements '….…': an interface member is never hidden | A hidden method or property that implements an interface member. An interface member is never hidden: remove hidden. |
SM0368 | method '…' of interface '…' is already declared by its parent '…' | An interface repeats a method its parent interface declares already. Remove the repeat. |
SM0369 | embed '…' holds '…': an embed is a record, an overlay or an object, whose members its object reaches | An embed of a type that is no record, overlay or object. An embed holds one of those, whose members its object reaches. |
SM0370 | '…' is reached through two embeds, '…' and '…': name one, as ….….… | A name reached through two embeds. Name the embed you mean (the message shows the form), or declare a virtual method that chooses one. |
SM0370 | '….…' is reached through two embeds of '…', '…' and '…': declare virtual method … to choose one | |
SM0371 | property '…' binds '…', which is no field of '…': name a field, or write the accessor with a body | A property accessor names something that is no field of its object. Name a field, or write the accessor with a body. |
SM0372 | property '…' is '…', and its field '…' is '…': a bound field has the property's type | A property whose bound field has another type than the property. A bound field has the property's type: change one, or write the accessor with a body. |
SM0373 | the read of '…' cannot change '…': a read changes nothing of its object | A property read that changes its object (an assignment, or a call of a method through self that may change it). A read changes nothing: move the change out. |
SM0373 | the read of '…' cannot call method '…' through self: a read changes nothing of its object | |
SM0374 | the write of '…' assigns the property again, forever: assign its field | A property read in its own read, or assigned in its own write: it would recurse forever. Read or assign its field there. |
SM0374 | the read of '…' reads the property again, forever: read its field | |
SM0375 | property '…' has no write: it is read-only | An assignment to a property that has no write: it is read-only. Assign the field or call a method that sets it. |
SM0376 | '…' is a property, not storage: … needs a variable (read it into one, or assign the property) | A property used as storage (addr of it and the like). A property is no storage: read it into a variable, or assign the property. |
SM0377 | an assignment to property '…' is a statement: its write has no value | An assignment to a property used as a value. Assigning a property is a statement: do it on its own line. |
SM0378 | property '…' is indexed: write …[<index>] | An indexed property used without its index. Write P[index]. |
SM0379 | property '…' has no index: default names an indexed property, which X[i] means | default on a property with no index, or a second default in a type. Only one indexed property is the default, the one X[i] means. |
SM0379 | property '…' is a second default of '…': '…' is its default already | |
SM0380 | operator '…' takes … | An operator declared with the wrong number of operands (the message says how many it takes). |
SM0381 | operator '…' of '…' takes no '…': one of its operands is the type that declares it | An operator none of whose operands is the type that declares it. One operand is always the declaring type. |
SM0382 | operator 'hash' gives a uint64, not '…' | A comparison or in operator that does not give bool, or hash that does not give uint64. Return the type the message names. |
SM0382 | operator '…' gives a bool, not '…' | |
SM0383 | operator '…' of '…' is declared twice with these operand types | An operator declared twice with the same operand types. Remove one. |
SM0383 | operator '…' of '…' is declared here | |
SM0384 | operator '…' takes its operands by value or const, not var ('…') | An operator operand passed var. Operators take their operands by value or const. |
SM0386 | operator '…' of '…' needs its pair: declare operator '…' with the same operand types | = declared without <> (or <> without =) for the same operand types. Declare its pair. |
SM0387 | '…' is a const method: it cannot change '…' (it changes nothing of its object) | A const method that changes its object. Make it a plain method, or move the change out. |
SM0388 | '…' is a const method: it cannot call '…' through self, which is not const | A const method that calls a non-const method through self. Call only const methods there, or make this one plain. |
SM0389 | '…' must be …, as '…' of '…' is: an override or an implementing method keeps the const of the method it continues | An override or interface implementation that does not keep the const of the method it continues. Match it: const where that one is const, plain where not. |
SM0400 | '…' is not callable: its type '…' is not a routine type | A call of a value that is no routine. Check the name: only a routine or a value of a routine type can be called. |
SM0401 | '…' takes at least … argument(s), … given | A call with the wrong number of arguments (the message gives both counts). Pass what the routine takes. |
SM0401 | '…' takes … argument(s), … given | |
SM0402 | no overload of '…' takes (…) | No overload of the routine takes these arguments (the message shows their types). Convert an argument, or call the overload you mean with its parameter types. |
SM0403 | the arguments (…) fit more than one overload of '…': convert them to pick one | The arguments fit more than one overload, none better. Convert them to the parameter types of the one you mean. |
SM0404 | argument … of '…': '…' does not convert implicitly to '…'; write … | An argument that does not convert to its parameter, or does not fit it (the message names the argument). Convert it, as the message suggests, or pass a value that fits. |
SM0404 | argument … of '…': '…' does not convert implicitly to '…' | |
SM0404 | argument … of '…': … does not fit in '…' (…..…) | |
SM0405 | var parameter '…' needs a variable of type '…' | A var parameter given something that is no variable of its type. Pass a variable of exactly that type. |
SM0406 | '…' calls a procedure: it has no value | A call of a routine with no result used as a value. Call it as a statement. |
SM0408 | '…' is a statement, not a value | A statement intrinsic used as a value. Call it as a statement. |
SM0409 | '…' takes … | An intrinsic given arguments it does not take (the message shows what it takes). |
SM0410 | size takes a type, and '…' is a value: write size(its type) | size given a value. It takes a type: write size(T) with the value's type. |
SM0411 | '…' is a type, not a value: '…' here is a routine, which hides the intrinsic of that name | A type passed to a routine that hides an intrinsic of the same name. Rename the routine, or pass it a value. |
SM0412 | a cast '…(...)' takes exactly one argument, given … | A cast T(...) given other than one argument. A cast takes exactly one value. |
SM0413 | a record literal needs a record type, got '…' | A record literal for a type that is no record. Use a record type, or build the value another way. |
SM0414 | record literal: '…' has no field '…' | A record literal names a field its type does not have. Check the field name. |
SM0415 | record literal: field '…' is given twice | A record literal gives one field twice. Give it once. |
SM0416 | record literal: field '…' comes before '…' in '…': give the fields in their declared order | A record literal gives its fields out of their declared order. Give them in the order the record declares them. |
SM0417 | varargs outside a variadic routine | varargs outside a variadic routine. Only a routine with ... has them. |
SM0418 | varargs.… needs a cpplink variadic: a C caller passes no types or count | A varargs member other than next in a clink variadic. A C caller passes no types or count: make the routine cpplink to use the others. |
SM0422 | 'varargs' is only the type of a variadic routine's local, set from a varargs.copy() | varargs as a type anywhere but a variadic routine's local set from varargs.copy(). |
SM0423 | '…' is an intrinsic: it is called, never a value | An intrinsic named as a value. An intrinsic is called, never stored: wrap it in a routine to pass it around. |
SM0425 | '…' cannot be printed: an overload set or a method has no single address | A print argument with no print form: a record, object or overlay, an overload set or a method. Print its fields or a value made from it. |
SM0425 | '…' cannot be printed: print the fields of a record, object or overlay | |
SM0426 | method '…' may change its object, which is const here: pass it var | A method that may change its object, called on a const object. Pass the object var, or make the method const if it changes nothing. |
SM0427 | '…' would be copied here, and '…' cannot be copied: an own moves only from a call, a construction or return of a local | A value that cannot be copied, passed or assigned by value (an own, or an object with a done and no copy). Move it from a call or construction, pass it var or const, or give its type a copy. |
SM0427 | '…' would be copied here, and '…' cannot be copied: give it a copy, or move it (a call, a construction or return of a local) | |
SM0427 | '…' ends by a done and declares no copy | |
SM0427 | '…' holds a '…' here, which cannot be copied | |
SM0428 | '…' would be cut down to its '…' part here (it is polymorphic): pass it var / const, or through a pointer | A polymorphic object passed by value where it would be cut down to its parent part. Pass it var or const, or through a pointer. |
SM0428 | '…' may be a descendant of '…' here (a var or const parameter, a deref, self or an as): a copy by value would keep only its '…' part | |
SM0429 | '…' may be a descendant of '…' here (a var parameter, a deref, self or an as): an assignment would change only its '…' part | A polymorphic object assigned whole where it may be a descendant: only its parent part would change. Assign through a method, or work on the exact type. |
SM0430 | no operator '…' declared for these operands takes (…) | No operator declared for these operand types takes them. Declare one, or convert the operands. |
SM0430 | operator '…' of '…' takes (…) | |
SM0431 | several operators '…' take (…) alike: give the operands their exact parameter types | Several declared operators take the operands alike. Give the operands their exact parameter types. |
SM0431 | operator '…' of '…' takes (…) | |
SM0432 | '…' is a method: it runs on its object and has no routine value, call it (a 'ref func' of its shape takes it bound to its object) | A method named as a value where no closure of its shape binds it, or whose object does not live in a ref block. Bind it through a ref or own (or self in a ref object's method) into a ref func of its shape. |
SM0432 | '…' is bound to its object, which must live in a ref block: reach it through a ref / own (or self in a ref object's method), never a value | |
SM0433 | '…' is only in a project build: the main module of a project.toml and the units it imports | ProjectPassword() outside a project build. It exists only in the main module of a project.toml and the units it imports: build through the project. |
SM0434 | varargs.clist() needs a clink variadic: a cpplink variadic's arguments are a typed pack, not a C va_list | varargs.clist() in a cpplink variadic, whose arguments are a typed pack, not a C va_list. Use it in a clink variadic. |
SM0500 | format string '…' is of type '…', not string: print, println and FormatStr take their format as a string | A print or FormatStr format that is no string (an integer, a wstring, a C string). The format is a string: convert it, or pass it as an argument of a string format. |
SM0502 | format string … does not fit the … argument(s) after it: each … takes the next argument, and its format spec must suit that argument's type | A format string that does not fit its arguments: each {} takes the next argument, and its format spec must suit that argument's type. Match the holes to the arguments. |
SM0600 | for needs a variable: '…' is … | A for loop whose iterator is no variable. Name a variable there. |
SM0601 | a for iterator is an integer, char, wchar or a choice, got '…' | A for iterator that is no integer, char, wchar or choices value. Use one of those (for .. in walks other things). |
SM0602 | '…' is the for iterator: the loop body cannot write it | The for iterator is written inside its loop. The loop owns it: use another variable, or a while loop. |
SM0603 | a match subject is an integer, char, wchar, a choice, a string or a wstring, got '…' | A match subject that is no integer, char, wchar, choices, string or wstring value. Match on one of those. |
SM0604 | match label … is outside '…': it never matches | A match label outside the subject's range, so it never matches. Remove or fix it. |
SM0605 | match label … repeats label … (first at line …) | A match label repeats a value an earlier label has (the message shows it). Remove the repeat. |
SM0606 | match on '…' does not cover: … | Warning: a match on a choices value with no else misses values (the message lists them). Add labels for them, or an else. |
SM0607 | leave outside a loop or match | leave outside a loop or match. It leaves the innermost loop or match: use it there, or return to leave the routine. |
SM0608 | skip outside a loop | skip outside a loop. It goes to the next pass of the innermost loop: use it inside one. |
SM0609 | … cannot jump out of finally | leave, skip or return out of a finally part. A finally part runs to its end: move the jump out of it. |
SM0610 | return needs a value of type '…' | A return with no value in a routine that returns one. Return a value of the result type. |
SM0611 | return takes no value here | A return with a value in a routine that returns none. Drop the value, or give the routine a result type. |
SM0612 | missing return: '…' can reach its end without returning a value | A routine with a result can reach its end without a return. Return a value on every path, or end the path with a raise. |
SM0613 | statement has no effect: its value is computed and dropped | A statement with no effect: its value is computed and dropped. Assign it, use it, or remove it. |
SM0615 | …() reads the exception being handled: it is called inside an except body only | exccode() or excmsg() outside an except body. They read the exception being handled: call them inside the except part. |
SM0620 | … takes a mutex variable, field or element, not '…' | lock or trylock on something that is no mutex variable, field or element. Lock the mutex itself. |
SM0621 | '…' of type '…' holds a mutex, which is never assigned | A value holding a mutex copied, assigned, initialized or passed by value. A mutex stays where it is: pass its holder var or const, or through a pointer. |
SM0621 | variable '…' of type '…' holds a mutex: it starts unlocked and takes no initializer | |
SM0621 | parameter '…' of type '…' holds a mutex, which is never copied: make it a var parameter | |
SM0621 | '…' returns '…', which holds a mutex: a mutex is never copied | |
SM0622 | unreachable statement: the statement before it ends the path (return, raise, leave, skip, a noreturn call or an endless loop), so it and what follows never run | Warning: an unreachable statement. The one before it ends the path (return, raise, leave, skip, a noreturn call or an endless loop), so it never runs: remove it or move it above. |
SM0623 | '…' is noreturn but its body can reach its end | A noreturn routine whose body can reach its end. End every path with a raise, Halt, an endless loop or another noreturn call. |
SM0624 | return in '…', which is noreturn: it never returns to its caller | A return in a noreturn routine, which never returns to its caller. Remove it, or drop noreturn. |
SM0625 | … names '…', which is not a … file | A file directive (@exeicon, @copydll) names a file of another kind (the message names the kind it takes). Point it at a file of that kind. |
SM0626 | … names '…', which does not exist | A path directive names a file or folder that does not exist. Check the path and its prefix. |
SM0627 | a match on '…' takes one string per label, not a range | A range label in a match on a string. A string match takes one string per label: list them. |
SM0628 | a … writes 'ExitCode', but the exit code is its host program's, which this write may not reach | Warning: a dll or lib module writes ExitCode, but the exit code is its host program's, which the write may not reach. Report the result another way. |
SM0700 | threadstatic '…' cannot be …: each thread starts with its own copy of a constant | A threadstatic variable that is external, given an initializer it cannot take, or of an object type. Each thread starts with its own copy of a constant value: hold objects elsewhere. |
SM0701 | async needs a call of a routine, not '…' | async of something that is no routine call. Write async F(...). |
SM0702 | async cannot pass var parameter '…': the caller's variable may be gone before the call ends | async of a call passing a var parameter: the caller's variable may be gone before the call ends. Pass a value, or keep the data in a module variable or a ref object. |
SM0703 | await needs a task, not '…' | await of something that is no task. Await the task an async gave. |
SM0704 | await of a plain task is a statement: its call has no value | await of a task with no result, used as a value. Await it as a statement. |
SM0705 | an array literal of … elements for '…', which takes … | An array literal with another element count than its static array (the message gives both). Give one element per slot. |
SM0706 | an array literal's element is one value, not a range | An array literal element written as a range a..b. Each element is one value: list them. |
SM0707 | a set literal takes no comma before its ']' | A set literal with a comma before its ]. Remove the trailing comma. |
SM0708 | async cannot call '…' on '…': the object may be gone before the call ends (call it through a ptr or a ref) | async of a method call on an object the task may outlive. Call it through a ptr or a ref that keeps the object alive. |
SM0709 | return cannot leave a for parallel's body (leave stops it) | return inside a for parallel's body. A worker cannot leave the routine: leave stops the loop. |
SM0710 | …() is only known inside a for parallel's body | workerindex() or workercount() outside a for parallel's body, where they are not known. Use them inside the body. |
SM0711 | a for parallel's body cannot read its routine's varargs | A for parallel's body reads its routine's varargs. Copy what it needs into locals before the loop. |
SM0712 | '…' is the for parallel's own iterator: its bounds and workers cannot read it | A for parallel's bounds or worker count read its own iterator. Compute them from other values. |
SM0713 | return cannot leave an async block (its task ends at the block's end) | return inside an async block (its task ends at the block's end) or a for parallel's body. End the block normally, or leave the loop. |
SM0714 | an async block cannot write '…': it reads its own copy, taken at the async | An async block writes a variable or parameter of its routine. The block works on its own copy, taken at the async: return the result from the task instead. |
SM0715 | an async block cannot read its routine's varargs | An async block or a for parallel's body reads its routine's varargs. Copy what it needs into locals first. |
SM0716 | an async block cannot use …: the object may be gone before the task runs | self or parent inside an async block: the object may be gone before the task runs. Copy the values it needs into locals, or hold the object through a ref. |
SM0717 | … cannot jump out of a defer statement | return, leave or skip out of a defer statement. A deferred statement runs to its end: move the jump out. |
SM0718 | a defer statement defers a statement, never a declaration | A declaration as a defer statement's statement. defer defers a statement, never a declaration. |
SM0719 | yield cannot hand a value out of an async block or a for parallel's body | yield outside a generator's own body (a routine whose result is a sequence), or inside an async block or a for parallel's body there. Yield from the generator's body. |
SM0719 | yield outside a generator (a routine whose result is a sequence) | |
SM0720 | a generator's return takes no value: yield hands its values out | A return with a value in a generator. yield hands out its values; return only ends it. |
SM0721 | generator '…' cannot take var parameter '…': its body runs after the call has returned | A generator with a var parameter or varargs. Its body runs after the call has returned: pass values instead. |
SM0721 | generator '…' cannot take varargs: its body runs after the call has returned | |
SM0722 | for in walks a sequence, an array, a string, a wstring or a set, not '…' | for .. in over something it does not walk. It walks a sequence, an array, a string, a wstring or a set. |
SM0723 | for in variable '…' is a '…', but the elements are '…' | A for .. in variable not of the element type. Declare it with the elements' type (the message shows it). |
SM0724 | yield from walks a sequence, an array, a string, a wstring or a set, not '…' | yield from over something it does not walk. It walks a sequence, an array, a string, a wstring or a set. |
SM0725 | yield from hands out '…' elements, but the generator yields '…' | yield from whose elements do not convert to the generator's element type. Convert them in a for .. in with yield, or yield matching elements. |
SM0726 | a flexible array member starts at 0: write array[0..] of … | A flexible array member whose low bound is not 0. Write array[0..] of T. |
SM0727 | a flexible array member's elements are plain data: '…' holds a string, dynamic array, object or owner | A flexible array member whose elements are or hold a string, dynamic array, object or owner. Its elements are plain data only. |
SM0728 | array[0..] of … has no size: only a record's last field or an external variable has that type | array[0..] of T has no size, so only a record's last field or an external variable has that type. Give the array a high bound, or make it the last field. |
SM0729 | '…' ends in a flexible array member: it is no field or array element, reach it through a ptr | A record that ends in a flexible array member used as a field or an array element. It has no fixed size: reach it through a ptr instead. |
SM0730 | the external array '…' has no size: only an index or addr of takes it (…[i]; addr of … is where it starts) | A flexible array member or an external array of no size used other than by index. Index it (A[i]), or take where it starts with addr of (the message shows the form). |
SM0730 | the flexible array member '…' has no size: only an index takes it (…[i]; addr of …[0] is where it starts) | |
SM0731 | an unnamed field is a padding bitfield: give it a width (_: … : N; 0 ends the open unit) | An unnamed field with no bitfield width. An unnamed field is padding: give it a width (_: T : N;; a width of 0 ends the open storage unit). |
SM0732 | packed(…) caps field alignment at 1, 2, 4, 8 or 16 (#pragma pack's values) | packed(N) with an N other than 1, 2, 4, 8 or 16 (it caps field alignment, as C's #pragma pack does). Use one of those values. |
SM0733 | the generic '…' cannot be …: each instance is its own cpplink routine | A generic routine or method made clink or external. Each instance is its own cpplink routine: drop the word, or write a plain routine that calls one instance. |
SM0734 | the generic method '…' cannot be …: a slot holds one method, a generic method is one per instance | A generic method made virtual, override or abstract. A virtual slot holds one method and a generic method is one per instance: make it plain. |
SM0735 | '…' is not generic: it takes no type arguments | Type arguments that do not match the generic's parameters: the type is not generic, or the count differs. Give as many as it declares. |
SM0735 | '…' takes … type argument(s), … given | |
SM0736 | generic instances nest past … deep, each needing a bigger one: … | Generic instances nest past the depth limit, each needing a bigger one (the message shows the chain). Break the self-growing use. |
SM0737 | in the instance '…' made here | Hint: points at the use that made the instance in which the error above happened. Fix the error there, or the type arguments given here. |
SM0738 | the generic '…' takes its type arguments from a routine type, not from '…': give it a routine type, or call it | A generic call whose arguments fix no type for one of its type parameters. Name the type arguments: F<int32>(...). |
SM0738 | no generic '…' fits the routine type '…': its parameters and result do not match | |
SM0738 | the routine type '…' fixes no type for the type parameter '…' of '…': call it, with its type arguments named | |
SM0738 | the generic '…' is a value only where a routine type gives it its type arguments: give it one, or call it | |
SM0738 | the call of '…' fixes no type for its type parameter '…': name the type arguments | |
SM0739 | the routine type '…' gives the type parameter '…' of '…' two types, '…' and '…' | Two arguments give one type parameter two types. Name the type arguments, or convert an argument. |
SM0739 | the call of '…' gives its type parameter '…' two types, '…' and '…': name the type arguments | |
SM0740 | the routine type '…' fits more than one generic '…': call the one meant from a routine of that type | A routine type fits more than one generic of that name. Wrap the one meant in a routine of that type. |
SM0741 | '…' has no hash: '…' declares no operator hash (one operand of its type, giving uint64) | hash(X) of a type with no hash. Declare operator hash on the type (one operand of the type, giving uint64), or hash a value = compares by content. |
SM0741 | '…' has no hash: hash(X) takes a value '=' compares by its contents (a number, char, bool, choices value, pointer, text, set, array, or a record or object with an operator hash) | |
SM0742 | external type '…' is declared at module level only | An external type declared below module level. Declare it at module level. |
SM0743 | external type '…' names no library: write the library whose build has it (external "name";) | An external type that names no library. Write the library whose build has it: external "name";. |
SM0744 | external type '…' extends '…', which is no external type of '…': a library's type extends only that library's types | An external type whose parent is not an external type of the same library. A library's types extend only that library's types. |
SM0745 | '…' names no object in the static method '…': a static method has no self | self or parent in a static method, which has no object. Pass the object as a parameter, or make the method plain. |
SM0746 | '….…' names an instance member through the type: reach it through a value of '…' (only a static method is called through its type) | An instance member named through its type's name. Reach it through a value of the type; only a static method is called through the type. |
SM0747 | '…' is a static method of '…': call it through the type, '….…(..)' | A static method called through a value. Call it through its type: T.M(..). |
SM0748 | '…' cannot be extended: an extend adds to a record, object, overlay or choices type | An extend of a type that is no record, object, overlay or choices type. Only those can be extended. |
SM0749 | an extend does not take …: it adds methods and operators only (no field, init / copy / done, property, virtual word or hidden member) | A member an extend does not take: a field, init, copy, done, property, a virtual word or a hidden member. An extend adds methods and operators only. |
SM0750 | '…' is already a member of '…' (line …): an extend never adds a name its target has | An extend adds a name its target type has already. Rename the added member. |
SM0751 | '…' of '…' is added by two extends visible here (… and …): one name, one extend | Two extends visible here add one name to a type (the message names both). Keep one, or rename one of them. |
SM0752 | '…' is named twice among the extend's type parameters | An extend names one type parameter twice. Rename one. |
SM0753 | the extend of '…' is generic: a generic extend is never external (each instance is made where it is used) | A generic extend made external. Each instance is made where it is used, so a generic extend is never external. |
SM0754 | a func literal takes no '...': its closure is called the Adam way only | A closure type with a linkage word or ..., or a func literal with .... A closure is called the Adam way only: use a plain func type for a C callback. |
SM0754 | a closure type takes no …: a closure is called the Adam way only, never from C (use a plain 'func' type for a C callback) | |
SM0755 | a func literal cannot capture … in a method of '…': only a ref object's self is captured (held as a ref); any other self may be a value or an embed, gone when the closure runs (capture a ref or weak variable instead) | A func literal that captures a var parameter, or a self that is no ref object's: the place may be gone when the closure runs. Copy the value into a local first, or make the object a ref object. |
SM0755 | a func literal cannot capture the … parameter '…': the caller's place may be gone when the closure runs | |
SM0756 | a func literal cannot read its routine's varargs | A func literal reads its routine's varargs. Copy what it needs into locals first. |
SM0757 | the func literal captures '…', so it is no plain routine: '…' takes a routine of no captures (give it a 'ref func' type to keep the captures) | A capturing func literal given to a plain func slot, which takes no captures. Give the slot a ref func type, or capture nothing. |
SM0758 | '…' is a ref object: it lives only as ref / own / weak …, never as a value | A ref object held as a value. It lives only as ref, own or weak: build it with ref T(...). |
SM0759 | a string stored into '…' (a '…') would not be kept alive: only a field of a local variable or of a module variable (this module's, or another's public one), reached through value fields and static-array elements, keeps the text it is given (keep it in a CString, System.SysUtils, where C holds it) | A string stored into a C string field where nothing can keep it alive. Store it in a field of a local or module variable, or keep the text in a CString. |
SM0760 | '…' holds strings borrowed by its C string fields: copying it into '…' would not keep them alive (copy it into a local or module variable, or keep the texts in CStrings, System.SysUtils) | A value whose C string fields borrow strings, copied or returned where the borrowed text would not stay alive. Copy it into a local or module variable, or keep the texts in CString objects. |
SM0760 | '…' holds strings borrowed by its C string fields: returning it would not keep them alive (copy it into a local or module variable, or keep the texts in CStrings, System.SysUtils) | |
SM0760 | '…' holds strings borrowed by its C string fields: the async block's copy of it would not keep them alive (copy it into a local or module variable, or keep the texts in CStrings, System.SysUtils) | |
SM0761 | '…' and '…' cast by the members' values as bit numbers: every value must be 0..… (… is not) | A set cast to or from an integer where a member's value is no bit number (the message gives the range). Every member's value must be a bit of the integer. |
SM0762 | '…' returns self: its only return is 'return self;' | A method that returns self with a return other than return self;. That is its only return. |
SM0763 | '…' must return self exactly as '….…' it overrides does | An override that does not return self exactly as the method it overrides does. Match it. |
SM0764 | 'self' is a type only as the return type of an object's method | self as a type anywhere but an object method's return type. Name the type there. |
SM0765 | a '…' cannot go to a C variadic's '...': C reads plain values (a string goes as its C text) | A managed value (other than a string, which goes as its C text) passed to a C variadic's .... C reads plain values: pass a plain value or a pointer. |
SM0766 | varargs.next(…) in a clink variadic: a C caller passes plain values (a C string: next(ptr to const char)) | varargs.next(T) in a clink variadic with a T C cannot pass. A C caller passes plain values: read a C string as next(ptr to const char). |
SM0767 | '…' is …: a C callback's thunk is made for a plain func type only (no '...', no method's self) | A C callback thunk (CCallback<T>) over a type that is no plain func type: a closure, a method or a variadic. Use a plain func type. |
SM0768 | '…' takes … parameters: a C callback's thunk takes at most … | A C callback thunk over a func type with more parameters than a thunk takes (the message gives the limit). |
SM0769 | '…' is a literal parameter of …: only a func or method declaration's own parameter may be literal | A literal parameter anywhere but a func or method declaration's own parameter (for example in a func type). Make it a plain parameter there. |
SM0770 | '…' of '…' is a literal parameter: its argument must be a constant or the calling func's own literal parameter | A literal parameter given an argument that is no constant (nor the calling func's own literal parameter). Pass a constant. |
SM0771 | sourcehash() is only in a program's main module: '…' is a unit | sourcehash() in a unit. It exists only in a program's main module. |
SM0772 | match on '…' does not cover: …, so '…' can reach its end through it | A match on a choices value ends its routine's path but leaves values uncovered, so the routine can reach its end through them. Cover them, add an else, or return after the match. |
SM0773 | a bracket literal needs a place that gives it a type: an array or a set | A bracket literal where nothing gives it a type (a print argument, len([])). Put it where an array or a set type is wanted: a typed variable, a parameter, a for .. in, or len with at least one element. |
SM0774 | '…' is inline but external: an inline routine needs a body of its own to copy into its calls | inline; on an external routine. An inline routine's body is copied into its calls, so it needs one of its own: drop inline, or give it a body. |
SM0775 | '…' is inline but variadic: its varargs live in a frame of its own, which an inline routine does not have | inline; on a variadic routine (...). Its varargs are read from a frame of its own, which an inline routine never has: drop inline, or take an array. |
SM0776 | '…' is inline, so it has no address: an inline routine is only ever called | An inline routine named as a value (stored or passed). It is copied into its calls and has no address: call it, or wrap the call in a routine that is not inline. |
SM0777 | '…' is inline and reaches itself through inline calls (…): its copies would never end | An inline routine that reaches itself through calls of inline routines (itself, or another inline routine calling back). Its copies would never end: make one routine of the chain not inline. |
SM0778 | '…' is inline but a generator: its body runs as a coroutine with a frame of its own | inline; on a generator (a routine whose result is a sequence). Its body runs as a coroutine in a frame of its own: drop inline. |
Commands and options
Commands
| Command | Argument | What it does | Examples |
|---|---|---|---|
build | [<file|folder>] | Build the program whose main module is <file>, or the project whose project.toml is in <folder> (default: the current folder), into an exe | adam build hello.adam, adam build hello.adam -o bin, adam build myproject |
check | <file> | Check the program whose main module is <file>: the front end only, nothing built | adam check hello.adam |
init | <name> <exe|dll|lib> | Make a new project in the folder <name> under the current folder: project.toml, src/<name>.adam and assets/ | adam init mygame exe |
pack | [<folder>] | Zip the assets folder of the project whose project.toml is in <folder> (default: the current folder) into <name>.rez in its output folder, with its pack password; every build copies it beside its exe | adam pack mygame |
info | [<folder>] | Print the project whose project.toml is in <folder> (default: the current folder) as one line of JSON, for an editor | adam info mygame |
deps | <add|remove|list> [<name> [<folder>]] [<project folder>] | Add, remove or list the dll and lib projects in the [deps] table of the project whose project.toml is in <project folder> (default: the current folder); add checks the dependency as a build does, and only the [deps] lines of project.toml change | adam deps add mathlib ../mathlib, adam deps remove mathlib, adam deps list mygame |
cimport | <spec> | Turn the C headers an import spec (<name>.cimport.toml) names into an Adam .C binding unit | adam cimport zlib.cimport.toml |
bench | [<kernel> ...] | Time res/bench's kernels (default: all) beside their C twins at each level -opt names (a comma list, default: all four) for each triple -t names (a comma list, default: the host's); fails when a kernel's checksum differs from C's; writes bench-<triple>.json and an HTML5 report in <dir> (default: output beside adam) | adam bench fib sort -opt fast, adam bench --check --baseline bench-x86_64-windows-gnu.json, adam bench --render bench-x86_64-windows-gnu.json |
dap | none | Serve the Debug Adapter Protocol on stdin / stdout, for an editor's debugger (only where adam debugs its own host's programs: x86_64-windows-gnu) | adam dap |
lsp | none | Serve the Language Server Protocol on stdin / stdout, for an editor's diagnostics | adam lsp |
editor | [<file> ...] | Start the Adam editor on its own, with each <file> open; adam returns at once (only where adam debugs its own host's programs: x86_64-windows-gnu) | adam editor hello.adam |
help | [<command>] | Show this help, or one command's | adam help build |
Options
| Option | Value | Commands | What it does |
|---|---|---|---|
-o, --output | <dir> | build, cimport, bench | The output folder: build writes the exe to its bin (else the main module's @outputpath, else its project's output folder, else output under the working folder); cimport writes the unit into it (else the spec's output folder, else the spec's own) |
-t, --target | <triple> | build, check, cimport, bench | The target, by its triple (TARGETS lists them); wins over the main module's @target |
-opt, --optimize | <level> | build, check, bench | The optimization level: debug, safe, fast or small; wins over the main module's @optimize |
--defaults | none | build, check | -t / -opt only stand in where the main module has no @target / @optimize (an editor's toolbar) |
-r, --run | none | build | Run the exe once built, in its folder (an x86_64-linux-gnu one through WSL); the arguments after -- are its own |
-d, --debug | none | build | Debug the exe once built, in this console (h lists the debugger's commands); the arguments after -- are its own (only where adam debugs its own host's programs: x86_64-windows-gnu) |
--host | <exe> | build | With -d on a dll: the exe that loads it, run and debugged with the dll's lines (only where adam debugs its own host's programs: x86_64-windows-gnu) |
--emit-ir | none | build | Also write <name>.ir beside the exe: the optimized IR of the program's own units, with each function's analysis |
--emit-pp | none | cimport | Print the headers as preprocessed (clang -E's text: line markers, then the tokens) and stop there |
--emit-unit | none | cimport | Also print the Adam unit the import wrote |
--emit-layout | none | cimport | Also print the unit's layout probe: C _Static_asserts of every record as Adam lays it out |
--check | none | bench | Fail when a kernel's time over C's grew more than 10% over the --baseline file's |
--baseline | <file,...> | bench | Earlier adam bench results (bench-<triple>.json) for --check; each triple compares with its own |
--report | <file> | bench | Where adam bench writes its HTML5 report (default: bench-<triple>.html, or bench.html for several triples, in the output folder) |
--render | <file,...> | bench | Make adam bench's HTML5 report again from saved bench-<triple>.json files (a comma list), with no build or timing (default page: beside the first file) |
--template | <file> | bench | The template adam bench fills to make its HTML5 report (default: res/bench/report/template.html; template-howto.html beside it explains every tag and value) |
--no-banner | none | every command | Print no banner: for scripts and tests |
-q, --quiet | none | every command | Print only the reports: no banner, no phase or status lines (scripts, tests) |
-h, --help | none | every command | Show the help of the command given (else adam's) |