Diagnostics
Every error the Pole compiler can report, scraped from the sources that raise it.
Anyone reading a compiler message and wanting to know what it means.
Pole reports 123 distinct diagnostics. They are listed here straight from the compiler's own sources, because a hand-kept table of them is a table that is wrong within a month.
A message shown with … splices a value in at that point — a name, a count, a
type — so the text you see will be more specific than the template.
Read an error from the outside in#
Start with the source location: which expression did the compiler underline?
Then read the message and any suggested correction. The code, such as
POLE0327, is a stable way to look up the kind of problem; the names and values
in the message explain this particular instance.
For example, sin(1) passes an int where a float is required. The correction
is sin(1.0f) for a literal, or sin(float(value)) for an integer variable.
Changing an unrelated endpoint declaration would not address that call.
When several messages appear, fix the first relevant source error and compile again. A missing declaration can make later expressions fail too. The “Raised in” column below identifies compiler implementation files; you normally fix the patch, not those files.
Diagnostic lookup#
| Code | Message | Raised in |
|---|---|---|
POLE0101 | unterminated block comment | Lexer.cpp |
POLE0102 | unexpected character '…' | Lexer.cpp |
POLE0201 | expected …, found … | Parser.cpp |
POLE0202 | expected a type name, found … | Parser.cpp |
POLE0203 | expected a parameter name, found …<br>expected an endpoint name, found … | Parser.cpp |
POLE0204 | expected a function name, found … | Parser.cpp |
POLE0205 | expected a processor name, found …<br>expected a graph name, found … | Parser.cpp |
POLE0206 | expected an endpoint, state variable or function declaration, found … | Parser.cpp |
POLE0207 | this processor already has an init block<br>expected 'processor' or 'graph', found … | Parser.cpp |
POLE0208 | expected a variable name after '…', found … | Parser.cpp |
POLE0209 | expected a constant loop bound, found … | Parser.cpp |
POLE0210 | expected an induction variable name, found … | Parser.cpp |
POLE0211 | expected a statement, found … | Parser.cpp |
POLE0212 | an array cannot be declared inside a function<br>a local is declared with let or var, not a type<br>unknown processor property | Parser.cpp |
POLE0213 | expected an expression, found … | Parser.cpp |
POLE0214 | expected a state variable name, found … | Parser.cpp |
POLE0215 | a state variable's initialiser must be a single literal, found …<br>a state variable's initialiser must be a literal, found … | Parser.cpp |
POLE0216 | array size must be between 1 and 1048576<br>expected an array size, found … | Parser.cpp |
POLE0217 | expected a frame count, found … | Parser.cpp |
POLE0218 | an endpoint array must have between 1 and 256 elements<br>expected an endpoint array size, found … | Parser.cpp |
POLE0219 | expected …, found … | Parser.cpp |
POLE0220 | a smoothing time must be between 0 and 10000 ms | Parser.cpp |
POLE0221 | expected a node name, found … | Parser.cpp |
POLE0222 | expected the name of a processor, found … | Parser.cpp |
POLE0223 | expected the … of a connection, found …<br>expected an endpoint name after '.', found … | Parser.cpp |
POLE0224 | expected an endpoint, a node or a connection block, found … | Parser.cpp |
POLE0225 | a node array must have between 1 and 256 elements<br>expected a node array size, found … | Parser.cpp |
POLE0226 | expected a vector width, found … | Parser.cpp |
POLE0227 | vector width … is out of range<br>a vector width is required to build one | Parser.cpp |
POLE0228 | expected a parameter name, found …<br>unknown array property … | Parser.cpp, TypeCheck.cpp |
POLE0229 | a processor can receive events but not emit them yet | Parser.cpp |
POLE0230 | unknown event payload …<br>expected an event payload, found … | Parser.cpp |
POLE0231 | expected the event endpoint this handles, found …<br>expected a name for the payload, found … | Parser.cpp |
POLE0301 | output streams are write-only; … cannot be read | TypeCheck.cpp |
POLE0302 | input streams are read-only; cannot write to … | TypeCheck.cpp |
POLE0303 | unknown endpoint … | TypeCheck.cpp |
POLE0304 | cannot write … to …, which is declared as … | TypeCheck.cpp |
POLE0305 | cannot assign to …; it is declared with let | TypeCheck.cpp |
POLE0306 | unknown identifier … | TypeCheck.cpp |
POLE0307 | cannot mix … and … in arithmetic | TypeCheck.cpp |
POLE0308 | ternary condition must be bool, found … | TypeCheck.cpp |
POLE0309 | ternary branches disagree: … and … | TypeCheck.cpp |
POLE0310 | cannot assign … to … | TypeCheck.cpp |
POLE0311 | condition must be bool, found … | TypeCheck.cpp |
POLE0313 | cannot assign to loop variable … | TypeCheck.cpp |
POLE0314 | … is already the name of a state variable<br>… is already the name of … endpoint<br>… is already the name of an endpoint | TypeCheck.cpp |
POLE0315 | … may declare at most … input streams; … is number …<br>…'s audio output is … channels; at most two are supported<br>… may declare at most … output slots; … is number … | TypeCheck.cpp |
POLE0316 | integer literal does not fit in an int | TypeCheck.cpp |
POLE0317 | cannot assign … to state variable …, which is declared as … | TypeCheck.cpp |
POLE0318 | state variable … must be float or int | TypeCheck.cpp |
POLE0319 | state variable … is declared more than once | TypeCheck.cpp |
POLE0320 | endpoint array size … is not a power of two<br>array size … is not a power of two | TypeCheck.cpp |
POLE0321 | endpoint … is not an array<br>… is not an array, so it cannot be indexed<br>state variable … is not an array | TypeCheck.cpp |
POLE0322 | a vector index must be an int, not …<br>an array index must be an int, not … | TypeCheck.cpp |
POLE0323 | … is an array and has no value on its own<br>… is an endpoint array and has no value on its own<br>cannot assign to the whole array … | TypeCheck.cpp |
POLE0324 | cannot convert … to … | TypeCheck.cpp |
POLE0325 | unknown function … | TypeCheck.cpp |
POLE0326 | … takes … argument…s…, not …<br>… takes … argument…, not … | TypeCheck.cpp |
POLE0327 | … takes … for …, not …<br>… takes …, not … | TypeCheck.cpp |
POLE0328 | an every period must be between 1 and 65536 frames | TypeCheck.cpp |
POLE0329 | external needs an array size | TypeCheck.cpp |
POLE0330 | only input endpoints may be arrays | TypeCheck.cpp |
POLE0331 | no processor named … | TypeCheck.cpp |
POLE0332 | node … is declared more than once | TypeCheck.cpp |
POLE0333 | … is already the name of an endpoint on this graph<br>… is already the name of a processor | TypeCheck.cpp |
POLE0334 | no node named … in this graph<br>no endpoint named … on … | TypeCheck.cpp |
POLE0335 | … is … of …, and cannot be used as a connection … | TypeCheck.cpp |
POLE0336 | cannot connect … to … | TypeCheck.cpp |
POLE0337 | this connection closes a feedback loop with no delay in it: … | TypeCheck.cpp |
POLE0338 | node … produces output that nothing reads<br>nothing is connected to graph …'s output | TypeCheck.cpp |
POLE0339 | … is an array endpoint of … and cannot be connected | TypeCheck.cpp |
POLE0340 | cannot connect … values to … | TypeCheck.cpp |
POLE0341 | … is one of this graph's own endpoints, and is not indexed like a node array<br>… has … element(s); there is no element …<br>node … is not an array, so it cannot be indexed<br>… and 1 more | TypeCheck.cpp |
POLE0342 | running a node faster than the graph is not supported | TypeCheck.cpp |
POLE0343 | a node's rate factor must be between 1 and 1024<br>expected a rate factor, found … | Parser.cpp |
POLE0344 | a connection delay must be between 1 and 64 frames<br>expected a delay in frames, found … | Parser.cpp |
POLE0345 | cannot mix … and … in arithmetic | TypeCheck.cpp |
POLE0346 | cannot compare … and … | TypeCheck.cpp |
POLE0347 | element … is outside … | TypeCheck.cpp |
POLE0348 | … needs … elements or 1 to fill it, found … | TypeCheck.cpp |
POLE0349 | cannot build … from … | TypeCheck.cpp |
POLE0350 | … is a built-in function<br>… is declared twice | TypeCheck.cpp |
POLE0351 | … returns … but can reach its end without returning | TypeCheck.cpp |
POLE0352 | return outside a function | TypeCheck.cpp |
POLE0353 | … returns …, so this return needs a value<br>… returns void, so this return takes no value | TypeCheck.cpp |
POLE0354 | cannot return … from …, which returns … | TypeCheck.cpp |
POLE0355 | bitwise operators need int, not … | TypeCheck.cpp |
POLE0356 | … takes bool, not … | TypeCheck.cpp |
POLE0357 | … cannot mix … and … | TypeCheck.cpp |
POLE0358 | graph … contains itself<br>graph … nests more than 16 deep | FlattenGraphs.cpp |
POLE0359 | graph … wires an input straight to an output | FlattenGraphs.cpp |
POLE0360 | state array … needs a size | TypeCheck.cpp |
POLE0361 | .… needs an external array, and … is not one | TypeCheck.cpp |
POLE0362 | break needs an enclosing for or while | Lower.cpp, TypeCheck.cpp |
POLE0363 | no input event endpoint named … | TypeCheck.cpp |
POLE0364 | … has no field … | TypeCheck.cpp |
POLE0365 | … carries …, but this handler takes … | TypeCheck.cpp |
POLE0366 | … already has a handler | TypeCheck.cpp |
POLE0367 | … has no handler | TypeCheck.cpp |
POLE0368 | a handler cannot contain every<br>a handler cannot contain a frame loop<br>a handler cannot advance() | TypeCheck.cpp |
POLE0369 | the payload … has the same name as …a state variablean endpoint<br>cannot connect … | TypeCheck.cpp |
POLE0370 | … is an endpoint, and init runs before the first frame<br>cannot connect a … event to a … one | TypeCheck.cpp |
POLE0371 | cannot connect … event sources to … | TypeCheck.cpp |
POLE0401 | this … loop exceeds the per-frame step budget | SafetyPass.cpp |
POLE0402 | for loop trip count is not a valid, boundable constant | SafetyPass.cpp |
POLE0403 | while loop cap exceeds the compiler's maximum | SafetyPass.cpp |
POLE0404 | … exceeds the per-frame step budget | SafetyPass.cpp |
POLE0405 | this loop never calls advance() | SafetyPass.cpp |
POLE0501 | block '…' does not end with a terminator | IRVerifier.cpp |
POLE0502 | terminator '…' appears before the end of block '…' | IRVerifier.cpp |
POLE0503 | value %… is assigned more than once | IRVerifier.cpp |
POLE0504 | branch targets block …, which does not exist | IRVerifier.cpp |
POLE0505 | instruction '…' uses %…, which is never defined | IRVerifier.cpp |
POLE0506 | value %…, defined in block '…', is used in block '…' without the definition dominating the use | IRVerifier.cpp |
POLE0507 | 'load' operand %… is not the result of an 'alloca' | IRVerifier.cpp |
POLE0508 | 'store' target %… is not the result of an 'alloca' | IRVerifier.cpp |
POLE0601 | this statement is unreachable — the block has already returned | Lower.cpp |
POLE0602 | internal: … resolved to neither an endpoint nor a local during lowering | Lower.cpp |
POLE0603 | … calls itself | Lower.cpp |
POLE0701 | internal: … | CodeGen.cpp |
POLE0702 | internal: generated LLVM module failed verification | CodeGen.cpp |
POLE0704 | could not initialise the native LLVM target | CodeGen.cpp |
POLE0705 | no backend for target '…': …<br>internal: a member expression reached lowering unresolved | CodeGen.cpp, Lower.cpp |