Docs
Diagnostics
Every error and warning the compiler reports has a code: E- for an error or W- for a warning, the area, and a number that stays with the message (E-TYPE-0042). adm check prints it beside the place, --json gives it as code, and editors show it with a link here. What the C compiler, nvcc, zig, rustc, go and the linker report on your code is shown the same way, at the line of the C, Zig, Rust or Go file, at the line of a cuda def body, or at the declaration a missing symbol belongs to. adm explain E-TYPE-0042 prints one entry in the terminal. Where the compiler knows the edit that resolves a diagnostic, it attaches a fix: editors offer it as a quick fix, adm check --fix applies them, and adm check --json lists them under fixes. In the messages below, %s and its kin stand for the names and types the compiler fills in.
Syntax
What the parser cannot read. 178 codes.
E-SYNTAX-0001 | error | illegal token %q |
E-SYNTAX-0002 | error | expected %s, found %s |
E-SYNTAX-0003 | error | too many errors; the rest of the file is not parsed |
E-SYNTAX-0004 | error | expected ',' in attribute arguments |
E-SYNTAX-0005 | error | unsupported attribute argument %s |
E-SYNTAX-0006 | error | expected identifier, found keyword %q; it cannot be used as a name |
E-SYNTAX-0007 | error | expected identifier, found %s |
E-SYNTAX-0008 | error | expected operator, found %s |
E-SYNTAX-0009 | error | an anonymous struct takes name type fields only; declare a struct for defaults, annotations and modifiers |
E-SYNTAX-0010 | error | field %q is written twice |
E-SYNTAX-0011 | error | an anonymous struct literal takes name: value fields only |
E-SYNTAX-0012 | error | style takes the properties the call sets and their values: style = {opacity: 0.8} |
E-SYNTAX-0013 | error | style = {...} is given to a component called by its name: Button("Save", style = {...}) |
E-SYNTAX-0014 | error | style lists properties of the component's style by name: {opacity: 0.8} |
E-SYNTAX-0015 | error | on takes the states and what each changes: on: {hover: {opacity: 0.8}} |
E-SYNTAX-0016 | error | a rule selects components by variant (kind<Button>().variant("primary")); it cannot ask for one |
E-SYNTAX-0017 | error | variant lists the variants to apply by name: variant: [primary, big] |
E-SYNTAX-0018 | error | only modules can be declared internal |
E-SYNTAX-0019 | error | functions cannot be declared at the top level |
E-SYNTAX-0020 | error | let declarations are not allowed at the top level |
E-SYNTAX-0021 | error | const declarations are not allowed at the top level |
E-SYNTAX-0022 | error | components cannot be declared at the top level |
E-SYNTAX-0023 | error | types cannot be declared at the top level |
E-SYNTAX-0024 | error | structs cannot be declared at the top level |
E-SYNTAX-0025 | error | enums cannot be declared at the top level |
E-SYNTAX-0026 | error | unions cannot be declared at the top level |
E-SYNTAX-0027 | error | interfaces cannot be declared at the top level |
E-SYNTAX-0028 | error | datatypes cannot be declared at the top level |
E-SYNTAX-0029 | error | services cannot be declared at the top level |
E-SYNTAX-0030 | error | views cannot be declared at the top level |
E-SYNTAX-0031 | error | styles cannot be declared at the top level |
E-SYNTAX-0032 | error | invalid declaration |
E-SYNTAX-0033 | error | unexpected %s at top level |
E-SYNTAX-0034 | error | module declarations require a name |
E-SYNTAX-0035 | error | check suites cannot be internal |
E-SYNTAX-0036 | error | check suites cannot be partial |
E-SYNTAX-0037 | error | check suites require a quoted name |
E-SYNTAX-0038 | error | unterminated %s body |
E-SYNTAX-0039 | error | property accessors must use the 'def' keyword |
E-SYNTAX-0040 | error | duplicate %s accessor |
E-SYNTAX-0041 | error | unexpected %s in property body |
E-SYNTAX-0042 | error | unterminated property body |
E-SYNTAX-0043 | error | property storage declarations require a type or initializer |
E-SYNTAX-0044 | error | nested properties are not allowed |
E-SYNTAX-0045 | error | only get/set accessors are allowed inside property bodies |
E-SYNTAX-0046 | error | property accessors cannot be async |
E-SYNTAX-0047 | error | property accessors cannot be meta |
E-SYNTAX-0048 | error | property accessors cannot be infix |
E-SYNTAX-0049 | error | property accessors require bodies |
E-SYNTAX-0050 | error | get accessor cannot declare parameters |
E-SYNTAX-0051 | error | set accessor requires exactly one parameter |
E-SYNTAX-0052 | error | views cannot have attributes |
E-SYNTAX-0053 | error | styles cannot have attributes |
E-SYNTAX-0054 | error | export declarations cannot have attributes |
E-SYNTAX-0055 | error | use declarations cannot have attributes |
E-SYNTAX-0056 | error | %s do not support where blocks |
E-SYNTAX-0057 | error | where blocks cannot have attributes |
E-SYNTAX-0058 | error | %s do not support %s declarations |
E-SYNTAX-0059 | error | embedded structs cannot have attributes |
E-SYNTAX-0060 | error | expected a declaration, found keyword %q; it cannot be used as a name |
E-SYNTAX-0061 | error | %s bodies only allow declarations; unexpected %s |
E-SYNTAX-0062 | error | unterminated where block |
E-SYNTAX-0063 | error | %s bodies cannot declare methods; use a type instead |
E-SYNTAX-0064 | error | services cannot declare %s methods |
E-SYNTAX-0065 | error | %s methods cannot be internal |
E-SYNTAX-0066 | error | %s do not support infix methods |
E-SYNTAX-0067 | error | infix methods cannot be internal |
E-SYNTAX-0068 | error | infix methods cannot be async |
E-SYNTAX-0069 | error | function declarations without bodies are only allowed inside modules |
E-SYNTAX-0070 | error | %s declarations require a type or initializer |
E-SYNTAX-0071 | error | %s bodies cannot declare properties; use a type instead |
E-SYNTAX-0072 | error | property declarations require a single identifier |
E-SYNTAX-0073 | error | properties cannot be marked atomic |
E-SYNTAX-0074 | error | properties cannot be marked weak |
E-SYNTAX-0075 | error | %s properties cannot be internal |
E-SYNTAX-0076 | error | %s members cannot be internal |
E-SYNTAX-0077 | error | a let of a style body is set once and would keep the theme it was made with: read theme where the property is assigned (background = new BackgroundFill(theme.palette.surface)) |
E-SYNTAX-0078 | error | on takes the states and what each changes: on = {hover: {opacity: 0.8}} |
E-SYNTAX-0079 | error | %s takes the properties to change and their values: %s = {opacity: 0.0} |
E-SYNTAX-0080 | error | %s is written twice in this style |
E-SYNTAX-0081 | error | $ is followed by the name of a component: $parent, $root, $prev, $next or a ref of the view |
E-SYNTAX-0082 | error | $%s names a ref of a component's view, which only the component's own style { ... } sees; a style declared apart reads $parent, $root, $prev and $next |
E-SYNTAX-0083 | error | self in a style body is the component whose own style { ... } it is; a style declared apart has none |
E-SYNTAX-0084 | error | a patch lists properties of the style by name: {opacity: 0.0} |
E-SYNTAX-0085 | error | a state takes the properties it changes: hover: {opacity: 0.8} |
E-SYNTAX-0086 | error | a state lists properties of the style by name: {opacity: 0.8} |
E-SYNTAX-0087 | error | a state cannot ask for variants: variant is set by the style's body, by code or by the call |
E-SYNTAX-0088 | error | a variant is a name and the properties it sets: big: {minHeight: 40(px)} |
E-SYNTAX-0089 | error | a variant lists properties of the style by name: {minHeight: 40(px)} |
E-SYNTAX-0090 | error | a variant cannot ask for variants: variant is set by the style's body, by code or by the call |
E-SYNTAX-0091 | error | a key of on is a state, or a list of states that all hold: hover or [hover, selected] |
E-SYNTAX-0092 | error | component bodies cannot contain attributes |
E-SYNTAX-0093 | error | types cannot have attributes |
E-SYNTAX-0094 | error | unexpected %s in component body |
E-SYNTAX-0095 | error | unterminated component body |
E-SYNTAX-0096 | error | inline component views must be declared as view { ... } |
E-SYNTAX-0097 | error | inline component styles must be declared as style { ... } |
E-SYNTAX-0098 | error | inline component controllers must be declared as type { ... } |
E-SYNTAX-0099 | error | type alias requires a target type |
E-SYNTAX-0100 | error | type aliases cannot be partial |
E-SYNTAX-0101 | error | unions cannot have attributes |
E-SYNTAX-0102 | error | interfaces cannot have attributes |
E-SYNTAX-0103 | error | datatypes cannot have attributes |
E-SYNTAX-0104 | error | enum values cannot have attributes |
E-SYNTAX-0105 | error | union variants cannot have attributes |
E-SYNTAX-0106 | error | interface methods cannot have attributes |
E-SYNTAX-0107 | error | exported modules cannot be aliased |
E-SYNTAX-0108 | error | exported symbols cannot be aliased |
E-SYNTAX-0109 | error | wildcard import cannot be combined with named symbols |
E-SYNTAX-0110 | error | unexpected tokens after wildcard import |
E-SYNTAX-0111 | error | expected ',' between imported symbols |
E-SYNTAX-0112 | error | unterminated block |
E-SYNTAX-0113 | error | unterminated check block |
E-SYNTAX-0114 | error | attributes can only be applied to declarations inside check suites |
E-SYNTAX-0115 | error | weak applies to fields only |
E-SYNTAX-0116 | error | function declarations without bodies cannot use cuda modifier |
E-SYNTAX-0117 | error | function declarations without bodies cannot use sql modifier |
E-SYNTAX-0118 | error | function declarations without bodies cannot use meta modifier |
E-SYNTAX-0119 | error | function declarations without bodies cannot be infix |
E-SYNTAX-0120 | error | %s |
E-SYNTAX-0121 | error | expected ',' between parameters |
E-SYNTAX-0122 | error | variadic parameter requires a type |
E-SYNTAX-0123 | error | parameter default value requires an expression |
E-SYNTAX-0124 | error | variadic parameter must be last |
E-SYNTAX-0125 | error | parameter requires a type (or a default value) |
E-SYNTAX-0126 | error | destructuring let requires initializer |
E-SYNTAX-0127 | error | expected identifier in destructuring let |
E-SYNTAX-0128 | error | expected identifier after 'as' |
E-SYNTAX-0129 | error | expected ',' between declarations |
E-SYNTAX-0130 | error | expected identifier in declaration |
E-SYNTAX-0131 | error | expected identifier |
E-SYNTAX-0132 | error | expected ',' or ')' |
E-SYNTAX-0133 | error | expected a dimension after %s |
E-SYNTAX-0134 | error | a dimension's exponent is an integer: Length ** 2 |
E-SYNTAX-0135 | error | a conditional junction after %s needs parentheses: write a %s (b := c || d) |
E-SYNTAX-0136 | error | conditional junction requires at least one expression |
E-SYNTAX-0137 | error | conditional junction cannot mix && and || operators |
E-SYNTAX-0138 | error | conditional junction is malformed |
E-SYNTAX-0139 | error | choice operator requires expressions for both branches |
E-SYNTAX-0140 | error | expected > after the scope of async<scope> |
E-SYNTAX-0141 | error | async call prefix expects a call expression |
E-SYNTAX-0142 | error | duplicate async call prefix |
E-SYNTAX-0143 | error | expected ',' between lambda parameters |
E-SYNTAX-0144 | error | expected '=>' after lambda parameters |
E-SYNTAX-0145 | error | lambda requires an expression body |
E-SYNTAX-0146 | error | expected '=>' after lambda parameter |
E-SYNTAX-0147 | error | expected expression in string interpolation |
E-SYNTAX-0148 | error | assert requires an expression |
E-SYNTAX-0149 | error | expected ',' between arguments |
E-SYNTAX-0150 | error | duplicate named argument %q |
E-SYNTAX-0151 | error | positional arguments cannot follow named arguments |
E-SYNTAX-0152 | error | new expression requires a type |
E-SYNTAX-0153 | error | unexpected token %s in array literal |
E-SYNTAX-0154 | error | type cast requires an expression |
E-SYNTAX-0155 | error | type cast expects exactly 1 argument, got %d |
E-SYNTAX-0156 | error | invalid escape %q in a string: use \n, \t, \r, \\, \", \xHH, \uHHHH or \UHHHHHHHH |
E-SYNTAX-0157 | error | check suites are not allowed inside function bodies |
E-SYNTAX-0158 | error | unexpected token %q in statement |
E-SYNTAX-0159 | error | duplicate every block |
E-SYNTAX-0160 | error | duplicate empty block |
E-SYNTAX-0161 | error | duplicate finish block |
E-SYNTAX-0162 | error | recover requires an expression |
E-SYNTAX-0163 | error | expected case or default clause |
E-SYNTAX-0164 | error | case requires at least one expression |
E-SYNTAX-0165 | error | match case requires at least one pattern |
E-SYNTAX-0166 | error | invalid match pattern |
E-SYNTAX-0167 | error | expected ',' between struct pattern fields |
E-SYNTAX-0168 | error | invalid tuple pattern element |
E-SYNTAX-0169 | error | defer requires a call expression |
E-SYNTAX-0170 | error | yield requires a value |
E-SYNTAX-0171 | error | send statement requires a value |
E-SYNTAX-0172 | error | dispose requires an expression |
E-SYNTAX-0173 | error | expected identifier for onerror binding |
E-SYNTAX-0174 | error | expected type for onerror binding |
E-SYNTAX-0175 | error | union requires a type on the right-hand side |
E-SYNTAX-0176 | error | intersection requires a type on the right-hand side |
E-SYNTAX-0177 | error | reserved keyword %q cannot be used as an identifier |
E-SYNTAX-0178 | error | unexpected token %q in expression |
Names
Names, declarations, imports and overloads. 35 codes.
E-NAME-0001 | error | partial type %q cannot be an alias |
E-NAME-0002 | error | partial type %q must repeat the generic parameter list of its other parts |
E-NAME-0003 | error | embedded style %q redeclares %q |
E-NAME-0004 | error | controller member %q conflicts with existing %s |
E-NAME-0005 | error | internal scope %q must be a namespace that contains module %q |
E-NAME-0006 | error | module %q is internal to %s in another file; every internal part must name the same scope |
E-NAME-0007 | error | %q is internal to module %q |
E-NAME-0008 | error | module %q has no symbol %q |
E-NAME-0009 | error | mixed partial and non-partial definitions for %s %q |
E-NAME-0010 | error | duplicate pattern binding %q |
E-NAME-0011 | error | undefined identifier %q |
E-NAME-0012 | error | module %q is reserved for the standard library |
E-NAME-0013 | error | application %q is missing def new entrypoint |
E-NAME-0014 | error | unknown module %q |
E-NAME-0015 | error | module %q is internal to %s |
E-NAME-0016 | error | module %q is internal to library %q; it exports %s |
E-NAME-0017 | error | cannot alias module %q when importing symbols |
E-NAME-0018 | error | undefined identifier %q; declare the loop variable with for let %s in ... |
E-NAME-0019 | error | unknown controller type %q |
E-NAME-0020 | error | @on target %q.%s is ambiguous (overloaded); overload selection is not supported in @on |
E-NAME-0021 | error | duplicate field %q in struct pattern |
E-NAME-0022 | error | unknown builtin primitive %q |
E-NAME-0023 | error | duplicate union variant %q (previously at %d:%d) |
E-NAME-0024 | error | duplicate interface method %q (previously at %d:%d) |
E-NAME-0025 | error | unknown type %q |
E-NAME-0026 | error | unknown module alias %q (add use <module> to import it) |
E-NAME-0027 | error | where constraint references unknown generic %q |
E-NAME-0028 | error | unknown initializer field %q on %s |
E-NAME-0029 | error | duplicate enum value %q (previously at %d:%d) |
E-NAME-0030 | error | unknown function %q |
E-NAME-0031 | error | ambiguous overload of %q for arguments (%s); candidates: %s |
E-NAME-0032 | error | unknown named argument %q |
E-NAME-0033 | error | ambiguous overload of %q for argument (%s) on %s; candidates: %s |
E-NAME-0034 | error | duplicate field %q |
E-NAME-0035 | error | unknown field %q in struct literal |
Types
Types, expressions and statements. 203 codes.
E-TYPE-0001 | error | %s is only valid inside functions |
E-TYPE-0002 | error | datatype fields cannot be marked weak |
E-TYPE-0003 | error | a field cannot be both atomic and weak |
E-TYPE-0004 | error | weak field must declare an optional reference type (?T) |
E-TYPE-0005 | error | weak field must have an optional reference type (?T), got %s |
E-TYPE-0006 | error | the default of %q cannot name %q: a default is evaluated before the instance exists; assign the field in the constructor (def new()) |
E-TYPE-0007 | error | '%s' names %d functions; give the variable the function type of the one meant |
E-TYPE-0008 | error | array element type mismatch: got %s, want %s |
E-TYPE-0009 | error | initializer count mismatch: got %d values for %d names |
E-TYPE-0010 | error | tuple destructuring mismatch: got %d bindings for %d elements |
E-TYPE-0011 | error | destructuring let expects tuple or struct-like value, got %s |
E-TYPE-0012 | error | %s has no field %q |
E-TYPE-0013 | error | condition must be bool, got %s |
E-TYPE-0014 | error | break statement requires enclosing loop |
E-TYPE-0015 | error | continue is not allowed inside select |
E-TYPE-0016 | error | continue statement requires enclosing loop |
E-TYPE-0017 | error | defer does not support onerror handlers |
E-TYPE-0018 | error | dispose expects a struct/type instance, got %s |
E-TYPE-0019 | error | multi-assignment only supports '=' |
E-TYPE-0020 | error | multi-assignment requires at least 1 target and 1 value |
E-TYPE-0021 | error | multi-assignment gives %d targets one value; unpack a tuple with (a, b) = value |
E-TYPE-0022 | error | multi-assignment requires the same number of targets and values (%d vs %d) |
E-TYPE-0023 | error | function %q cannot be declared inside a function body; write let %s = def (...) { ... }, or declare it in the module |
E-TYPE-0024 | error | a tuple of targets only supports '=' |
E-TYPE-0025 | error | cannot unpack %s into %d targets; the value is not a tuple |
E-TYPE-0026 | error | cannot unpack a tuple of %d elements into %d targets |
E-TYPE-0027 | error | the result may be an error and is dropped; use try, handle it with onerror, or discard it with _ = |
E-TYPE-0028 | error | missing return |
E-TYPE-0029 | error | range loop binding cannot use destructuring |
E-TYPE-0030 | error | range loop binding type must be int, got %s |
E-TYPE-0031 | error | range loop requires exactly 1 binding name |
E-TYPE-0032 | error | range loop binding cannot be const |
E-TYPE-0033 | error | range loop binding must be int, got %s |
E-TYPE-0034 | error | range loop binding must be an identifier |
E-TYPE-0035 | error | every block requires enclosing loop |
E-TYPE-0036 | error | for-in binds a value, or a key and a value, got %d names |
E-TYPE-0037 | error | %s has no index or key to bind: write (_, value) or a single name (two names never destructure the element) |
E-TYPE-0038 | error | switch default clause cannot have expressions |
E-TYPE-0039 | error | switch case must be bool, got %s |
E-TYPE-0040 | error | switch case type mismatch: got %s, want %s |
E-TYPE-0041 | error | switch guard must be bool, got %s |
E-TYPE-0042 | error | select default clause cannot have expressions |
E-TYPE-0043 | error | select guard must be bool, got %s |
E-TYPE-0044 | error | match case pattern %d missing binding %q |
E-TYPE-0045 | error | match guard must be bool, got %s |
E-TYPE-0046 | error | %s is a value, and a case of match names a type or a pattern: use switch to compare values |
E-TYPE-0047 | error | match pattern type mismatch: got %s, want %s |
E-TYPE-0048 | error | .%s reads an element of a tuple; this is %s |
E-TYPE-0049 | error | .%s is not a position in a tuple; write it without leading zeros |
E-TYPE-0050 | error | %s has %d elements, .0 to .%d |
E-TYPE-0051 | error | tuple pattern type mismatch: got %s, want tuple |
E-TYPE-0052 | error | tuple pattern arity mismatch: got %d, want %d |
E-TYPE-0053 | error | previous use of %q |
E-TYPE-0054 | error | struct pattern type mismatch: got %s, want struct-like type |
E-TYPE-0055 | error | struct pattern field %q type mismatch: got %s, want %s |
E-TYPE-0056 | error | map expects 2 type arguments (key, value) |
E-TYPE-0057 | error | array expects 1 type argument, got %d |
E-TYPE-0058 | error | %s expects %d type arguments, got %d |
E-TYPE-0059 | error | type argument %d does not satisfy bound: got %s, want %s |
E-TYPE-0060 | error | %s is not a generic type |
E-TYPE-0061 | error | union variant %q requires a type |
E-TYPE-0062 | error | embedded type %q is not an interface |
E-TYPE-0063 | error | recursive interface embedding of %s |
E-TYPE-0064 | error | previously seen %s here |
E-TYPE-0065 | error | recursive datatype embedding of %s |
E-TYPE-0066 | error | identifier %q is not a type |
E-TYPE-0067 | error | qualified type must use imported module alias (e.g. use std.reflection then reflection.MetaContext) |
E-TYPE-0068 | error | module %q symbol %q is not a type |
E-TYPE-0069 | error | module %q has no type %q |
E-TYPE-0070 | error | %s %q is internal to %s |
E-TYPE-0071 | error | %s %q is internal |
E-TYPE-0072 | error | property %q is write-only (missing get accessor) |
E-TYPE-0073 | error | compound assignment to property %q requires both get and set accessors |
E-TYPE-0074 | error | property %q is read-only (missing set accessor) |
E-TYPE-0075 | error | cannot assign to const %q; a const keeps the value it was declared with |
E-TYPE-0076 | error | an element of a tuple cannot be assigned; make a new tuple |
E-TYPE-0077 | error | a tuple of targets stands alone on the left of '=': (a, b) = value |
E-TYPE-0078 | error | where blocks require a generic declaration |
E-TYPE-0079 | error | where blocks require generic parameters |
E-TYPE-0080 | error | where block requires a constraint expression |
E-TYPE-0081 | error | where constraint must target a generic parameter |
E-TYPE-0082 | error | where constraint must compare a generic parameter with a type |
E-TYPE-0083 | error | where constraint parameters must match (%s vs %s) |
E-TYPE-0084 | error | unsupported where constraint expression |
E-TYPE-0085 | error | binary operands must match: %s vs %s |
E-TYPE-0086 | error | %s must be int, got %s |
E-TYPE-0087 | error | try requires errorable return type |
E-TYPE-0088 | error | try requires errorable return type, got %s |
E-TYPE-0089 | error | %s requires function to return an errorable type |
E-TYPE-0090 | error | %s requires errorable return type, got %s |
E-TYPE-0091 | error | onerror binding requires exactly 1 name |
E-TYPE-0092 | error | onerror binding type must be error, got %s |
E-TYPE-0093 | error | %s: use try to unwrap %s |
E-TYPE-0094 | error | %s: optional value %s requires explicit none handling |
E-TYPE-0095 | error | %s: %s does not satisfy datatype %s%s |
E-TYPE-0096 | error | %s type mismatch: got %s, want %s |
E-TYPE-0097 | error | %s is a type, not a value |
E-TYPE-0098 | error | is: %s is error or %s; test one of those, or use try to unwrap it |
E-TYPE-0099 | error | is comparison requires a type on the right |
E-TYPE-0100 | error | %s is not compatible with datatype %s%s |
E-TYPE-0101 | error | %s does not implement interface %s |
E-TYPE-0102 | error | spread (...) is only allowed in call arguments |
E-TYPE-0103 | error | unary operator %q expects numeric operand, got %s |
E-TYPE-0104 | error | unary operator %q expects bool or integral operand, got %s |
E-TYPE-0105 | error | unary operator %q expects integral operand, got %s |
E-TYPE-0106 | error | a range is not a value: a..b is only the header of a loop, for let i in a..b |
E-TYPE-0107 | error | in expects array or map container, got %s |
E-TYPE-0108 | error | in operand type mismatch: got %s, want %s |
E-TYPE-0109 | error | in on an array of %s is not supported; use .includes(x), which compares with == |
E-TYPE-0110 | error | %s values cannot be compared with %s: the type defines no infix %s |
E-TYPE-0111 | error | tuples cannot be compared with %s; compare their members |
E-TYPE-0112 | error | operator %s is not defined on arrays (%s); matrix arithmetic is on matrix<T> |
E-TYPE-0113 | error | tuple literal requires at least one element |
E-TYPE-0114 | error | type cast requires a value, e.g. byte[](text) |
E-TYPE-0115 | error | cannot cast %s to %s |
E-TYPE-0116 | error | try expects errorable expression, got %s |
E-TYPE-0117 | error | choice condition must be bool |
E-TYPE-0118 | error | assert requires bool, got %s |
E-TYPE-0119 | error | %s has no member %q |
E-TYPE-0120 | error | could not parse expression |
E-TYPE-0121 | error | onerror handler requires errorable %s, got %s |
E-TYPE-0122 | error | onerror handler must recover or fail |
E-TYPE-0123 | error | onerror handler must recover |
E-TYPE-0124 | error | conditional member %q has inconsistent types: %s vs %s |
E-TYPE-0125 | error | new(...) names no type and nothing declared here takes the value: write the type, new T(...) |
E-TYPE-0126 | error | cannot instantiate %s %s |
E-TYPE-0127 | error | type %s has no constructor; use named arguments to initialize members |
E-TYPE-0128 | error | cannot slice map types |
E-TYPE-0129 | error | index must be %s, got %s |
E-TYPE-0130 | error | map literal entries must specify a value |
E-TYPE-0131 | error | cannot slice non-sliceable type %s |
E-TYPE-0132 | error | cannot index non-indexable type %s |
E-TYPE-0133 | error | recursive embedding of %s |
E-TYPE-0134 | error | conflicting field %q types: %s vs %s |
E-TYPE-0135 | error | previous definition of %q |
E-TYPE-0136 | error | datatype fields cannot be marked atomic |
E-TYPE-0137 | error | an enum value is a constant: a number, another member, a const, or arithmetic over those |
E-TYPE-0138 | error | cannot modify const %q; its value is frozen (clone() it for a copy you can change) |
E-TYPE-0139 | error | cannot modify const %q: %s changes it in place (clone() it for a copy you can change) |
E-TYPE-0140 | error | variadic parameter cannot declare multiple names |
E-TYPE-0141 | error | variadic parameters cannot have default values |
E-TYPE-0142 | error | this literal has no type here: write its type (Type{...}, map<K, V>{...}) |
E-TYPE-0143 | error | cannot call %s: the element is not a function |
E-TYPE-0144 | error | union variant constructors do not accept type arguments |
E-TYPE-0145 | error | union variant constructors do not accept named arguments |
E-TYPE-0146 | error | union %q has no variant %q |
E-TYPE-0147 | error | union variant constructor %q expects 1 argument, got %d |
E-TYPE-0148 | error | a literal without a type cannot be converted: write %s{...} |
E-TYPE-0149 | error | %s.%s does not take arguments |
E-TYPE-0150 | error | cannot dispatch method on non-named receiver of type %s |
E-TYPE-0151 | error | %s has no method %q; %q is a field or local here and shadows module %s, so call %s.%s outside the type or through a helper |
E-TYPE-0152 | error | cannot call non-function |
E-TYPE-0153 | error | named arguments require a direct function call |
E-TYPE-0154 | error | %q is not callable |
E-TYPE-0155 | error | no overload of %q matches arguments (%s); candidates: %s |
E-TYPE-0156 | error | named arguments are not supported for variadic functions |
E-TYPE-0157 | error | call argument count mismatch: got %d, want %d |
E-TYPE-0158 | error | argument %q is provided more than once |
E-TYPE-0159 | error | missing argument %q |
E-TYPE-0160 | error | missing argument %d |
E-TYPE-0161 | error | no overload of %q matches argument (%s) on %s |
E-TYPE-0162 | error | lambda parameters cannot be variadic or have default values |
E-TYPE-0163 | error | lambda parameter requires a type (or must be used in a typed context) |
E-TYPE-0164 | error | argument %d type mismatch: got %s, want bigint |
E-TYPE-0165 | error | multiple spread (...) arguments are not supported |
E-TYPE-0166 | error | spread (...) requires a variadic function |
E-TYPE-0167 | error | spread (...) must be the final argument |
E-TYPE-0168 | error | spread (...) must appear after fixed arguments |
E-TYPE-0169 | error | call argument count mismatch: got %d, want at least %d |
E-TYPE-0170 | error | spread (...) expects an array argument, got %s |
E-TYPE-0171 | error | fail inside an onerror handler needs an errorable enclosing function; recover here, or declare the function's result as !T |
E-TYPE-0172 | error | fail requires errorable return type |
E-TYPE-0173 | error | fail requires errorable return type, got %s |
E-TYPE-0174 | error | return needs a value: the function returns %s |
E-TYPE-0175 | error | function has no return value |
E-TYPE-0176 | error | recover is only allowed inside call onerror handlers |
E-TYPE-0177 | error | dispose cannot declare a result |
E-TYPE-0178 | error | a matrix size in the type must be an integer known at compile time; use matrix<T>[].size(rows, cols) for sizes computed at run time |
E-TYPE-0179 | error | matrix product %s * %s: the columns of the left (%d) must equal the rows of the right (%d) |
E-TYPE-0180 | error | matrix %s needs equal shapes, got %s and %s |
E-TYPE-0181 | error | matrix literal row %d has %d values, row 0 has %d; the rows of a matrix must have the same length |
E-TYPE-0182 | error | matrix cell type mismatch: got %s, want %s |
E-TYPE-0183 | error | matrix literal is %d×%d, the type %s is %d×%d |
E-TYPE-0184 | error | cannot infer the type arguments of %s from this new: nothing declared takes the value and the constructor's arguments do not settle them; write them: new %s<...>(...) |
E-TYPE-0185 | error | property %q has inconsistent types: %s vs %s |
E-TYPE-0186 | error | property %q %s accessor type mismatch: got %s, want %s |
E-TYPE-0187 | error | property %q get accessor must declare a return type |
E-TYPE-0188 | error | property %q set accessor cannot declare a return type |
E-TYPE-0189 | error | property %q set accessor requires a parameter |
E-TYPE-0190 | error | property %q set accessor parameter must declare a type |
E-TYPE-0191 | error | property %q storage type mismatch: got %s, want %s |
E-TYPE-0192 | error | %s: %s holds %d bits and %s holds %d; a bitcast needs vectors of the same size |
E-TYPE-0193 | error | cannot infer struct literal type for generic %s; use %s{...} or specify type arguments |
E-TYPE-0194 | error | field %q of an anonymous struct takes its type from its value: write the value's type (Type{...}, struct { ... }, map<K, V>{...}) |
E-TYPE-0195 | error | field %q of an anonymous struct takes its type from its value, and none has none: declare a struct with an optional field |
E-TYPE-0196 | error | struct spread expects struct type, got %s |
E-TYPE-0197 | error | cannot assign spread field %q of type %s to %s |
E-TYPE-0198 | error | struct literal keys must be identifiers |
E-TYPE-0199 | error | struct literal entries must specify a value |
E-TYPE-0200 | error | Permission spec must name a type |
E-TYPE-0201 | error | cannot assign %s to field %q of type %s |
E-TYPE-0202 | error | where constraints must reference types |
W-TYPE-0001 | warning | %s is deprecated%s |
Async
async, await, generators, channels and tasks. 40 codes.
E-ASYNC-0001 | error | send expects channel<T>, got %s |
E-ASYNC-0002 | error | mutating iterated map %q inside forall is not allowed |
E-ASYNC-0003 | error | forall does not support C-style loop headers; use forall let ... in ... |
E-ASYNC-0004 | error | forall requires a range-style header: forall let ... in <iterable> |
E-ASYNC-0005 | error | forall requires let bindings in the header |
E-ASYNC-0006 | error | forall bindings cannot have initializers; use forall let ... in ... |
E-ASYNC-0007 | error | forall currently supports ranges, arrays, strings, maps, and channels; got %s |
E-ASYNC-0008 | error | for-in expects an array, map, string, channel, or a type with def iterate() ?T (builtin.Iterator), got %s |
E-ASYNC-0009 | error | select case expects channel, got %s |
E-ASYNC-0010 | error | %s: await async %s to use %s |
E-ASYNC-0011 | error | receive expects channel<T>, got %s |
E-ASYNC-0012 | error | future boolean composition requires both operands to be async: %s vs %s |
E-ASYNC-0013 | error | await expects async value, got %s |
E-ASYNC-0014 | error | await expects an async value, and this returns nothing: the call is not async, so it has finished when it returns; remove the await |
E-ASYNC-0015 | error | async<...> expects an AsyncScope, got %s |
E-ASYNC-0016 | error | async call prefix requires a direct function call |
E-ASYNC-0017 | error | async call prefix cannot be combined with onerror |
E-ASYNC-0018 | error | async call prefix is not supported on union variant constructors |
E-ASYNC-0019 | error | async call prefix is not supported on type conversions |
E-ASYNC-0020 | error | future helpers do not accept type arguments |
E-ASYNC-0021 | error | future helpers do not accept named arguments |
E-ASYNC-0022 | error | future.%s does not take arguments |
E-ASYNC-0023 | error | future.keepAlive does not take arguments |
E-ASYNC-0024 | error | future.cancel expects 0 or 1 arguments, got %d |
E-ASYNC-0025 | error | future.cancel reason must be string, got %s |
E-ASYNC-0026 | error | future.timeout expects 1 argument, got %d |
E-ASYNC-0027 | error | future.timeout expects duration, got %s |
E-ASYNC-0028 | error | future.scope expects 1 argument, got %d |
E-ASYNC-0029 | error | future.scope expects an AsyncScope, got %s |
E-ASYNC-0030 | error | async prefix is not supported on component instantiation |
E-ASYNC-0031 | error | fail is not allowed inside forall bodies |
E-ASYNC-0032 | error | return is not allowed inside forall bodies |
E-ASYNC-0033 | error | a generator ends with a bare return; it yields its values |
E-ASYNC-0034 | error | %s cannot yield: a generator is a plain function that returns Iterator<T> |
E-ASYNC-0035 | error | a generator cannot have %s blocks |
E-ASYNC-0036 | error | yield is only valid inside functions |
E-ASYNC-0037 | error | yield needs a function that returns Iterator<T> |
E-ASYNC-0038 | error | yield is not allowed inside forall bodies |
E-ASYNC-0039 | error | yield is not allowed inside a transaction |
E-ASYNC-0040 | error | a constructor cannot declare a result; new always yields the instance, so work that can fail belongs in a method or a factory function returning !T |
Contracts
expects, provides and transactions. 17 codes.
E-CONTRACT-0001 | error | expects block cannot be guarded |
E-CONTRACT-0002 | error | provides block cannot be guarded |
E-CONTRACT-0003 | error | begin block cannot be guarded |
E-CONTRACT-0004 | error | rollback block cannot be guarded |
E-CONTRACT-0005 | error | expects block must appear at start of function body |
E-CONTRACT-0006 | error | provides block must appear at end of function body |
E-CONTRACT-0007 | error | begin block must appear before rollback block |
E-CONTRACT-0008 | error | %s block must be declared at function top level |
E-CONTRACT-0009 | error | expects block already declared in this function |
E-CONTRACT-0010 | error | provides block already declared in this function |
E-CONTRACT-0011 | error | begin block must be declared at function top level |
E-CONTRACT-0012 | error | begin block already declared in this function |
E-CONTRACT-0013 | error | rollback block must be declared at function top level |
E-CONTRACT-0014 | error | rollback block already declared in this function |
E-CONTRACT-0015 | error | %s block cannot reference outer local %q; use parameters or heap/module state instead |
E-CONTRACT-0016 | error | %s blocks can only contain assert statements |
E-CONTRACT-0017 | error | rollback statement requires enclosing transaction |
Services
Services, events and @remote. 30 codes.
E-SERVICE-0001 | error | service %q does not satisfy ServiceDescriptor%s |
E-SERVICE-0002 | error | service %q must declare %s %s |
E-SERVICE-0003 | error | services cannot declare %q; service lifecycle is managed by the runtime |
E-SERVICE-0004 | error | @emit methods cannot be async |
E-SERVICE-0005 | error | @emit is only valid inside a service body or a component's type |
E-SERVICE-0006 | error | @%s is only valid inside a service body |
E-SERVICE-0007 | error | @emit immediate must be a bool literal |
E-SERVICE-0008 | error | @query methods cannot be async |
E-SERVICE-0009 | error | @on requires a service method reference (e.g. @on(Storage.open)) |
E-SERVICE-0010 | error | @on target must be a service or a component (e.g. Storage.open, Button.clicked) |
E-SERVICE-0011 | error | @on target must name a method |
E-SERVICE-0012 | error | @on target %q has no method %q |
E-SERVICE-0013 | error | @on cannot observe @query methods (queries do not emit events) |
E-SERVICE-0014 | error | @on target must be a @commit or @emit method |
E-SERVICE-0015 | error | @on(%s.%s) hears a service: its handler takes %s, not ComponentEvent (the envelope of a component's events) |
E-SERVICE-0016 | error | cannot instantiate service %s |
E-SERVICE-0017 | error | @persist cannot mark a field of service %s: kept values are read from the vault, and %s needs %s started first |
E-SERVICE-0018 | error | @persist cannot mark a field of service %s: it is the service that keeps the values |
E-SERVICE-0019 | error | @remote applies to a type or struct that implements the interface |
E-SERVICE-0020 | error | @remote names the interface it serves: @remote<Interface> |
E-SERVICE-0021 | error | @remote<%s>: %s is not an interface |
E-SERVICE-0022 | error | @remote<%s>: %s does not implement %s |
E-SERVICE-0023 | error | %s: %s is not an interface |
E-SERVICE-0025 | error | method %s is generic; a remote method takes and returns types both sides know |
E-SERVICE-0026 | error | method %s must be errorable (!%s): a call that crosses to another process can always fail |
E-SERVICE-0027 | error | method %s: parameter %d (%s) cannot cross to another process: %s |
E-SERVICE-0028 | error | method %s: its result %s cannot cross to another process: %s |
E-SERVICE-0029 | error | IPC.connect<%s>: %s is not an interface |
E-SERVICE-0030 | error | IPC.%s: %s is not marked @remote<Interface>; mark it for each interface it serves |
E-SERVICE-0031 | error | service dependency cycle: %s |
UI
Components, views and styles. 67 codes.
E-UI-0001 | error | component %q must define a view block (inline or referenced) |
E-UI-0002 | error | component %q must define a style block (inline or referenced) |
E-UI-0003 | error | component controller must be a type marked with @controller(), got %s |
E-UI-0004 | error | component controller type %q must be marked with @controller() |
E-UI-0005 | error | controller %s has the type parameters <%s> and component %s has <%s>: a component's controller declares the component's own, in its order |
E-UI-0006 | error | weak field target must be a struct, type, service or component: a field of the kind style holds its style and has no weak form |
E-UI-0007 | error | weak field target must be a struct, type, service or component, got %s |
E-UI-0008 | error | children() is reached a second time on the same run: the caller's components have one place; put the two under the arms of one if |
E-UI-0009 | error | children() stands in a loop: the caller's components have one place; call it once, outside the loop |
E-UI-0010 | error | component %q takes no block of components: its view never calls children(); add children() where they go in its view, or remove the block |
E-UI-0011 | error | an input of function type cannot be bind = true: a handler is called by the component, not assigned |
E-UI-0012 | error | a component has one value input: %q is marked @input(value = true) too |
E-UI-0013 | error | @state marks a field in the type { ... } of a component or in its @controller() type: a change of it is emitted as that component's UI.stateChange |
E-UI-0014 | error | @persist marks a field of a type, a service or a component, and %s is a struct: declare it type %s for its objects to start with the kept value |
E-UI-0015 | error | @persist marks a field of a type, a service or a component: its value is kept between runs and is what the next object made starts with |
E-UI-0016 | error | children() takes no block: it places what the caller of the component wrote in its own |
E-UI-0017 | error | a placed view takes no block: what it shows is the view itself |
E-UI-0018 | error | %q is not a style property of %s; mark it @styleProperty to use it outside the style |
E-UI-0019 | error | missing type StyleNode for style context: style blocks need std.ui (use std.ui) |
E-UI-0020 | error | missing type StyleClass for style context: style blocks need std.ui (use std.ui) |
E-UI-0021 | error | ref = %s declares a member of a component: write the call in the view { ... } of a component that has a type { ... } of its own, not in a view declared by name or shared through type Name |
E-UI-0022 | error | cannot instantiate controller %s: it is the body of the components that name it as their type; make one of those |
E-UI-0023 | error | @on target %s.%s is not an event: mark the method @emit() in the component |
E-UI-0024 | error | @on(%s.%s) hears a component: its handler takes %s, not Event (the envelope of a service's events) |
E-UI-0025 | error | @on expects 1 or 2 arguments (the component's event, optionally which components to hear) |
E-UI-0026 | error | @on(%s, ...) takes a filter, def(Event<%s>) bool, or a matcher, a value with def matchesEvent(result %s, listener ?component) bool; got %s |
E-UI-0027 | error | an @on filter held in a value must be a function, not %s (it may be none): give it the type of the function |
E-UI-0028 | error | component %q takes no type arguments |
E-UI-0029 | error | component %q expects %d type arguments, got %d |
E-UI-0030 | error | cannot infer the type argument %s of component %q from this call; write it: %s<...>(...) |
E-UI-0031 | error | the style of component %q holds no value typed with its type parameter (%s is %s): one style object serves every instance of the component; keep the value in the component's type |
E-UI-0032 | error | style = {...} gives properties to the style of the component a call makes, or of the kind the selector of a rule names (rule(kind<Button>(), style = {...})); this call makes no component and names no kind |
E-UI-0033 | error | onerror handlers are not supported on component instantiation |
E-UI-0034 | error | a component takes at most one unnamed argument, for its @input(value = true) field; name the others |
E-UI-0035 | error | component %q takes no unnamed argument: none of its inputs is marked @input(value = true); pass it by name |
E-UI-0036 | error | component %q has no member %q |
E-UI-0037 | error | %q is a field of component %q, not an input: a call passes the fields marked @input; mark the field, or assign it after the call |
E-UI-0038 | error | component %q needs its input %q: the input has no initial value, so every call passes it (%s = ...) |
E-UI-0039 | error | no style of %s or of this module has the property %q; a rule for another style names its kind: rule(kind<Card>(), style = {...}) |
E-UI-0040 | error | %q is %s in %s and %s in %s; a rule that sets it names the kind: rule(kind<Card>(), style = {...}) |
E-UI-0041 | error | style = {...} gives properties to the style of the component a call makes, or of the components a rule of std.ui selects (rule(role(Role.Button), style = {...})); this call is neither |
E-UI-0042 | error | state %q is also %s: the states of a component share one set of names |
E-UI-0043 | error | %q is not a variant of the style: %s |
E-UI-0044 | error | %q is not a state of component %s: a state is one of %s, a @state bool field of the component, or a case of a @state enum field |
E-UI-0045 | error | style %s names the state %q in its on, which component %s does not have: a state is one of %s, a @state bool field of the component, or a case of a @state enum field |
E-UI-0046 | error | %q is not a variant of component %s: %s |
E-UI-0047 | error | unknown %s %q |
E-UI-0048 | error | component %s must reference a %s, got %s %q |
E-UI-0049 | error | embedded style %q redeclares property %q |
E-UI-0050 | error | a component declares no member named ref: on a call of the component, ref = name is how the calling view names it; rename the member |
E-UI-0051 | error | every component has a field %q: rename this one |
E-UI-0052 | error | ref names a component a view places: it is given on a component call that is a statement of a view |
E-UI-0053 | error | ref takes a new name: it declares that name as a member of the component, holding the child the call places |
E-UI-0054 | error | ref %q is given twice in this view: a ref names one component; rename one of them |
E-UI-0055 | error | ref %q: the name is taken by a %s in scope here, which hides the member the ref declares; rename one of them |
E-UI-0056 | error | ref %q stands in a loop, where it would name the component of every round: give the round a component of its own and put the ref in its view |
E-UI-0057 | error | an optional slot may hold nothing: place it under if !(%s is none) { ... } |
E-UI-0058 | error | a view takes no arguments: a slot that receives something is a function returning a view (def(T) view) |
E-UI-0059 | error | this call may return no view: keep its result in a let and place it under if !(name is none) { name() } |
E-UI-0060 | error | a view is placed by a statement of a view, not from a function |
E-UI-0061 | error | %q cannot be assigned here: only the block of a component call assigns, and only that component's slots |
E-UI-0062 | error | component %q has no slot %q |
E-UI-0063 | error | %q is not a slot of %q: a block assigns only inputs typed view (or a function returning one); pass this one in the parentheses, %s(%s = ...) |
E-UI-0064 | error | %q is a slot of %q and also %s in scope here, where the block is written: rename one of them |
E-UI-0065 | error | slot %q needs a fallback or to be optional: write %s view = view { ... }, or %s ?view = none and place it under if !(%s is none) |
E-UI-0066 | error | a @scoped component names no style: it is not laid out or drawn, its children are placed as its parent's; remove the style, or the annotation |
E-UI-0067 | error | a @scoped component declares no render: it is not drawn; remove the method, or the annotation |
Annotations
Annotations and build-time metas. 58 codes.
E-META-0001 | error | @%s runs during the build, and the program that calls it did not build: %s |
E-META-0002 | error | @%s adds members during the build, before names are resolved, and was not found then: it annotates a partial type declared in a module, and the file names its module (use %s, or %s.%s after it) |
E-META-0003 | error | @%s is %s here, but the build ran %s for it, which the file's imports also offer: write the annotation with its module's name |
E-META-0004 | error | @%s runs during the build and sets one value: annotate a single name with a declared type |
E-META-0005 | error | @%s runs during the build and sets the value: the declaration takes no initializer |
E-META-0006 | error | @%s runs during the build, outside the program: its arguments are literals |
E-META-0007 | error | @%s: %s |
E-META-0008 | error | @%s set bytes: that takes a byte[] constant, got %s |
E-META-0009 | error | @%s set %s, and %s is declared %s |
E-META-0010 | error | @%s can only annotate methods |
E-META-0011 | error | @persist takes the key the value is kept under as a string written in place: @persist("sidebar.width") |
E-META-0012 | error | @persist key %q is not a name a value can be kept under: 1 to %d letters a to z and A to Z, digits, '.', '_' and '-' |
E-META-0013 | error | @persist marks one field: %d fields declared together would be kept under the same key |
E-META-0014 | error | @persist cannot keep a field whose type names %s, a type parameter of %s: every instance of %s keeps the field under the one key %q, each as another type |
E-META-0015 | error | @persist cannot keep a %s: %s |
E-META-0016 | error | @embed requires a single const binding |
E-META-0017 | error | @embed requires an explicit type |
E-META-0018 | error | @embed requires a string literal path |
E-META-0019 | error | @embed path %q does not exist |
E-META-0020 | error | @embed expects a byte[] constant, got %s |
E-META-0021 | error | @embed expects a file, got directory %q |
E-META-0022 | error | @embed constant cannot have an initializer |
E-META-0023 | error | @embed gzip must be a bool literal |
E-META-0024 | error | @builtin types must live in the builtin module |
E-META-0025 | error | @builtin types cannot specify both primitive and for |
E-META-0026 | error | invalid @builtin for constraint |
E-META-0027 | error | cannot infer lambda parameter types; add parameter type annotations or use a typed context |
E-META-0028 | error | @implicit applies to constructors (def new) only |
E-META-0029 | error | @implicit requires a constructor with exactly one parameter |
E-META-0030 | error | @implicit constructor must not fail: no fail, expects, try or onerror in its body |
E-META-0031 | error | @implicit applies to constructors of types and structs only |
E-META-0032 | error | %s already has an @implicit constructor |
E-META-0033 | error | @persist key %q is kept as %s here and as %s at %s: fields that share a key have one type |
E-META-0034 | error | @on handler signature mismatch: got %s, want %s |
E-META-0035 | error | @on expects 1 or 2 arguments (service method, optional filter) |
E-META-0036 | error | meta functions cannot be infix |
E-META-0037 | error | meta functions must declare a first parameter of a std.reflection.*MetaContext type |
E-META-0038 | error | meta functions must declare a first parameter of a std.reflection.*MetaContext type, got %s |
E-META-0039 | error | meta functions targeting compile-time contexts cannot be async |
E-META-0040 | error | unknown annotation @%s |
E-META-0041 | error | @%s: one of its arguments has no type; write a literal or an expression (a lone name is not looked up as a value in an annotation) |
E-META-0042 | error | @%s cannot use a templated argument: %s is not annotated with a runtime meta context |
E-META-0043 | error | @%s cannot annotate %s of type %s (requires %s) |
E-META-0044 | error | @%s does not refer to a meta function |
E-META-0045 | error | @%s cannot annotate %s (supported contexts: %s) |
E-META-0046 | error | no overload of @%s matches arguments (%s) |
E-META-0047 | error | ambiguous overload of @%s for arguments (%s) |
E-META-0048 | error | @%s takes a file here: a string literal path |
E-META-0049 | error | @%s: file %q does not exist |
E-META-0050 | error | @%s expects a file, got directory %q |
E-META-0051 | error | cannot infer property type for %q; add a type annotation or typed accessor/storage |
E-META-0052 | error | @trackCaller function %s cannot be used as a value: its call-site location is passed implicitly and only a direct call can supply it |
E-META-0053 | error | @trackCaller method %s cannot satisfy interface %s: interface dispatch has no slot for the implicit call-site location |
E-META-0054 | error | module %q is provided by more than one package: %s; a program uses one package per module prefix, keep one of them in adm.lock or list it under [deps] in adm.toml |
E-META-0055 | error | @%s adds members to %s during the build, as another part of the type: declare it partial type %s |
E-META-0056 | error | @%s runs during the build, and the program that calls it did not build (its module cannot import code that uses what it generates): %s |
W-META-0001 | warning | @%s: %s |
W-META-0002 | warning | the members @%s adds to %s are not known here: build the program once (adm build, adm test) and they are |
Plugins
Plugin exports. 11 codes.
E-PLUGIN-0001 | error | %q is exported from both %s and %s; a plugin publishes each name once |
E-PLUGIN-0002 | error | name the functions of plugin %q to export: %s::(name, ...) |
E-PLUGIN-0003 | error | plugin %q declares no function %q to export |
E-PLUGIN-0004 | error | cannot export unknown module %q |
E-PLUGIN-0005 | error | library %q may only export modules under its own prefix; %q is outside it |
E-PLUGIN-0006 | error | plugin does not use module %q; add it to the use list before exporting it |
E-PLUGIN-0007 | error | module %q has no symbol %q to export |
E-PLUGIN-0008 | error | %q is internal to module %q and cannot be exported |
E-PLUGIN-0009 | error | a plugin exports no service: %q stays inside the plugin, and a host reaches it through an exported type or function |
E-PLUGIN-0010 | error | exported %q uses unexported type %q; export it as well |
E-PLUGIN-0011 | error | %q is generic and cannot be exported from a plugin: a host cannot instantiate it; export a function or type without type parameters |
Policy
Policies and permissions. 14 codes.
E-POLICY-0001 | error | Permission needs a name |
E-POLICY-0002 | error | Permission name %q must be one segment; the service's prefix %q is added by the compiler |
E-POLICY-0003 | error | duplicate permission %q |
E-POLICY-0004 | error | Permission spec %s is not a spec type: it needs def validate(value T) !none |
E-POLICY-0005 | error | policy must be a string literal naming a permission |
E-POLICY-0006 | error | @requires takes a string literal naming a permission |
E-POLICY-0007 | error | unknown permission %q; declared: %s |
E-POLICY-0008 | error | unknown permission %q; no service declares permissions |
E-POLICY-0009 | error | @requires gates %q on %q, so it must return an errorable (!T) |
E-POLICY-0010 | error | @%s(policy = %q) gates %q, so it must return an errorable (!T) |
E-POLICY-0011 | error | parameter %s is constrained by %s, but permission %q declares spec %s |
E-POLICY-0012 | error | %s binds C code in %s that was not accepted at install (adm install --accept foreign) |
E-POLICY-0013 | error | %s observes %s, which needs %s; the package was not granted it (adm install --accept) |
W-POLICY-0001 | warning | parameter %s is constrained but the %s is not gated (no policy or @requires); nothing checks it |
SQL
sql def and its schema. 20 codes.
E-SQL-0001 | error | the result %s of this sql def does not read as a type |
E-SQL-0002 | error | @routine names a stored routine in the database; this sql def's body is a statement, not a routine (BEGIN ... END) |
E-SQL-0003 | error | @routine takes the routine's body and connection from its sql def; give it only name and schema |
E-SQL-0004 | error | this sql def names its connection with @db and with @migration(db = ...): keep one |
E-SQL-0005 | error | a sql def step runs on one connection: @migration(db = "main"); a step on several is a plain function calling sql def functions in a transaction { } block |
E-SQL-0006 | error | @migration names one connection of the database service with a plain string: @migration(db = "main") |
E-SQL-0007 | error | @db names one connection of the database service with a plain string: @db("reports") |
E-SQL-0008 | error | type %s marks %d properties with @connection (%s); its sql def methods run on one |
E-SQL-0009 | error | sql def %s names a connection with @db, and its type %s marks the property %s with @connection: keep one |
E-SQL-0010 | error | %s (@sqlschema %s) |
E-SQL-0011 | error | {%s} is a %s, and column %s holds %s values (%s) |
E-SQL-0012 | error | @sqlschema names the schema file with a plain string: @sqlschema("schema.sql") |
E-SQL-0013 | error | @sqlschema cannot read %s: %v |
E-SQL-0014 | error | the query returns %d columns, and the result %s reads %d |
E-SQL-0015 | error | column %d (%s) holds %s values, which do not read as %s |
E-SQL-0016 | error | the query returns %d columns, and the result %s reads one |
E-SQL-0017 | error | column %s holds %s values, which do not read as %s |
E-SQL-0018 | error | column %s holds %s values, which do not read into field %s.%s (%s) |
E-SQL-0019 | error | stored routine %s is declared twice for %s: %s and %s; give one another name with @db.routine(name = "...") |
W-SQL-0001 | warning | field %s.%s reads column %s, which the query does not return; it keeps its zero value |
Units
Quantities and units of measure. 18 codes.
E-UNIT-0001 | error | a derived dimension combines dimension types with *, / and ** (integer exponent) |
E-UNIT-0002 | error | a @dimension type has no body, alias or type parameters: @dimension(unit = "m") type Length |
E-UNIT-0003 | error | unit %q is already declared in this module |
E-UNIT-0004 | error | @unit takes a single-name symbol, optional prefixes and a numeric offset: @unit("g", prefixes = Prefixes.SI) |
E-UNIT-0005 | error | a unit's value is a literal: const gram Mass = 0.001(kg) |
E-UNIT-0006 | error | a unit's type is a dimension, or float for a plain ratio |
E-UNIT-0007 | error | a duration meets a quantity as a Time, but no dimension with base unit s is visible: import std.units |
E-UNIT-0008 | error | cannot %s %s and %s: %s |
E-UNIT-0009 | error | a quantity's exponent is an integer constant: side ** 2 |
E-UNIT-0010 | error | %s takes no argument %q |
E-UNIT-0011 | error | to takes the unit to express the quantity in: v.to(km/h) |
E-UNIT-0012 | error | str takes an optional unit and digits: v.str(km, digits = 2) |
E-UNIT-0013 | error | (%s) is not a unit of %s |
E-UNIT-0014 | error | no base unit for %s: its dimensions declare none |
E-UNIT-0015 | error | digits is an integer constant from 0 to 17 |
E-UNIT-0016 | error | (%s) measures no dimension: a unit argument names a quantity's unit |
W-UNIT-0001 | warning | (%s) is logarithmic and stored linear, so this %s adds the linear values; levels in %s combine with * |
W-UNIT-0002 | warning | (%s) has an offset, so this %s works on absolute values in the base unit; write a difference in the base unit |
Foreign code
Foreign functions and headers, the C, Zig, Rust and Go sources a build compiles, and the linker. 34 codes.
E-FFI-0001 | error | only structs can be embedded; %s is not a struct |
E-FFI-0002 | error | cannot embed type parameter %s; only structs can be embedded |
E-FFI-0003 | error | only structs can be embedded; %s is a %s |
E-FFI-0004 | error | field %q is embedded from both %s and %s; declare %s in the struct to choose one |
E-FFI-0005 | error | @callback marks a function parameter of a C declaration (a body-less def in an @c/@link/@native module), which C keeps and calls later |
E-FFI-0006 | error | C function %s cannot take optional function parameter %q: pass a function, or declare the parameter uint and pass 0 for none |
E-FFI-0007 | error | @callback needs a function parameter, not %s |
E-FFI-0008 | error | C function %s cannot take parameter %q of type %s: C has no %s |
E-FFI-0009 | error | C function %s cannot take function parameter %q: %s |
E-FFI-0010 | error | C function %s cannot return a function value: C function pointers are not ADM functions |
E-FFI-0011 | error | C function %s cannot return %s: C has no %s |
E-FFI-0012 | error | C keeps this callback after the call returns, but a lambda that captures dies with it: keep it in a variable or field for as long as C may call it |
E-FFI-0013 | error | unknown calling convention %q: use "cdecl", "stdcall", "fastcall" or "vectorcall" |
E-FFI-0014 | error | C function %s takes variable arguments, so it cannot take or return a struct |
E-FFI-0015 | error | C function %s cannot pass its structs: %s |
E-FFI-0016 | error | C function %s does not match %s: %s |
E-FFI-0017 | error | @%s names no source file, and neither does the module of %s |
E-FFI-0018 | error | @%s names no source file, and the module of %s is a @%s unit |
E-FFI-0019 | error | @portable applies to a type: a struct crosses to another process without it |
E-FFI-0020 | error | @portable applies to a type only |
E-FFI-0021 | error | @portable applies to a type with fields: an alias crosses as the type it names |
E-FFI-0022 | error | @portable type %s: its field %s cannot cross to another process: %s |
E-FFI-0023 | error | C compiler: %s |
E-FFI-0024 | error | Zig compiler: %s |
E-FFI-0025 | error | Rust compiler: %s |
E-FFI-0026 | error | Go compiler: %s |
E-FFI-0027 | error | %s is declared without a body, and nothing linked defines its symbol %s: add the source that defines it, or name its library with @c or @link |
E-FFI-0028 | error | the linker found no definition of %s |
E-FFI-0029 | error | linker: %s |
E-FFI-0030 | error | %s binds %q, which the program's foreign sources do not export |
E-FFI-0031 | error | %s does not match the exported function %s: %s |
W-FFI-0001 | warning | C compiler: %s |
W-FFI-0002 | warning | Zig compiler: %s |
W-FFI-0003 | warning | Rust compiler: %s |
GPU
cuda def kernels. 8 codes.
E-GPU-0001 | error | @kernelOnly cuda def returns %s; a helper returns a numeric scalar or nothing |
E-GPU-0002 | error | cuda def must return !none; results come back through array parameters |
E-GPU-0003 | error | @kernelOnly cuda def cannot take a gpu.Stream; streams pick where a launch is queued |
E-GPU-0004 | error | cuda def takes at most one gpu.Stream |
E-GPU-0005 | error | cuda def parameter %s has type %s; a kernel takes numeric scalars, arrays of them, DeviceBuffers and a gpu.Stream |
E-GPU-0006 | error | %s is @kernelOnly: call it from a cuda def body, not from ADM code |
E-GPU-0007 | error | CUDA C: %s |
W-GPU-0001 | warning | CUDA C: %s |
Shaders
@fragment code. 52 codes.
E-SHADER-0001 | error | missing uniform %s of %s |
E-SHADER-0002 | error | @fragment functions cannot be overloaded: %s is declared twice |
E-SHADER-0003 | error | a @fragment function cannot be %s |
E-SHADER-0004 | error | a @fragment function cannot be generic |
E-SHADER-0005 | error | a @fragment function cannot be variadic |
E-SHADER-0006 | error | a @fragment parameter is %s |
E-SHADER-0007 | error | a @fragment function returns %s |
E-SHADER-0008 | error | break outside a loop |
E-SHADER-0009 | error | continue outside a loop |
E-SHADER-0010 | error | %s is not available in fragment code |
E-SHADER-0011 | error | a fragment local is %s |
E-SHADER-0012 | error | declare one fragment local at a time |
E-SHADER-0013 | error | a fragment local needs a type or a value |
E-SHADER-0014 | error | %s applies to int and float |
E-SHADER-0015 | error | a fragment statement assigns, declares or controls flow; this value is unused |
E-SHADER-0016 | error | %s is not a fragment local |
E-SHADER-0017 | error | %s has no component %s |
E-SHADER-0018 | error | only fragment locals and their vector components can be assigned |
E-SHADER-0019 | error | %s %s %s does not fit %s |
E-SHADER-0020 | error | an if with an initializer is not available in fragment code |
E-SHADER-0021 | error | fragment code guards only return, break and continue |
E-SHADER-0022 | error | every, empty, break and finish blocks are not available in fragment code |
E-SHADER-0023 | error | fragment loops count explicitly: for let i = a; i < b; i++ |
E-SHADER-0024 | error | fail is not available in fragment code |
E-SHADER-0025 | error | a fragment function returns a %s |
E-SHADER-0026 | error | expected %s, got %s |
E-SHADER-0027 | error | %s has no field %s in fragment code |
E-SHADER-0028 | error | %s does not fit a 32-bit int |
E-SHADER-0029 | error | %s is not a number |
E-SHADER-0030 | error | const %s is not a number fragment code can use |
E-SHADER-0031 | error | %s is not available in fragment code: only locals, parameters and const numbers are |
E-SHADER-0032 | error | the arms are %s and %s |
E-SHADER-0033 | error | %s %s %s is not available in fragment code |
E-SHADER-0034 | error | %s%s is not available in fragment code |
E-SHADER-0035 | error | %s cannot convert to %s |
E-SHADER-0036 | error | only float, float32 and int conversions are available in fragment code |
E-SHADER-0037 | error | fragment code constructs only Vec2, Vec3 and Vec4 |
E-SHADER-0038 | error | pass vector components by position |
E-SHADER-0039 | error | new %s takes %d components |
E-SHADER-0040 | error | generic calls are not available in fragment code |
E-SHADER-0041 | error | onerror is not available in fragment code |
E-SHADER-0042 | error | %s.%s is not available in fragment code |
E-SHADER-0043 | error | only named calls are available in fragment code |
E-SHADER-0044 | error | a conversion takes one value |
E-SHADER-0045 | error | %s takes %d value(s) |
E-SHADER-0046 | error | recursion is not available in fragment code |
E-SHADER-0047 | error | %s takes %d values |
E-SHADER-0048 | error | %s has no parameter %s |
E-SHADER-0049 | error | missing value for %s |
E-SHADER-0050 | error | pass method arguments by position in fragment code |
E-SHADER-0051 | error | no %s.%s takes (%s) |
E-SHADER-0052 | error | recursion is not available in fragment code: %s calls itself through other functions |
Internal
A tool refused code adm generated: a compiler bug. Please report it with the message. 2 codes.
E-INTERNAL-0001 | error | the %s refused code adm generated, a compiler bug; please report it: %s: %s |
E-INTERNAL-0002 | error | LLVM rejected the code adm generated for %s, a compiler bug; please report it: %s |