Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Pattern matcher: extractors become name-based. #2848
An extractor is no longer required to return Option[T], and
If the type of get contains methods with the names of
This has significant benefits and opens new territory:
Here is a primitive example:
As a multi-value example, after I contribute some methods to TypeRef:
Then its extractor becomes
Which, it need hardly be said, involves no allocations.
I didn't want to mess with #2835 because it has those green check marks. This commit ends up at almost exactly the same place, but with much more granularity in the key commit.
The only change in the end result is a bugfix which I found trying to compile scalariform involving nested bindings like b1 @ (b2: Foo). I couldn't reproduce the overloading issue seen in jenkins, but maybe somehow it will turn out to be related to that fix.
referenced this pull request
Aug 17, 2013
For ease of reference:
All those happy successes are after a905d0e. After 6d77da3 it went back to failing, but I can't for the life of me make any sense of the six megabytes of console output. Whether the failure is spurious or not, I'd think it would be better if it would not abandon ship at the first sniff of something wrong. I'm just going to assume it's spurious unless someone tells me otherwise.
added a commit
this pull request
Aug 20, 2013