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
{{ message }}
Repository navigation
Formatter moves an attribute from a type constraint to the first operand #9497
So formatting changes the program. Here @warning("-102") no longer covers the comparison. The same happens with a braced expression: @warning("-102") {([1] == [2]: bool)} is printed as {(@warning("-102") [1] == [2]: bool)}.
The printer prints the attributes of the Pexp_constraint and then the constraint e: t, and the caller adds the parentheses around both. To keep the attribute on the constraint, it has to be printed outside the parentheses: @warning("-102") (e: t).
Found while writing a test for #9491, whose fixture has to pass the format check.
Activity
Fix formatter moving an attribute off a type constraint
Fix formatter moving an attribute off a type constraint
Fix formatter moving an attribute off a type constraint (#9498)