neverwinter.nim icon indicating copy to clipboard operation
neverwinter.nim copied to clipboard

scriptcomp fails to understand positive sign on ints

Open niv opened this issue 1 year ago • 1 comments

void main()
{
  int a = -1;
  int b = +1; // ERROR: UNKNOWN STATE IN COMPILER
  int c = +a; // ERROR: UNKNOWN STATE IN COMPILER
}

This works fine on nwnsc.

niv avatar Jul 10 '23 12:07 niv

Looks like it actually doesn't have the unary plus operator at all. Not that it matters much, but if we take the official compiler spec to be the language spec, then this was never considered and therefore more of a missing feature than a bug. Absolutely useless distinction, except that whoever takes this up should know that it needs changes at all levels and not a point fix.

mtijanic avatar Jul 11 '23 11:07 mtijanic

Fixed by #130

mtijanic avatar Jun 17 '24 21:06 mtijanic