I initially tried to add an early error to RelationalExpression saying something like "It is a SyntaxError if the left side of the expression recursively contains a JSXElementOrFragment as its right-most descendent.", but it would have required writing some custom sdo for every production that can derive a JSXElementOrFragment as a child of RelationalExpression.
The spec explicitly ignores lookaheads in static semantics, so I wanted to avoid doing it.
:warning: Almost all the tools already implement this error, but it would be a breaking change for the Flow type checker.
Fixes #120.
This was quite hard to specify:
RelationalExpression
saying something like "It is a SyntaxError if the left side of the expression recursively contains aJSXElementOrFragment
as its right-most descendent.", but it would have required writing some custom sdo for every production that can derive aJSXElementOrFragment
as a child ofRelationalExpression
.