<div dir="ltr">Inline:<br><div class="gmail_extra"><br><div class="gmail_quote">2016-05-20 20:58 GMT+03:00 John McCall <span dir="ltr">&lt;<a href="mailto:rjmccall@apple.com" target="_blank">rjmccall@apple.com</a>&gt;</span>:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div>The transitivity rule plus the ability to define precedence relationships in both directions on a new precedence group allows a new precedence group to create a precedence relationship between existing unrelated precedence groups.  This should be forbidden.</div></div></blockquote><div><br></div><div>Agreed, although there is an alternate solution to allow global-scope relationship definition.</div><div>Trying to write it formally:</div><div><br></div><div>====begin====</div><div>Precedence relationships that, by transitivity rule, create relationship between two imported groups, is an error. Example:</div><div><br></div><div>// Module X</div><div>precedencegroup A { }</div><div>precedencegroup C { }</div><div><br></div><div>// Module Y</div><div>import X</div><div>precedencegroup B { precedence(&gt; A) precedence(&lt; C) }</div><div><br></div><div>This results in compilation error &quot;B uses transitivity to define relationship between imported groups A and C&quot;.</div><div>The rationale behind this is that otherwise one can create relationships between standard precedence groups that are confusing for the reader.</div><div>====end====</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div>What&#39;s the purpose of equality relationships between precedence groups?</div></div></blockquote><div><br></div><div>Agreed, will remove.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div>Your proposal should call out the special treatment of the Assignment and Ternary groups.</div></div></blockquote><div><br></div><div>Do you mean that most operators should define greater precedence than Assignment / Ternary? Or there should be some other special treatment?<br></div><div><br></div><div>- Anton</div></div></div></div>