You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed in some threads 12, negative numeric literals have special treatment in Swift.
However, swift-syntax seems not to reflect such feature.
For further details, see "Steps to Reproduce" section.
Steps to Reproduce
Swift compiler says -1 is an integer literal with negative flag:
This behavior is intentional. In the compiler’s pipeline, ASTGen will handle the unification of the prefix - with the number literal into a single AST node. Clients of swift-syntax will need to apply the prefix - manually.
Description
As discussed in some threads 12, negative numeric literals have special treatment in Swift.
However, swift-syntax seems not to reflect such feature.
For further details, see "Steps to Reproduce" section.
Steps to Reproduce
Swift compiler says
-1is an integer literal with negative flag:Meanwhile, swift-parser-cli says '-1' is a prefix operator '-' and its operand expression(an integer literal
1):Footnotes
https://forums.swift.org/t/amendment-se-0368-staticbigint/62992/12 ↩
https://forums.swift.org/t/expressiblebyintegerliteral-and-type-inference-and-macro/73698/2 ↩
The text was updated successfully, but these errors were encountered: