CompileErrors/A0004

From Compost Wiki
Revision as of 22:22, 13 January 2015 by Danielr (talk | contribs) (Created page with "{{CompileError |errortext = A0004 - Typecheck failed: <Keyword> expected <Type>, got <Token>. |description = A0004 is issued when a RHS keyword typecheck fails. One of the pa...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

A0004 - Typecheck failed: <Keyword> expected <Type>, got <Token>.

Description

A0004 is issued when a RHS keyword typecheck fails. One of the parameters was expected to be a particular type (such as Number), but the provided token is not that type.

Example of Cause

Num# expects a literal as the first parameter.

Num#(CurrentFeed#) { A0004 - Typecheck failed: NUM# expected Literal, got "CurrentFeed#". }

Resolution

Replace the argument with one of the correct type, or replace the keyword with one which expects the provided type.

Num#('100') { No error }