Reference

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#

CodeMessageRaised in
POLE0101unterminated block commentLexer.cpp
POLE0102unexpected character '…'Lexer.cpp
POLE0201expected …, found …Parser.cpp
POLE0202expected a type name, found …Parser.cpp
POLE0203expected a parameter name, found …<br>expected an endpoint name, found …Parser.cpp
POLE0204expected a function name, found …Parser.cpp
POLE0205expected a processor name, found …<br>expected a graph name, found …Parser.cpp
POLE0206expected an endpoint, state variable or function declaration, found …Parser.cpp
POLE0207this processor already has an init block<br>expected 'processor' or 'graph', found …Parser.cpp
POLE0208expected a variable name after '…', found …Parser.cpp
POLE0209expected a constant loop bound, found …Parser.cpp
POLE0210expected an induction variable name, found …Parser.cpp
POLE0211expected a statement, found …Parser.cpp
POLE0212an array cannot be declared inside a function<br>a local is declared with let or var, not a type<br>unknown processor propertyParser.cpp
POLE0213expected an expression, found …Parser.cpp
POLE0214expected a state variable name, found …Parser.cpp
POLE0215a state variable's initialiser must be a single literal, found …<br>a state variable's initialiser must be a literal, found …Parser.cpp
POLE0216array size must be between 1 and 1048576<br>expected an array size, found …Parser.cpp
POLE0217expected a frame count, found …Parser.cpp
POLE0218an endpoint array must have between 1 and 256 elements<br>expected an endpoint array size, found …Parser.cpp
POLE0219expected …, found …Parser.cpp
POLE0220a smoothing time must be between 0 and 10000 msParser.cpp
POLE0221expected a node name, found …Parser.cpp
POLE0222expected the name of a processor, found …Parser.cpp
POLE0223expected the … of a connection, found …<br>expected an endpoint name after '.', found …Parser.cpp
POLE0224expected an endpoint, a node or a connection block, found …Parser.cpp
POLE0225a node array must have between 1 and 256 elements<br>expected a node array size, found …Parser.cpp
POLE0226expected a vector width, found …Parser.cpp
POLE0227vector width … is out of range<br>a vector width is required to build oneParser.cpp
POLE0228expected a parameter name, found …<br>unknown array property Parser.cpp, TypeCheck.cpp
POLE0229a processor can receive events but not emit them yetParser.cpp
POLE0230unknown event payload <br>expected an event payload, found …Parser.cpp
POLE0231expected the event endpoint this handles, found …<br>expected a name for the payload, found …Parser.cpp
POLE0301output streams are write-only; cannot be readTypeCheck.cpp
POLE0302input streams are read-only; cannot write to TypeCheck.cpp
POLE0303unknown endpoint TypeCheck.cpp
POLE0304cannot write … to , which is declared as …TypeCheck.cpp
POLE0305cannot assign to ; it is declared with letTypeCheck.cpp
POLE0306unknown identifier TypeCheck.cpp
POLE0307cannot mix … and … in arithmeticTypeCheck.cpp
POLE0308ternary condition must be bool, found …TypeCheck.cpp
POLE0309ternary branches disagree: … and …TypeCheck.cpp
POLE0310cannot assign … to …TypeCheck.cpp
POLE0311condition must be bool, found …TypeCheck.cpp
POLE0313cannot 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 endpointTypeCheck.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
POLE0316integer literal does not fit in an intTypeCheck.cpp
POLE0317cannot assign … to state variable , which is declared as …TypeCheck.cpp
POLE0318state variable must be float or intTypeCheck.cpp
POLE0319state variable is declared more than onceTypeCheck.cpp
POLE0320endpoint array size … is not a power of two<br>array size … is not a power of twoTypeCheck.cpp
POLE0321endpoint is not an array<br> is not an array, so it cannot be indexed<br>state variable is not an arrayTypeCheck.cpp
POLE0322a 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
POLE0324cannot convert … to …TypeCheck.cpp
POLE0325unknown function TypeCheck.cpp
POLE0326 takes … argument…s…, not …<br> takes … argument…, not …TypeCheck.cpp
POLE0327 takes … for , not …<br> takes …, not …TypeCheck.cpp
POLE0328an every period must be between 1 and 65536 framesTypeCheck.cpp
POLE0329external needs an array sizeTypeCheck.cpp
POLE0330only input endpoints may be arraysTypeCheck.cpp
POLE0331no processor named TypeCheck.cpp
POLE0332node is declared more than onceTypeCheck.cpp
POLE0333 is already the name of an endpoint on this graph<br> is already the name of a processorTypeCheck.cpp
POLE0334no node named in this graph<br>no endpoint named on …TypeCheck.cpp
POLE0335 is … of …, and cannot be used as a connection …TypeCheck.cpp
POLE0336cannot connect … to …TypeCheck.cpp
POLE0337this connection closes a feedback loop with no delay in it: …TypeCheck.cpp
POLE0338node produces output that nothing reads<br>nothing is connected to graph 's outputTypeCheck.cpp
POLE0339 is an array endpoint of … and cannot be connectedTypeCheck.cpp
POLE0340cannot 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 moreTypeCheck.cpp
POLE0342running a node faster than the graph is not supportedTypeCheck.cpp
POLE0343a node's rate factor must be between 1 and 1024<br>expected a rate factor, found …Parser.cpp
POLE0344a connection delay must be between 1 and 64 frames<br>expected a delay in frames, found …Parser.cpp
POLE0345cannot mix … and … in arithmeticTypeCheck.cpp
POLE0346cannot compare … and …TypeCheck.cpp
POLE0347element … is outside …TypeCheck.cpp
POLE0348… needs … elements or 1 to fill it, found …TypeCheck.cpp
POLE0349cannot build … from …TypeCheck.cpp
POLE0350 is a built-in function<br> is declared twiceTypeCheck.cpp
POLE0351 returns … but can reach its end without returningTypeCheck.cpp
POLE0352return outside a functionTypeCheck.cpp
POLE0353 returns …, so this return needs a value<br> returns void, so this return takes no valueTypeCheck.cpp
POLE0354cannot return … from , which returns …TypeCheck.cpp
POLE0355bitwise operators need int, not …TypeCheck.cpp
POLE0356 takes bool, not …TypeCheck.cpp
POLE0357 cannot mix … and …TypeCheck.cpp
POLE0358graph contains itself<br>graph nests more than 16 deepFlattenGraphs.cpp
POLE0359graph wires an input straight to an outputFlattenGraphs.cpp
POLE0360state array needs a sizeTypeCheck.cpp
POLE0361.… needs an external array, and is not oneTypeCheck.cpp
POLE0362break needs an enclosing for or whileLower.cpp, TypeCheck.cpp
POLE0363no input event endpoint named TypeCheck.cpp
POLE0364 has no field TypeCheck.cpp
POLE0365 carries , but this handler takes TypeCheck.cpp
POLE0366 already has a handlerTypeCheck.cpp
POLE0367 has no handlerTypeCheck.cpp
POLE0368a handler cannot contain every<br>a handler cannot contain a frame loop<br>a handler cannot advance()TypeCheck.cpp
POLE0369the 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 … oneTypeCheck.cpp
POLE0371cannot connect … event sources to …TypeCheck.cpp
POLE0401this … loop exceeds the per-frame step budgetSafetyPass.cpp
POLE0402for loop trip count is not a valid, boundable constantSafetyPass.cpp
POLE0403while loop cap exceeds the compiler's maximumSafetyPass.cpp
POLE0404 exceeds the per-frame step budgetSafetyPass.cpp
POLE0405this loop never calls advance()SafetyPass.cpp
POLE0501block '…' does not end with a terminatorIRVerifier.cpp
POLE0502terminator '…' appears before the end of block '…'IRVerifier.cpp
POLE0503value %… is assigned more than onceIRVerifier.cpp
POLE0504branch targets block …, which does not existIRVerifier.cpp
POLE0505instruction '…' uses %…, which is never definedIRVerifier.cpp
POLE0506value %…, defined in block '…', is used in block '…' without the definition dominating the useIRVerifier.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
POLE0601this statement is unreachable — the block has already returnedLower.cpp
POLE0602internal: resolved to neither an endpoint nor a local during loweringLower.cpp
POLE0603 calls itselfLower.cpp
POLE0701internal: …CodeGen.cpp
POLE0702internal: generated LLVM module failed verificationCodeGen.cpp
POLE0704could not initialise the native LLVM targetCodeGen.cpp
POLE0705no backend for target '…': …<br>internal: a member expression reached lowering unresolvedCodeGen.cpp, Lower.cpp