I hope I'm wrong. I turned to developer.apple.com, a people suggested me: Could be worth a bug report on documentation. But I still want to confirm, and I don’t know how to correctly submit the bug report on documentation.
Summary:
I see the ' Improved operator declarations ', try the example:
// module Swift
precedencegroup Additive { higherThan: Range }
precedencegroup Multiplicative { higherThan: Additive }
// module A
precedencegroup Equivalence {
higherThan: Comparative
lowerThan: Additive // possible, because Additive lies in another module
}
but the Range
and Comparative
show error:
Unknown precedence group.
So I add it:
precedencegroup Range { }
precedencegroup Comparative { }
Now, lowerThan: Additive
show error:
Precedence group cannot be given lower precedence than group in same module; make the other precedence group higher than this one instead.
So,I try make Range
or Comparative
higherThan any precedencegroup I know, both too.
And then, I try change Range
to RangeFormationPrecedence
, Comparative
to ComparisonPrecedence
, it's error too.
But this is no error:
precedencegroup TestPrecedence {
higherThan: ComparisonPrecedence
lowerThan: RangeFormationPrecedence
}
I tried everything I could think of, I cann't make a precedencegroup lowerThan custom precedencegroup.