RumbleDB/rumble

Parser fails if argument name is $null

mstevan opened this issue · 1 comments

@mstevan
test-set: op/date-equal.xml, op/date-greater-than.xml, op/date-less-than.xml, op/dateTime-equal.xml, op/dateTime-greater-than.xml, op/dateTime-less-than.xml
test-cases: cbcl-date-equal-011 to cbcl-date-equal-014 and similar names

@team
Declaring function that has a parameter such as $null fails to parse it. If we just rename $null into $nl for example, everything works and test-cases pass!

Input:
declare function local:date($date as date, $null as boolean) { if ($null) then () else $date }; exists(local:date(date("1972-12-15"), true) eq date("1972-12-15"))

Output:
line 1:44 no viable alternative at input 'null'
⚠️ ️There was an error.

Code: [XPST0003] (this code can be looked up in the documentation and specifications).

Location information: file:/Users/mstevan/Documents/:LINE:1:COLUMN:162:

Parser failed. )

Expected output:
false

All tests are passing, no new crashes caused by bug fix