Closed lars-reimann closed 2 months ago
We cannot generally fix this. Adjusting the lexer only fixes the issue in some cases. Other languages, like TypeScript, have the same behavior.
We could give as
and later is
the lowest precedence, so parentheses must always be used when they occur inside another expression.
Or we could leave it as is, and document that parentheses must be used in this specific case (type cast followed by less than).
:tada: This issue has been resolved in version 0.15.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Describe the bug
The parser confuses type argument lists and the less than operator. That's the same issues we've had with type argument lists of calls.
To Reproduce
Place this code into the editor:
Expected behavior
No error. The
<
should be treated as the less than operator, not the start of a type argument list.Screenshots (optional)
No response
Additional Context (optional)
No response