New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hang on broken unapply macro #8158
Comments
Imported From: https://issues.scala-lang.org/browse/SI-8158?orig=1 |
@xeno-by said (edited on Jan 18, 2014 9:59:51 AM UTC): |
@xeno-by said: {
final class $anon extends scala.AnyRef {
def <init>() = {
super.<init>();
()
};
def isEmpty = false;
def get = this;
def unapply(x: String) = this
};
new $anon()
}.unapply(<unapply-selector>) Then this code under the alias of Apparently it's the stringification that causes an infinite loop, because the type is self-referential. I thought we detect these cases already, but apparently not quite. I'll figure this out and submit a pull request later today. |
@som-snytt said: I'd hoped to work in a pun on "The Secret World of Arrietty" (or ArityError) before the bug was fixed. |
@xeno-by said: |
I had forgotten the outcome of discussion last year about name-based pattern matching, so trying to do patternless boolean extraction, I tried this broken form, which hangs the compiler, also on trunk:
with sample usage
The text was updated successfully, but these errors were encountered: