Closed lucaswerkmeister closed 9 years ago
Well actually negated conditions can't have patterns. It wouldn't make sense...
Ah, good point. But it can be a pattern variable plus specifier expression (if (!exists nil = null of Anything)
), which I’m representing as SpecifiedPattern
(not yet committed, WIP), so that will have to be an assertion.
In fact, I don’t think this belongs into ceylon.ast
at all – it’s not a syntactical restriction.
if (!exists x)
andif (!nonempty x)
are now allowed, in conjunction with destructuring (#75) but logically separate from it. I musn’t forget to support this too. See ceylon/ceylon-spec#817 and ceylon/ceylon-spec@d024d99a7dd8f02751443dc236f5476ff94784ea.