Under Review
over 1 year ago

Compiler crash compiling null valued enum

Not a big deal, but a proper error message would be nice. Otherwise, its hard to know what you've done wrong in a big file...

Given:

enum Foo {
  BAR = null
}

4.1.5 and earlier crash with:

ERROR: <device>: Could not parse Monkey C IR.

4.1.7 at O1 or O2 crashes with:

ERROR: <device>: A critical error has occurred. Please re-run the Monkey C Compiler with logging enabled and file a report with the Connect IQ support team ([email protected]).

4.1.7 at O0 crashes with:

ERROR: Could not parse Monkey C IR in file /path/to/bug.mir, at line 2, charPosition 10: extraneous input 'null' expecting {'}', ','}.

Parents
  • The crash was fixed in sdk-6.2.0. But the resulting enum value is incorrectly typed by the type checker (still broken as of 6.2.2), so that eg "System.println(Foo.Bar);" results in a weird type checker error.

Comment
  • The crash was fixed in sdk-6.2.0. But the resulting enum value is incorrectly typed by the type checker (still broken as of 6.2.2), so that eg "System.println(Foo.Bar);" results in a weird type checker error.

Children
No Data