Skip to content

Diagnostic codes ​

Codes are stable and never reused. Errors (E) fail linnet check; warnings (W) fail only under --strict (linnet lint).

Syntax ​

CodeMeaning
E1001invalid character or bytes
E1002unclosed block comment
E1003malformed string or escape
E1004reserved word as a name
E1005malformed number
E1101unexpected token
E1102missing leading module
E1103reserved, unsupported syntax

Names ​

CodeMeaning
E1201undeclared name
E1202module not found
E1203non-pub item from another module
E1204duplicate item in a module
E1205duplicate parameter, generic, field, member, or variant
E1206import cycle
E1207prelude name redeclared
E1208name of the wrong kind

Types ​

CodeMeaning
E2101value of the wrong type
E2102wrong, missing, or unknown-keyword arguments
E2103different dtypes; use an explicit cast
E2104operator unsupported for the type
E2105literal out of its dtype's range
E2106call of a non-function
E2107no such field, member, method, or variant
E2108assignment to a non-var, non-state target
E2109assignment changes a variable's type
E2110uninferable generic; write f<...>(...)
E2111wrong generic arguments
E2112dtype fails a generic constraint
E2113none without an optional type
E2114condition not a scalar bool
E2115branches of different types
E2116&&, ||, or ! operand not a scalar bool
E2117pattern cannot match
E2118match misses a case
E2119recursion
E2120no final return, or return inside a loop
E2121static for over something not a structural array or compile-time range
E2122self-referential constant, alias, or struct
E2123compile-time integer required
E2190unimplemented feature

Shapes ​

CodeMeaning
E2201incompatible extents for an index
E2202wrong shape
E2203reshape element count unprovable; add where H % N == 0
E2204wrong index count
E2205divisor not provably positive; add where N > 0
E2206where unprovable at a call; restate it in the caller
E2207broadcast unprovable
E2208provably negative dimension
E2209invalid index or slice bound
E2210invalid axis or permutation

Index notation ​

CodeMeaning
E3101index neither output nor reduced
E3102unused reduction index
E3103unused output index
E3104invalid in index notation
E3105index listed twice
E3106pack index for a plain one, or the reverse

Blocks and packages ​

CodeMeaning
E4101member of a type it cannot have
E4102param with a value in source
E5001linnet.toml unreadable or malformed

Warnings ​

CodeMeaning
W1001unused import
W1002unused local; prefix it with _ to keep it
W1003unused param, buffer, or sub

Released under the MIT License.