CompileErrors/A0004

From Compost Wiki
Revision as of 22:23, 13 January 2015 by Danielr (talk | contribs) (s/token/argument/)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

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 argument 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 }