Skip to content
Adam
Reference

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

WordMeaning
moduleStarts every source file: module exe Name;, module dll Name;, module lib Name; or module unit Name; names the module and what it builds.
exeA module kind: the module builds a program (an executable) and is the main module of its build.
dllA module kind: the module builds a shared library (a DLL on Windows, a shared object on Linux) exporting its public routines.
libA module kind: the module builds a static library (an archive) that other programs link.
unitA module kind: a unit, imported by other modules and compiled into the build of the program that imports it.
importBrings units into scope: import System.SysUtils, System.IO; makes their public declarations visible here.
initializeA module section run once when the program starts, before the main block, in import order.
finalizeA module section run once when the program ends, in reverse import order, however it ends (return, Halt or an uncaught raise).
beginOpens a block of statements that end closes: a routine body, the main block or a nested block.
endCloses a block, a type (record .. end) or a statement (if .. end;); the main block ends with end.
varDeclares variables (var LCount: int32;); a var parameter is passed by reference, so the routine can change the caller's variable.
constDeclares constants (const ADAM_MAX: int32 = 10;); a const parameter is read-only and passed with no copy; a const method leaves its object unchanged.
typeDeclares types: type Point = record X: int32; Y: int32; end;
funcDeclares 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).
forwardAnnounces a routine or a type declared further down, so code before it can name it: forward func Later(): int32;
methodDeclares a routine of an object type, run on an object (self): method Grow(const AStep: int32);
publicExports a declaration from its module (public func, public type, public const); without it a declaration is private to its module.
clinkC linkage: the routine uses its plain C name and the C calling convention, so C can call it or it binds a C function.
cpplinkC++ 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.
externalBinds a declaration to a library's symbol: external "user32"; after its heading (name "sym" binds another symbol name).
recordA value type of named fields, copied on assignment: Point = record X: int32; Y: int32; end;. It may declare operators.
objectA type with fields, methods, properties and init / done; it may inherit (object(Base)) and implement interfaces, and is held by own, ref or weak.
overlayA type whose fields share one storage (C's union): overlay I: int64; F: float64; end
choicesAn enumeration: Color = choices(Red, Green, Blue);. A value is always written with its type: Color.Red.
arrayAn array type: array[0..9] of int32 (static) or array of string (dynamic, sized with setlength).
ofNames an element type (array of T, set of T, sequence of T); also match X of.
ptrA pointer type: ptr to T (typed), ptr (untyped), ptr to const T (a read-only target). P^ is what P points to.
toIn ptr to T, the type pointed to; in for I := A to B do, the loop counts up.
setA set type over a choices type or a small integer range: set of Color. Test a member with in.
packedLays a record out with no padding between its fields; packed(N) aligns its fields to at most N bytes (C's #pragma pack(N)).
alignSets a record's alignment in bytes: record align(16) .. end
ifRuns its statements when the condition is true: if X > 0 then .. else .. end;
thenEnds an if condition: if X > 0 then
elseThe other branch: of an if, of a match (no arm matched) or of a trylock (the mutex was not taken).
whileRepeats its statements while the condition is true, testing before each pass: while X < 10 do .. end;
doStarts the body of a while, for, for .. in, lock or trylock.
forA 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.
downtoIn for I := A downto B do, the loop counts down.
repeatRepeats its statements until the condition is true, testing after each pass: repeat .. until LDone;
untilEnds a repeat loop with its stop condition.
matchRuns the arm whose label matches the value: match K of 1, 2: .. 3..9: .. else .. end;
guardRuns its statements under exception handling: guard .. except .. finally .. end;. except runs on a raise, finally always.
exceptIn a guard, the statements run when its body raised; exccode() and excmsg() read the exception.
finallyIn a guard, the statements that always run, whether its body raised or not.
returnLeaves the routine, giving its value when it has one: return X;. In an exe's main block return N; sets the exit code.
leaveLeaves the innermost loop (C's break).
skipGoes on with the next pass of the innermost loop (C's continue).
orLogical or of two bools; bitwise or of two integers.
andLogical and of two bools; bitwise and of two integers.
xorExclusive or: of two bools, or bit by bit of two integers.
notLogical not of a bool; bitwise not of an integer.
inMembership: X in S is true when X is a member of the set S. Also for X in Items do.
shlShifts an integer's bits left: X shl 2
shrShifts an integer's bits right: X shr 2
divInteger division, the remainder dropped: 7 div 2 is 3.
modThe remainder of an integer division: 7 mod 2 is 1.
addraddr of X is a pointer to X.
trueThe bool value true.
falseThe bool value false.
nilThe empty pointer: no object, no memory, no routine.
selfInside a method, the object it runs on.
parentInside a method, the parent type's version of a member: parent.init(..)
varargsReads the variable arguments of a routine declared with ...: varargs.count, varargs.next(int32), varargs.get(I, T).
testA unit test after the module's end.: test "adds" begin .. end;, run by @unitTestMode on;
mutexA lock for lock (M) do .. end; and trylock: zero is unlocked, the thread holding it may take it again, never copied.
virtualA method or property that a descendant type may override.
operatorDeclares an operator of a record or object type: operator +(const A: Vec; const B: Vec): Vec;
threadstaticDeclares module variables with one copy per thread: threadstatic GCount: int64;
defaultMarks an indexed property as its object's default: O[I] reads it.
literalA parameter mode: the argument must be a compile-time constant (a literal or a constant's name); it is passed as const.

Builtin types

WordMeaning
int8A signed 8-bit integer, -128 to 127.
int16A signed 16-bit integer, -32768 to 32767.
int32A signed 32-bit integer, -2147483648 to 2147483647.
int64A signed 64-bit integer.
uint8An unsigned 8-bit integer, 0 to 255.
uint16An unsigned 16-bit integer, 0 to 65535.
uint32An unsigned 32-bit integer, 0 to 4294967295.
uint64An unsigned 64-bit integer.
clongC's long, sized by the target: 4 bytes on x86_64-windows-gnu, 8 on x86_64-linux-gnu.
culongC's unsigned long, sized by the target: 4 bytes on x86_64-windows-gnu, 8 on x86_64-linux-gnu.
float32A 32-bit IEEE 754 float (C's float).
float64A 64-bit IEEE 754 float (C's double).
boolA truth value: true or false.
charOne 8-bit character, a byte of UTF-8 text (C's char).
wcharOne 16-bit character, a UTF-16 code unit: an element of a wstring.
stringUTF-8 text, reference counted and copied on write; len(S) is its length.
wstringUTF-16 text, reference counted and copied on write; utf8(W) gives it as a string.

Operators and punctuation

( ) [ ] , ; : := . .. ... ^ ? ~ ! -> + ++ += - -- -= * *= / /= % %= & && &= | || |= = <> < <= <=> << <<= > >= >> >>=

Context words

WordMeaning
abstractA method or property accessor with no body here: every concrete descendant gives one.
asCasts an object or interface to a type, checked when it runs: LShape as Circle
asyncStarts a call on another thread and gives its task: LTask := async Work(1);. async begin .. end runs a block.
awaitWaits for a task to end and gives its result: LValue := await LTask;
copyDeclares an object type's copy routine, run when a value of it is copied: copy(const AFrom: Box);. Also varargs.copy().
deferRuns a statement when its enclosing statement list ends, however it ends (return, leave, raise): defer CloseFile(LF);
doneDeclares an object type's teardown, run when the object is released: done; begin .. end;
embedEmbeds a type's fields and members into an object type, reachable as its own: embed Place: SourcePlace;
extendAdds methods and operators to an existing type, a generic one too: extend Vector2 .. end;, extend List<T> .. end;
finalAn object type nothing may inherit from, or a virtual method or property no descendant may override.
fromIn yield from S;, hands out every value of the sequence S.
hashoperator hash gives a record or object type its hash for hash(X) and for Map / Set keys.
hiddenHides a member of an object type: only the type itself reaches it.
implementsLists the interfaces an object type implements: object implements IShape
initDeclares an object type's initializer, run by own T(..), ref T(..) or a value T(..): init(const ASize: int32);
inlineMarks a routine whose body is copied into every call, at every @optimize level (debug too): no call is made, no frame.
interfaceA type of method and property headings that object types implement, reached through any object that implements it.
isTests an object's type when it runs: if LShape is Circle then
locklock (M) do .. end; runs its statements holding the mutex M, released however they end.
nameIn an external clause, the library's symbol when it differs from the declaration's name: external "lib" name "sym";
noreturnMarks a routine that never returns (as Halt): what follows a call of it is unreachable.
overrideReplaces a virtual method or property of the parent type.
ownAn owning pointer: own T holds an object alone and frees it when it goes; own T(..) makes one.
parallelfor parallel I := 0 to N - 1 do .. end; runs the passes on worker threads; for parallel (W) sets how many.
propertyDeclares a property of an object type: property Size: int32 read FSize; write FSize;
readA property's getter: a field's name or a body.
refA 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.
sequenceA generator type: sequence of T, given by a func that yields its values, walked by for .. in or pull.
staticA method called on its type, with no object: static method FromFile(const APath: string): JSON;, called as JSON.FromFile(..).
taskA call started by async: task int32. await gives its result; ready, cancel and cancelled act on it.
trylocktrylock (M) do .. else .. end; takes the mutex M only when it is free, else runs the else.
waitIn trylock (M) wait N do, waits up to N milliseconds for the mutex.
weakA watching pointer: weak T sees an object without keeping it alive; alive(W) tests it, lock(W) gives a ref to it.
writeA property's setter: a field's name or a body.
yieldIn a sequence's func, hands out the next value: yield X;. yield from S; hands out all of S.

Directives

Build directives

DirectiveArgumentValuesWhereTimesMeaning
@optimizea namedebug safe fast smallmain module onlyonceThe build's optimization level: @optimize debug; (or safe, fast, small). Only in the main module's prologue; adam -opt wins over it.
@subsystema nameconsole guimain module onlyonceA Windows exe's subsystem: @subsystem console; or @subsystem gui; (no console window).
@addverinfoa nameon offmain module onlyonce@addverinfo on; stamps the exe's version info from the @vi* directives (Windows).
@unitTestModea nameon offmain module onlyonce@unitTestMode on; runs the test blocks instead of the main block; the exit code is the number of failed tests.
@vimajoran integer or an integer constant's namemain module onlyonceThe version's major number (0 to 65535, or an integer constant's name), stamped with @addverinfo on;
@viminoran integer or an integer constant's namemain module onlyonceThe version's minor number (0 to 65535, or an integer constant's name), stamped with @addverinfo on;
@vipatchan integer or an integer constant's namemain module onlyonceThe version's patch number (0 to 65535, or an integer constant's name), stamped with @addverinfo on;
@viproductnamea string or a string constant's namemain module onlyonceThe version info's product name (a string, or a string constant's name).
@videscriptiona string or a string constant's namemain module onlyonceThe version info's file description (a string, or a string constant's name).
@vifilenamea string or a string constant's namemain module onlyonceThe version info's original file name (a string, or a string constant's name).
@vicompanynamea string or a string constant's namemain module onlyonceThe version info's company name (a string, or a string constant's name).
@vicopyrighta string or a string constant's namemain module onlyonceThe version info's copyright text (a string, or a string constant's name).
@exeicona string or a string constant's namemain module onlyonceThe exe's icon, an icon file: its file icon on Windows, its window's icon on other targets.
@addmodulepatha stringmain module onlyrepeatableAdds a folder where import finds units: @addmodulepath "$P:src";
@outputpatha stringmain module onlyonceThe build's output folder; adam -o wins over it.
@targeta stringany moduleonceThe build's target triple: @target "x86_64-linux-gnu";. adam -t wins over it.
@copydlla stringany modulerepeatableCopies a DLL beside the built program.
@linklibrarya stringany modulerepeatableLinks a library by name: @linklibrary "user32";
@addlibrarypatha stringany modulerepeatableAdds a folder searched for @linklibrary and external libraries.
@breakpointno argumentany module, also inside a bodyrepeatableA breakpoint: the debugger stops here.
@messagea severity (hint, warn, error or fatal) and a stringany module, also inside a bodyrepeatableReports a message when the build reads it: @message warn "text"; (hint, warn, error or fatal).
@addresdatatwo strings (a key and a path)any modulerepeatableBuilds a file into the binary under a key, read back when it runs with FindResData: @addresdata "logo" "$P:logo.png";

Conditional directives

DirectiveMeaning
@defineDefines a name for the conditional directives: @define FAST
@undefRemoves a defined name: @undef FAST
@ifdefCompiles what follows only when the name is defined: @ifdef DEBUG .. @endif
@ifndefCompiles what follows only when the name is not defined: @ifndef TARGET_X86_64_WINDOWS_GNU .. @endif
@elseifIn an @ifdef / @ifndef, the next branch, taken when its name is defined.
@elseIn an @ifdef / @ifndef, the branch taken when no other was.
@endifEnds an @ifdef / @ifndef.

Intrinsics

IntrinsicArgumentsGivesMeaning
len(string, wstring or array)a valueThe length of a string, a wstring or an array: len("four") is 4.
size(a type) (a type is accepted)a valueThe size of a type in bytes: size(int64) is 8.
utf8(wstring)a valueA wstring's text as a UTF-8 string.
paramcount()a valueHow many command-line arguments the program got, after its own name.
paramstr(int32)a valueCommand-line argument N, paramstr(0) the program's own name; "" past the last one.
getmem(int64)a valueAllocates N bytes and gives a pointer to them; freemem frees them.
resizemem(pointer, int64)a valueResizes a block from getmem to N bytes and gives its pointer (the block may move).
exccode()a valueIn a guard's except, the code of the exception being handled.
excmsg()a valueIn a guard's except, the message of the exception being handled.
alive(weak)a valueTrue while the object a weak watches still exists.
lock(weak)a valueA ref to the object a weak watches, nil once it is gone.
ready(task)a valueTrue once a task's call has ended (a result or an exception), without waiting.
atomicadd(int32, int64, uint32 or uint64 variable, its type)a valueAdds 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 valueWrites 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 valueWrites 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 valueReads a shared variable atomically.
ProjectPassword()a valueThe project file's pack password, handed to the program scrambled; "" when there is none. Project builds only.
FormatStr(format string, its arguments)a valueThe 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")
printchecked by its own rulenothing (a statement)Writes formatted text to the console: print("{} items", LCount). {} takes the next argument.
printlnchecked by its own rulenothing (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 valueIn a for parallel body, the worker running this pass (0 is the calling thread).
workercount()a valueIn 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 valueTrue 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 valueTakes the next value of a sequence into a variable: true, or false once the sequence has ended.
byteswap(an integer)a valueAn integer with its bytes reversed: byteswap(uint16(0x1234)) is 0x3412.
leadingzeros(an integer)a valueThe zero bits above an integer's highest set bit (its width for 0).
trailingzeros(an integer)a valueThe zero bits below an integer's lowest set bit (its width for 0).
popcount(an integer)a valueThe number of set bits of an integer.
hash(a value)a valueA 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 valueThe name of a choices value or of a type, as a string: nameof(Color.Red) is "Red".
sourcehash()a valueA uint64 hash of the build's sources, the same on every host; main module only.

Diagnostics

AR

Reported by Backend.Archive, COFF.Archive.

CodeMessageMeaning
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 saysAn 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.

CodeMessageMeaning
AU0001compiled 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.
AU0002compiled unit '…' uses '…' of unit '…', which no longer declares itA 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.
AU0003compiled unit '…' uses unit '…', which is not loadedA 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.

CodeMessageMeaning
BN0001'…' is not a benchmark kernel; the kernels: …A kernel name the benchmark does not have
BN0002the 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
BN0004no C benchmark for … at '…'; rebuild it with res/bench/c/build.cmd or build.shA triple's prebuilt C benchmark is missing
BN0005kernel … 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
BN0007no --baseline file in '…' is adam bench's results for …--check: no --baseline file is results for the triple
BN0008kernel … 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 writtenThe JSON results could not be written
BN0010this host cannot run … programs; leave it out of -tA triple whose programs this host cannot run
BN0011'…' could not be writtenThe HTML report could not be written
BN0012the 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)
BN0014two --baseline files are results for …: '…' and '…'--check: two --baseline files are results for the same triple

CC

Reported by CImport.Parser.

CodeMessageMeaning
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.
CC0001a type name has no declarator name: '…' is one
CC0002a declaration needs a type: '…' is no type the headers declareA 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 itType specifiers that do not combine into one C type (as short long). Check the header there, or the defines that shape it.
CC0003these type specifiers do not make one C type
CC0004… of a type with no size hereAn 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.
CC0004an integer constant expression is expected here; '…' is not one
CC0005division by zero in a constant expressionDivision by zero in a constant expression of the headers. Check the header there, or the defines that shape it.
CC0006the array size … is below zeroAn array size below zero in the headers. Check the header there, or the defines that shape it.
CC0007'…' was declared as a … beforeA struct, union or enum tag used as another kind than it was declared before. Check the header there.
CC0008'… …' is defined twiceA 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 readA 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]].
CC0010the headers end inside a declarationThe headers end inside a declaration. Check the last header for a missing ; or closing brace, or the defines that cut it short.
CC0011a 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.

CodeMessageMeaning
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 toAn @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 branchAn @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.
CD0004the '…' here is never closed by an @endifAn @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.

CodeMessageMeaning
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.
CI0002the [[insert]] anchor '…' is not in the written unitAn [[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.
CI0002the [[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.
CI0004the unit file '…' cannot be writtenA 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 headersA [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.

CodeMessageMeaning
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).
CL0010the 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 startedThe 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 … programsWarning: 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.
CL0013No … 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.
CL0014Cannot 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.
CL0017The 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.
CL0018Cannot make the folder …pack cannot make the folder the archive goes into. Check the path and that it can be written.
CL0019Cannot 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 '…'
CL0021Cannot 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 itWarning: -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 itWarning: -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.
CL0031The editor is not installed: … is missingadam editor cannot find the editor beside adam (the message names the missing file). Install it there, from the release.
CL0032The editor … could not be startedThe 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 … programsA 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.

CodeMessageMeaning
CP0001the 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.
CP0001the import spec cannot be read
CP0002the import spec has no '…' keyThe 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 […]: …
CP0005the 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 keywordA 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 dllA 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.
CP0009the 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 identifierA 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 keywordA rename to an Adam name that is not valid: an Adam name is an identifier and no Adam keyword. Choose another name.
CP0012an [[insert]] takes exactly one of before, after or replaceAn [[insert]] with no anchor, or more than one. It takes exactly one of before, after or replace.
CP0013occurrence counts the matches from 1, not …An [[insert]] whose occurrence is below 1. Occurrence counts the anchor's matches from 1.
CP0014'…' names no targetAn 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.
CP0016the header folder '…' cannot be openedA header folder (one of the spec's includes, or a system header folder) cannot be opened. Check that it exists and can be read.
CP0017the 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.
CP0018the header '…' cannot be readA header was found but cannot be read. Check that the file can be read.
CP0019this #… has no #endif before the end of its fileA conditional (#if, #ifdef, #ifndef) with no #endif before the end of its file. Close it in the same file.
CP0020#… without an #ifAn #elif, #else or #endif with no #if open. Remove it, or add the #if.
CP0021#… after #elseAn #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 directiveA # 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
CP0024the 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 parameterA # 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.
CP0027the call of macro '…' has no closing ')'A function-like macro call with no closing ). Close the call.
CP0028macro '…' takes at least … arguments, … givenA macro called with the wrong number of arguments (the message gives both counts). Pass as many as the macro takes.
CP0028macro '…' takes … arguments, … given
CP0029pasting '…' and '…' does not give a valid tokenA ## paste whose two tokens do not make one valid token. Paste tokens that do, or drop the ##.
CP0030#… has no expressionAn #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
CP0030a ':' is missing after '?' in the #if expression
CP0030the #if expression ends early
CP0030a ')' is missing in the #if expression
CP0030'…' is not an integer constant #if takes
CP0030'…' is too large for any integer type
CP0031division by zero in the #if expressionDivision 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.
CP0036macro '…' is redefined differentlyWarning: 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.

CodeMessageMeaning
DB0001the program to debug, '…', does not existThe 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.
DB0003the debugger has started its program alreadyA 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.
DB0003the program is not stopped at an event, so it cannot be resumed
DB0004thread … is not a thread of the programA thread id the program does not have (the thread may have ended). Use a thread the debugger lists.
DB0005the 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).
DB0005the registers given for thread … are not the ones read from it
DB0005the 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: …
DB0007no 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.
DB0008the program could not be paused: …The program could not be paused (the message gives the system's reason).
DB0009the 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.
DB0010the 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)
DB0011no module's debug information is loadedA stack walk asked for before any module's debug information was loaded. Start the program under the debugger first.
DB0012the registers given for thread … are not the ones read from itA stack walk given registers that were not read from a thread of this program. Read them from the thread first.
DB0013the 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.
DB0014no program is being debuggedA debugger request made with no program being debugged. Start one first.
DB0015'…' ended before it reached its entryThe 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.

CodeMessageMeaning
DG0001the error budget (…) is reached; later errors are not shownThe 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.
DG0002internal: '…' 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.
DG0003internal: 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.

CodeMessageMeaning
DR0001the folder of adam.exe cannot be told, so the standard library's folder '…' is not searched for importsWarning: 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.
DR0002the main module's path '…' cannot be resolvedThe main module's (or unit's) path cannot be resolved. Check that the file exists and that the path is spelled right.
DR0003internal: one compile checks one program, and '…' would be a secondInternal: one compile checks one program, and a second was asked of it. This is a compiler fault: report it.
DR0004Adam 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.
DR0005the folder of adam.exe cannot be told, so the runtime's folder '…' is not searched for the runtime unitWarning: 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.
DR0006Adam 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.
DR0007the output folder '…' cannot be madeThe output folder cannot be made. Check the path and that it can be written.
DR0008the exe '…' cannot be writtenThe exe cannot be written. Check that its folder can be written and that the exe is not running or held open.
DR0010project.toml says the project is a …, but its main module … is notproject.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.
DR0011the compiled unit '…' cannot be writtenA unit's compiled .acu cannot be written. Check that the output folder can be written and that no program holds the file open.
DR0012the compiled unit '…' cannot be readA 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.
DR0013the IR file '…' cannot be writtenThe file --emit-ir writes cannot be written. Check that its folder can be written.
DR0014the 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.
DR0015the dll's import library '…' cannot be writtenA dll's import library cannot be written. Check that the output folder can be written and that no program holds the file open.
DR0016the lib's static library '…' cannot be writtenA lib's static library cannot be written. Check that the output folder can be written and that no program holds the file open.
DR0017the C header '…' cannot be writtenThe C header of a dll or lib cannot be written. Check that the output folder can be written.
DR0018the debug file '…' cannot be writtenA debug build's debug file cannot be written. Check that the output folder can be written and that no debugger holds the file open.
DR0019the binding unit '…' cannot be writtenThe binding unit of a dll or lib cannot be written. Check that the output folder can be written.
DR0020the exe '…' was written but cannot be made executableThe exe (or dll) was written but cannot be made executable. Check the output folder's file system and permissions.
DR0021the 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.

CodeMessageMeaning
DV0001The editor's source folder '…' is not thereDev command: the editor's source folder is not there. Check the path.
DV0002The editor's package.json '…' cannot be read as a JSON objectDev command: the editor's package.json cannot be read as a JSON object. Fix the file.
DV0003The editor's source folder '…' holds no fileDev 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.
DV0003The editor's file '…' cannot be read: no archive written
DV0003The archive '…' cannot be written
DV0004'…' is there: Electron loads it before app.asar, so remove itDev command: a resources\app folder is beside the archive, and Electron loads it before app.asar. Remove that folder.
DV0005The editor's program '…' is not thereDev command: the editor's program is not there. Check the path.
DV0006The editor's icon '…' is no icon fileDev 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.

CodeMessageMeaning
EF0001static library '…' cannot be readA 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 againA 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 linkAn 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 outAn 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.

CodeMessageMeaning
EL0002'…' is used, but nothing in the program, its static libraries or the shared libraries of the version tables defines itA 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.
EL0003library '…' 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.
EL0003the C runtime's version table '…' is not found: looked in …
EL0004library '…' names a folder: a library is named by its file name and found in the library pathsA library named with a folder. Name it by its file name, and add its folder to the library paths.
EL0005a relocation in '…' at offset … to '…' does not reach its target: … does not fit in … bitsA 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.
EL0007the .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.
EL0008the 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.
EL0008the shared library table '…' is damaged at line …: its library's symbols are not bound
EL0008the 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 codeA 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.

CodeMessageMeaning
EO0001'…' is damaged: …An ELF object is damaged (the message says how). Build or copy it again.

EX

Reported by COFF.Exports.

CodeMessageMeaning
EX0001library '…' names a folder: a library is named by its file name and found in the library pathsA library named with a folder. Name it by its file name, and add its folder to the library paths.
EX0002library '…' 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 readA 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 0x20BA 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.
EX0007import library '…' imports from '…' and from '…': one import library is one DLL'sAn 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.

CodeMessageMeaning
FO0001static library '…' cannot be readA 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 againA 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 linkA 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 keepsA 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.

CodeMessageMeaning
LK0001'…' is used, but nothing in the program defines itA 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.
LK0003variable '…' is not exported by '…'A routine or variable its DLL does not export. Check the name, and the DLL its external names.
LK0003routine '…' is not exported by '…'
LK0004the program's image would be … bytes, past the … bytes a 64-bit image holdsThe 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.
LK0006the exception table is no run of whole …-byte entries: its piece '…' breaks itThe 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 readThe @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
LK0008the 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 codeA 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.

CodeMessageMeaning
LW0001code generation does not handle … yetThe 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 damagedThe @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.

CodeMessageMeaning
LX0001the string literal is not closed on its lineA 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 +.
LX0001the character literal is not closed on its line
LX0002the raw string R"…( is not closed before the end of the fileA 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.
LX0003the block comment is not closed before the end of the fileA 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.
LX0004unexpected 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 digitsA 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
LX0005a digit separator in '…' does not stand between two digits
LX0005the hex float '…' takes no digit separators
LX0005the hex float '…' needs a 'p' exponent
LX0005the exponent of '…' has no digits
LX0005'…' is not a suffix of the number '…'
LX0005the float suffix '…' is not supported: write … for a float64 or …f for a float32
LX0006'…' does not fit int64: write '…' to make it unsignedA 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 valueA 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 nameAn @ with no directive name after it. Write the name straight after the @ (@ifdef DEBUG), or remove the stray @.
LX0010the raw string delimiter '…' is invalid: at most 16 characters, none of ( ) \ blanks or controlsA 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.
LX0011the byte 0x… is not valid UTF-8The 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.
LX0201whitespace between '\' and the end of the line: the lines are still joinedWarning: 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 hereWarning: 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.
LX0203a comment opener inside a block comment: block comments do not nestWarning: 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.

CodeMessageMeaning
OB0001'…' is damaged: …A COFF object is damaged (the message says how). Build or copy it again.

PJ

Reported by Driver.Project.

CodeMessageMeaning
PJ0001Cannot 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.
PJ0002The project file '…' has no '…' keyproject.toml lacks a key a project needs (the message names it). Add it.
PJ0003In 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.
PJ0004The 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.
PJ0005The project name '…' is not valid: …The project name is not valid (the message gives the reason). Choose a name that passes.
PJ0006The project type '…' is not valid: use exe, dll or libThe project type is not exe, dll or lib. Use one of those.
PJ0007The main module '…' is not valid: …The main module path in project.toml is not valid (the message gives the reason). Fix the path.
PJ0008The main module '…' does not exist (…)The main module project.toml names does not exist. Fix the path, or create the file.
PJ0009The 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.
PJ0010The 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.
PJ0011The 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.
PJ0012Cannot save the project file '…': …project.toml cannot be saved. Check that its folder can be written and that no program holds the file open.
PJ0013Cannot look for a project file above '…': …The search for a project.toml above a path failed (the path cannot be resolved). Check the path.
PJ0014The folder '…' already exists: a new project needs a folder of its owninit found the new project's folder already there. A new project needs a folder of its own: choose another name, or move the folder.
PJ0015Cannot create '…': …init cannot create a folder or file of the new project (the message names it). Check that the place can be written.
PJ0016Cannot make a pack password: …init cannot make a pack password: the system's secure random generator failed. Try again.
PJ0017The dependency '…' names the folder '…', which holds no project.tomlA [deps] entry names a folder that holds no project.toml (the message gives the folder). Fix the folder, relative to the project's own.
PJ0018The 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.
PJ0019The dependency '…' is an exe project: a dependency must be a dll or a lib projectA [deps] entry names an exe project. A dependency is a dll or a lib project: a program cannot be built into another.
PJ0020The 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.
PJ0021The project file '…' already names the dependency '…'deps add found the name already in [deps]. Remove it first, or choose another.
PJ0022The project file '…' names no dependency '…'deps remove found no such name in [deps] (adam deps list shows the names).

PR

Reported by Compiler.Parser.

CodeMessageMeaning
PR0001expected …, 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.
PR0002expected 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;).
PR0003the 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).
PR0004the unit '…' cannot be the main module: a unit builds nothing of its ownA 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 directiveAn @ 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 fatalAn @message severity that is none of hint, warn, error or fatal. Use one of those.
PR0008the build directive '…' stands only in the directive prologue, right after the module headerA 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.
PR0009invalid 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.
PR0010a module has one import clause, right after its directivesAn import outside the module's one import clause. A module has one import clause, right after its directives: list every unit there.
PR0011importing '…' 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.
PR0012the unit '…' is not found: no '…' in the importer's folder or the module pathsAn 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.
PR0012the runtime unit '…' is not found: no '…' in the module paths
PR0013only 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 clauseA unit is imported twice in the import clause. Remove the second one.
PR0016only an exe has a begin body: … ends with 'end.' aloneA 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).
PR0017an exe needs a begin body before its 'end.'An exe module has no begin body. Add begin ... end. with the code the program runs.
PR0018the … section is given twiceAn initialize or finalize section given twice, or finalize before initialize. Keep one of each, initialize first.
PR0018the initialize section comes before the finalize section
PR0019a 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..
PR0020only 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.
PR0021string 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 resolvedA 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 itA 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.
PR0025a 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.
PR0025only var blocks stand before a method's begin, found …
PR0026a '…' type is declared in a type block (type Name = ...;) and used by its nameA record, object, overlay, choices or set type written inside another type expression. Declare it in a type block (type Name = ...;) and use its name.
PR0032a 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 overlaypacked 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 …
PR0035a choices type names at least one valueA choices type with no values. Name at least one value.
PR0038comparisons 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 argumentA cast given more than one argument. A cast T(X) takes exactly one value.
PR0042nested too deeply: more than … levelsCode 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 assignAn expression statement whose operator is =: it compares, and the answer is dropped. To assign, write :=.
PR0052a guard needs an except or a finally partA guard with neither an except nor a finally part. Add one, or remove the guard.
PR0053a set names its range or element type: set of 0..63, set of charA bare set with no range or element type. Name one: set of 0..63, set of char.
PR0054invalid 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 pathAn @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 ownpublic 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.
PR0060an interface's method or accessor has no body: its heading onlyAn interface method or accessor with a body or abstract. An interface member is a heading only: remove the body or the word.
PR0061expected 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.
PR0061the write of '…' takes a field name or a value name and a body, found …: write write <field>; or write(AValue) begin ... end;
PR0061a property needs its read accessor (read Field; or read begin ... end;)
PR0061a property's index is passed by value or const
PR0061an 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 hashAn operator a type cannot declare, or ... on an operator. A type declares + - * / div mod = <> < <= > >= in hash, with its operands only.
PR0062an operator takes its operands only: no '...'
PR0063the '…' here is never closedAn 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.
PR0064character 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 mainA 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.
PR0066the file '…' cannot be readA 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 characterAn 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.
PR0068a 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'sA 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
PR0073doc comment documents nothingHint: 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.

CodeMessageMeaning
SM0001'…' is used in its own declarationA 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 forwardA 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 itA 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 moduleA 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
SM0008a qualified type has exactly two parts: Module.TypeA 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.
SM0010choices '…' 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 oneself 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
SM0012parent: '…' has no parent typeparent in a method of a type that has no parent type. Remove it, or give the type a parent.
SM0013'…' is not a typeA 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).
SM0016parent is written only as parent.<member>: it names an inherited member, it is no valueparent 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 otherwiseA 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 itA 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 declaredA name declared nowhere in reach. Check the spelling, declare it, or import the unit that declares it.
SM0022invalid 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.
SM0023invalid 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.
SM0024symbol '…' is defined twice: '…' defines it alreadyTwo 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.
SM0024C 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 usedWarning: 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 onWarning: 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 statementsWarning: @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.
SM0111a test's name is emptyA test with an empty name. Give each test a name.
SM0112the test '…' is already in this module (line …)Two tests of one module with one name (the message shows the first). Rename one.
SM0113the tests of … never run: no program runs themWarning: 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 characterAn @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 keysAn @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.
SM0122no @addresdata of this build adds the key '…': it is never foundWarning: 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 oneA 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 mainA 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 resolvedA 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 constantA 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.
SM0250operator '…' 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.
SM0250operator '…' 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.
SM0252operator '…' cannot compare '…': an object compares only through an operator its type declaresA 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.
SM0252operator '…' 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 oneThe 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 assignedAn assignment to something that cannot be assigned (a constant, a const parameter, a call's result). Assign to a variable or a field.
SM0256constant 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 zeroAn 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.
SM0259shift 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 indexedA value that cannot be indexed. Only arrays, strings and the like take [i]; check the value's type.
SM0261an 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.
SM0261an index is an integer, got '…'
SM0262the bitfield '…' has no address: it cannot be taken with 'addr of' or passed to a var parameterThe 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.
SM0263a 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 widthA 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 choicesA 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.
SM0266set literal elements are of different ordinal types: '…' and '…'
SM0267low 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 valueA 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
SM0270var parameter '…' cannot take '…': a packed record holds it, it may be misalignedA 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
SM0270cannot 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 typeis / 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 descendantis / 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(…) insteadis / as on a weak reference. Test what it locks to: lock(W) (the message shows the form).
SM0276index … 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 … bytesA 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 firstA 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.
SM0301an external variable takes no initializer: its value is the one its library gives itAn external variable given an initializer. Its value is the one its library gives it: remove the initializer.
SM0302external variable '…' is declared at module level onlyAn external variable declared inside a routine. Declare it at module level.
SM0303forward type '…' has no full declaration hereA 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.
SM0305a 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.
SM0306forward 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.
SM0307forward routine '…' has no matching full declarationA 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.
SM0307forward 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'sA 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.
SM0310align … is not a power of twoThe align value is not a power of two. Use 1, 2, 4, 8 and so on, up to 8192.
SM0311align … is below the natural alignment … of '…', lower it with packedalign below the type's natural alignment (the message shows it). align only raises alignment: to lower it, use packed.
SM0312align … exceeds 8192The align value is past 8192, the largest alignment. Use at most 8192.
SM0313field '…' of '…' cannot share an overlay's storage: '…' holds a string or dynamic array, hold a ptr to itAn 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.
SM0314a bitfield is an integer, bool, char, wchar or choices fieldA bitfield (f: T : N;) of a type that takes no width. A bitfield is an integer, bool, char, wchar or choices field.
SM0315bitfield width … outside …..…A bitfield width outside 1 to its type's bit count (the message shows the range). Use a width in that range.
SM0316bitfield width … does not hold the ordinals of '…' as signed valuesA choices bitfield too narrow to hold every ordinal of its type as a signed value. Widen the bitfield.
SM0318a set of integers names its range: set of 0..255A set of an integer type. A set of integers names its range: set of 0..255.
SM0319set of wchar: its member count differs by target: write set of 0..65535A set of wchar: its member count differs by target. Name the range instead (set of 0..65535).
SM0320set range bounds are integer, char or choices of one familyA set range whose bounds are of different families. Both bounds are integers, both chars, or both values of one choices type.
SM0321a set has at most 65536 members, this range has …A set with more than 65536 members (the message gives the count). Narrow its range.
SM0322array bounds are integer, char or choices of one familyArray 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++ linkageWarning: 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 typesA 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 pathAn 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.
SM0328low bound … is above high bound …A range whose low bound is above its high bound. Swap them, or fix the one that is wrong.
SM0329a set element is char, bool or choices: '…' is notA 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.
SM0330variadic 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.
SM0331field '…' of packed record '…' cannot be packed: '…' holds a string or dynamic arrayA 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 typesoverride 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 overridesAn 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 overriddenAn 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'
SM0337an 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).
SM0337an 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 createdAn 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 itA 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 callparent.M() of an abstract method, which has no body to call. Remove the call.
SM0341'…' declares done twice: an object has one doneA type declares done twice. An object has one done: merge them.
SM0342init 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.
SM0342copy runs when an object is copied (:=, a value argument): it is never called
SM0343done runs when an object ends: it is never calledA done called by hand. Done runs when the object ends: remove the call.
SM0344parent.init(...) is the first statement of an initparent.init(...) that is not the first statement of an init. Move it to the top.
SM0345self.….init(...) is written twice: a field is built onceself.F.init(...) given twice, or out of the fields' declared order. Build each field once, in declaration order, right after parent.init(...).
SM0345self.….init(...) comes after self.….init(...): fields are built in declaration order
SM0346'…' does not exist yet: the arguments of …(...) run before the object is builtA 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.
SM0347field '…': '…' 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 initInit 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 argumentsNo init of the object takes these arguments (or it declares none). Pass the arguments an init declares.
SM0351no init of '…' takes (…)
SM0352the arguments (…) fit more than one init of '…': convert them to pick oneThe arguments fit more than one init. Convert them to the parameter types of the one you mean.
SM0353a 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 typeA type declares a second copy. One copy per type: merge them.
SM0355'…' cannot be copied, so its descendant '…' cannot declare a copyA copy declared in a type whose parent cannot be copied. A descendant of a non-copyable type cannot be copied either: drop the copy.
SM0356a copy copies the parent part by the parent's own copy: parent.init(...) is not written in a copyparent.init(...) in a copy. The parent part is copied by the parent's own copy: remove the call.
SM0357field '…' of '…' holds an object or an own / ref / weak: a record or an overlay holds noneA 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 noneown, 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 thenA member read straight through a weak, whose object may be gone. Read it through lock(W), which is nil then.
SM0361create 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.
SM0361destroy does not free an object ('…' is one): the own or ref that holds it frees it
SM0362'…' is not an interface: implements names interfaces onlyA 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 resultThe 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 differA 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 hiddenA hidden method or property that implements an interface member. An interface member is never hidden: remove hidden.
SM0368method '…' of interface '…' is already declared by its parent '…'An interface repeats a method its parent interface declares already. Remove the repeat.
SM0369embed '…' holds '…': an embed is a record, an overlay or an object, whose members its object reachesAn 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
SM0371property '…' binds '…', which is no field of '…': name a field, or write the accessor with a bodyA property accessor names something that is no field of its object. Name a field, or write the accessor with a body.
SM0372property '…' is '…', and its field '…' is '…': a bound field has the property's typeA 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.
SM0373the read of '…' cannot change '…': a read changes nothing of its objectA 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.
SM0373the read of '…' cannot call method '…' through self: a read changes nothing of its object
SM0374the write of '…' assigns the property again, forever: assign its fieldA property read in its own read, or assigned in its own write: it would recurse forever. Read or assign its field there.
SM0374the read of '…' reads the property again, forever: read its field
SM0375property '…' has no write: it is read-onlyAn 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.
SM0377an assignment to property '…' is a statement: its write has no valueAn assignment to a property used as a value. Assigning a property is a statement: do it on its own line.
SM0378property '…' is indexed: write …[<index>]An indexed property used without its index. Write P[index].
SM0379property '…' has no index: default names an indexed property, which X[i] meansdefault 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.
SM0379property '…' is a second default of '…': '…' is its default already
SM0380operator '…' takes …An operator declared with the wrong number of operands (the message says how many it takes).
SM0381operator '…' of '…' takes no '…': one of its operands is the type that declares itAn operator none of whose operands is the type that declares it. One operand is always the declaring type.
SM0382operator '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.
SM0382operator '…' gives a bool, not '…'
SM0383operator '…' of '…' is declared twice with these operand typesAn operator declared twice with the same operand types. Remove one.
SM0383operator '…' of '…' is declared here
SM0384operator '…' takes its operands by value or const, not var ('…')An operator operand passed var. Operators take their operands by value or const.
SM0386operator '…' 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 constA 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 continuesAn 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 typeA 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), … givenA call with the wrong number of arguments (the message gives both counts). Pass what the routine takes.
SM0401'…' takes … argument(s), … given
SM0402no 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.
SM0403the arguments (…) fit more than one overload of '…': convert them to pick oneThe arguments fit more than one overload, none better. Convert them to the parameter types of the one you mean.
SM0404argument … 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.
SM0404argument … of '…': '…' does not convert implicitly to '…'
SM0404argument … of '…': … does not fit in '…' (…..…)
SM0405var 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 valueA call of a routine with no result used as a value. Call it as a statement.
SM0408'…' is a statement, not a valueA 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).
SM0410size 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 nameA type passed to a routine that hides an intrinsic of the same name. Rename the routine, or pass it a value.
SM0412a cast '…(...)' takes exactly one argument, given …A cast T(...) given other than one argument. A cast takes exactly one value.
SM0413a 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.
SM0414record literal: '…' has no field '…'A record literal names a field its type does not have. Check the field name.
SM0415record literal: field '…' is given twiceA record literal gives one field twice. Give it once.
SM0416record literal: field '…' comes before '…' in '…': give the fields in their declared orderA record literal gives its fields out of their declared order. Give them in the order the record declares them.
SM0417varargs outside a variadic routinevarargs outside a variadic routine. Only a routine with ... has them.
SM0418varargs.… needs a cpplink variadic: a C caller passes no types or countA 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 valueAn 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 addressA 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
SM0426method '…' may change its object, which is const here: pass it varA 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 localA 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 pointerA 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 '…' partA 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.
SM0430no operator '…' declared for these operands takes (…)No operator declared for these operand types takes them. Declare one, or convert the operands.
SM0430operator '…' of '…' takes (…)
SM0431several operators '…' take (…) alike: give the operands their exact parameter typesSeveral declared operators take the operands alike. Give the operands their exact parameter types.
SM0431operator '…' 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 importsProjectPassword() outside a project build. It exists only in the main module of a project.toml and the units it imports: build through the project.
SM0434varargs.clist() needs a clink variadic: a cpplink variadic's arguments are a typed pack, not a C va_listvarargs.clist() in a cpplink variadic, whose arguments are a typed pack, not a C va_list. Use it in a clink variadic.
SM0500format string '…' is of type '…', not string: print, println and FormatStr take their format as a stringA 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.
SM0502format string … does not fit the … argument(s) after it: each … takes the next argument, and its format spec must suit that argument's typeA 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.
SM0600for needs a variable: '…' is …A for loop whose iterator is no variable. Name a variable there.
SM0601a 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 itThe for iterator is written inside its loop. The loop owns it: use another variable, or a while loop.
SM0603a 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.
SM0604match label … is outside '…': it never matchesA match label outside the subject's range, so it never matches. Remove or fix it.
SM0605match label … repeats label … (first at line …)A match label repeats a value an earlier label has (the message shows it). Remove the repeat.
SM0606match 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.
SM0607leave outside a loop or matchleave outside a loop or match. It leaves the innermost loop or match: use it there, or return to leave the routine.
SM0608skip outside a loopskip outside a loop. It goes to the next pass of the innermost loop: use it inside one.
SM0609… cannot jump out of finallyleave, skip or return out of a finally part. A finally part runs to its end: move the jump out of it.
SM0610return needs a value of type '…'A return with no value in a routine that returns one. Return a value of the result type.
SM0611return takes no value hereA return with a value in a routine that returns none. Drop the value, or give the routine a result type.
SM0612missing return: '…' can reach its end without returning a valueA routine with a result can reach its end without a return. Return a value on every path, or end the path with a raise.
SM0613statement has no effect: its value is computed and droppedA 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 onlyexccode() 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 assignedA 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.
SM0621variable '…' of type '…' holds a mutex: it starts unlocked and takes no initializer
SM0621parameter '…' 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
SM0622unreachable 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 runWarning: 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 endA noreturn routine whose body can reach its end. End every path with a raise, Halt, an endless loop or another noreturn call.
SM0624return in '…', which is noreturn: it never returns to its callerA return in a noreturn routine, which never returns to its caller. Remove it, or drop noreturn.
SM0625… names '…', which is not a … fileA 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 existA path directive names a file or folder that does not exist. Check the path and its prefix.
SM0627a match on '…' takes one string per label, not a rangeA range label in a match on a string. A string match takes one string per label: list them.
SM0628a … writes 'ExitCode', but the exit code is its host program's, which this write may not reachWarning: 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.
SM0700threadstatic '…' cannot be …: each thread starts with its own copy of a constantA 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.
SM0701async needs a call of a routine, not '…'async of something that is no routine call. Write async F(...).
SM0702async cannot pass var parameter '…': the caller's variable may be gone before the call endsasync 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.
SM0703await needs a task, not '…'await of something that is no task. Await the task an async gave.
SM0704await of a plain task is a statement: its call has no valueawait of a task with no result, used as a value. Await it as a statement.
SM0705an 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.
SM0706an array literal's element is one value, not a rangeAn array literal element written as a range a..b. Each element is one value: list them.
SM0707a set literal takes no comma before its ']'A set literal with a comma before its ]. Remove the trailing comma.
SM0708async 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.
SM0709return 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 bodyworkerindex() or workercount() outside a for parallel's body, where they are not known. Use them inside the body.
SM0711a for parallel's body cannot read its routine's varargsA 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 itA for parallel's bounds or worker count read its own iterator. Compute them from other values.
SM0713return 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.
SM0714an async block cannot write '…': it reads its own copy, taken at the asyncAn 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.
SM0715an async block cannot read its routine's varargsAn async block or a for parallel's body reads its routine's varargs. Copy what it needs into locals first.
SM0716an async block cannot use …: the object may be gone before the task runsself 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 statementreturn, leave or skip out of a defer statement. A deferred statement runs to its end: move the jump out.
SM0718a defer statement defers a statement, never a declarationA declaration as a defer statement's statement. defer defers a statement, never a declaration.
SM0719yield cannot hand a value out of an async block or a for parallel's bodyyield 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.
SM0719yield outside a generator (a routine whose result is a sequence)
SM0720a generator's return takes no value: yield hands its values outA return with a value in a generator. yield hands out its values; return only ends it.
SM0721generator '…' cannot take var parameter '…': its body runs after the call has returnedA generator with a var parameter or varargs. Its body runs after the call has returned: pass values instead.
SM0721generator '…' cannot take varargs: its body runs after the call has returned
SM0722for 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.
SM0723for 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).
SM0724yield 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.
SM0725yield 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.
SM0726a 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.
SM0727a flexible array member's elements are plain data: '…' holds a string, dynamic array, object or ownerA flexible array member whose elements are or hold a string, dynamic array, object or owner. Its elements are plain data only.
SM0728array[0..] of … has no size: only a record's last field or an external variable has that typearray[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 ptrA 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.
SM0730the 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).
SM0730the flexible array member '…' has no size: only an index takes it (…[i]; addr of …[0] is where it starts)
SM0731an 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).
SM0732packed(…) 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.
SM0733the generic '…' cannot be …: each instance is its own cpplink routineA 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.
SM0734the generic method '…' cannot be …: a slot holds one method, a generic method is one per instanceA 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 argumentsType 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
SM0736generic 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.
SM0737in the instance '…' made hereHint: points at the use that made the instance in which the error above happened. Fix the error there, or the type arguments given here.
SM0738the generic '…' takes its type arguments from a routine type, not from '…': give it a routine type, or call itA generic call whose arguments fix no type for one of its type parameters. Name the type arguments: F<int32>(...).
SM0738no generic '…' fits the routine type '…': its parameters and result do not match
SM0738the routine type '…' fixes no type for the type parameter '…' of '…': call it, with its type arguments named
SM0738the generic '…' is a value only where a routine type gives it its type arguments: give it one, or call it
SM0738the call of '…' fixes no type for its type parameter '…': name the type arguments
SM0739the 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.
SM0739the call of '…' gives its type parameter '…' two types, '…' and '…': name the type arguments
SM0740the routine type '…' fits more than one generic '…': call the one meant from a routine of that typeA 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)
SM0742external type '…' is declared at module level onlyAn external type declared below module level. Declare it at module level.
SM0743external 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";.
SM0744external type '…' extends '…', which is no external type of '…': a library's type extends only that library's typesAn 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 selfself 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 typeAn extend of a type that is no record, object, overlay or choices type. Only those can be extended.
SM0749an 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 hasAn 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 extendTwo 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 parametersAn extend names one type parameter twice. Rename one.
SM0753the 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.
SM0754a func literal takes no '...': its closure is called the Adam way onlyA 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.
SM0754a closure type takes no …: a closure is called the Adam way only, never from C (use a plain 'func' type for a C callback)
SM0755a 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.
SM0755a func literal cannot capture the … parameter '…': the caller's place may be gone when the closure runs
SM0756a func literal cannot read its routine's varargsA func literal reads its routine's varargs. Copy what it needs into locals first.
SM0757the 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 valueA ref object held as a value. It lives only as ref, own or weak: build it with ref T(...).
SM0759a 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 doesAn 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 methodself as a type anywhere but an object method's return type. Name the type there.
SM0765a '…' 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.
SM0766varargs.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 literalA 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 parameterA literal parameter given an argument that is no constant (nor the calling func's own literal parameter). Pass a constant.
SM0771sourcehash() is only in a program's main module: '…' is a unitsourcehash() in a unit. It exists only in a program's main module.
SM0772match on '…' does not cover: …, so '…' can reach its end through itA 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.
SM0773a bracket literal needs a place that gives it a type: an array or a setA 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 callsinline; 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 haveinline; 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 calledAn 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 endAn 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 owninline; 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

CommandArgumentWhat it doesExamples
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 exeadam 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 builtadam 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 exeadam pack mygame
info[<folder>]Print the project whose project.toml is in <folder> (default: the current folder) as one line of JSON, for an editoradam 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 changeadam 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 unitadam 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
dapnoneServe 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
lspnoneServe the Language Server Protocol on stdin / stdout, for an editor's diagnosticsadam 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'sadam help build

Options

OptionValueCommandsWhat it does
-o, --output<dir>build, cimport, benchThe 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, benchThe target, by its triple (TARGETS lists them); wins over the main module's @target
-opt, --optimize<level>build, check, benchThe optimization level: debug, safe, fast or small; wins over the main module's @optimize
--defaultsnonebuild, check-t / -opt only stand in where the main module has no @target / @optimize (an editor's toolbar)
-r, --runnonebuildRun the exe once built, in its folder (an x86_64-linux-gnu one through WSL); the arguments after -- are its own
-d, --debugnonebuildDebug 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>buildWith -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-irnonebuildAlso write <name>.ir beside the exe: the optimized IR of the program's own units, with each function's analysis
--emit-ppnonecimportPrint the headers as preprocessed (clang -E's text: line markers, then the tokens) and stop there
--emit-unitnonecimportAlso print the Adam unit the import wrote
--emit-layoutnonecimportAlso print the unit's layout probe: C _Static_asserts of every record as Adam lays it out
--checknonebenchFail when a kernel's time over C's grew more than 10% over the --baseline file's
--baseline<file,...>benchEarlier adam bench results (bench-<triple>.json) for --check; each triple compares with its own
--report<file>benchWhere adam bench writes its HTML5 report (default: bench-<triple>.html, or bench.html for several triples, in the output folder)
--render<file,...>benchMake 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>benchThe 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-bannernoneevery commandPrint no banner: for scripts and tests
-q, --quietnoneevery commandPrint only the reports: no banner, no phase or status lines (scripts, tests)
-h, --helpnoneevery commandShow the help of the command given (else adam's)
↑ ↓ moveEnter openEsc close