Conversation
2648b51 to
acb0a84
Compare
acb0a84 to
92dad84
Compare
| class CanEqualsCompileTest extends RegexParsers { | ||
| val x: String ~ String = new~("a", "b") | ||
| val y: String ~ String = new~("a", "b") | ||
| x == y |
There was a problem hiding this comment.
I admit to having been puzzled by #477, and this test isn't helping me understand it
477 says:
This would allow pattern-based productions to compile in the presence of strict equality
this doesn't sound like a description of what you've done here in the test...?
There was a problem hiding this comment.
Maybe @klaeufer is around to add some clarification?
There was a problem hiding this comment.
Sorry, was teaching last night...thanks for looking into this issue. Looks like my example evolved, and the URL I had included is no longer valid.
Without providing CanEqual[A ~ B, A ~ B], I couldn't get productions such as this to compile:
def expr: Parser[Expr] =
term ~! opt(("+" | "-") ~ term) ^^ {
case l ~ None => l
case l ~ Some("+" ~ r) => Plus(l, r)
case l ~ Some("-" ~ r) => Minus(l, r)
}The original source is here.
Let me know if there is anything else I should clarify.
5f48a60 to
890dc4a
Compare
closes #477.