Parser interprets expressions in commands wrong

Issue #10 resolved
Fabian Maurer created an issue
say toString(1);

bad argument #0 (string expected, got function)

say ""..toString(1);

bad argument #1 (string expected, got number)

Comments (18)

  1. Chimaine

    Seems to be a specific issue with commands. The parser derps and decides that toString is actual a variable access and (1) is an expression in parentheses.

    As a temporary workaround, wrap the call in parentheses to force the parser to interpret it correctly.

    say ( toString( 1 ) );
    say "" .. ( toString( 1 ) );
    
  2. Chimaine

    This issue has been ongoing for a while now. Setting this to critical so it gets fixed before the next minor version bump.

  3. Log in to comment