Address-of used on expressions causes an exception
Reported by @fenrock af https://atariage.com/
Compiling the following results in an exception:
word * const SAVMSC = 0x58;
word * const SCREEN = 0x0400;
void main() {
word *wp3 = &(*SAVMSC + 1);
*SCREEN = *wp3;
}
Exception:
dk.camelot64.kickc.model.InternalError: Cannot cast declared type!main::$0
at dk.camelot64.kickc.model.iterator.ProgramExpressionBinary$ProgramExpressionBinaryAssignmentLValue.addLeftCast(ProgramExpressionBinary.java:279)
at dk.camelot64.kickc.passes.PassNAddNumberTypeConversions.lambda$step$0(PassNAddNumberTypeConversions.java:36)
Edited by Jesper Balman Gravgaard