CompileErrors/A0008: Difference between revisions

From Compost Wiki
Jump to navigation Jump to search
Danielr (talk | contribs)
Created page with "{{CompileError |errortext = A0008 - Typecheck failed: infix expression has wrong type on left-hand side |description = A0008 is issued when the LHS of an infix expression fail..."
 
Danielr (talk | contribs)
No edit summary
 
Line 3: Line 3:
|description = A0008 is issued when the LHS of an infix expression fails typechecking.  For more details on typecheck errors, please see error [[CompileErrors/A0004|A0004]].  In conjunction with A0008, you may also receive A0004 ending in "... got "invalid infix LHS"."
|description = A0008 is issued when the LHS of an infix expression fails typechecking.  For more details on typecheck errors, please see error [[CompileErrors/A0004|A0004]].  In conjunction with A0008, you may also receive A0004 ending in "... got "invalid infix LHS"."
|exampletext = The infix form of ADD#, "+", has a left-hand side which is a literal instead of a number.
|exampletext = The infix form of ADD#, "+", has a left-hand side which is a literal instead of a number.
|examplecode = '1' + 2 { A0005 - Unexpected infix command: ADD# }
|examplecode = '1' + 2 { A0008 - Typecheck failed: infix expression has wrong type on left-hand side }
|resolutiontext = Correct the type of the infix LHS.
|resolutiontext = Correct the type of the infix LHS.
|resolutioncode = 1 + 2 { No error }
|resolutioncode = 1 + 2 { No error }
}}
}}

Latest revision as of 22:42, 13 January 2015

A0008 - Typecheck failed: infix expression has wrong type on left-hand side

Description

A0008 is issued when the LHS of an infix expression fails typechecking. For more details on typecheck errors, please see error A0004. In conjunction with A0008, you may also receive A0004 ending in "... got "invalid infix LHS"."

Example of Cause

The infix form of ADD#, "+", has a left-hand side which is a literal instead of a number.

'1' + 2 { A0008 - Typecheck failed: infix expression has wrong type on left-hand side }

Resolution

Correct the type of the infix LHS.

1 + 2 { No error }