Skip to content
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

Typechecking extractors is not idempotent #5465

Closed
scabug opened this issue Feb 14, 2012 · 4 comments

Comments

Projects
None yet
3 participants
@scabug
Copy link

commented Feb 14, 2012

Pattern matching that involves extractors cannot be typechecked twice. The first typecheck distorts its structure, introducing UnApply node that wraps a synthetic SELECTOR_DUMMY ident that doesn't have a definition. If one performs resetAllAttrs, the resulting tree can no longer be typechecked.

@scabug

This comment has been minimized.

Copy link
Author

commented Feb 14, 2012

Imported From: https://issues.scala-lang.org/browse/SI-5465?orig=1
Reporter: @xeno-by
Affected Versions: 2.10.0
Blocks #5464

@scabug

This comment has been minimized.

Copy link
Author

commented Dec 6, 2012

@xeno-by said:
See tests introduced in scala/scala@5028181

@scabug

This comment has been minimized.

Copy link
Author

commented Apr 2, 2013

@retronym said:
Here's a potential solution: undo the wrapping Unapply(Apply(Select(qual, <unapply selector>), args)) in ResetAttrs.

https://github.com/retronym/scala/tree/ticket/5465

It solves Eugene Y.'s reported problem with extractors in macros, but does not yet fix run/idempotency-extractors.scala (with the toolbox compiler).

@SethTisue

This comment has been minimized.

Copy link
Member

commented Mar 3, 2018

consolidating under #5464

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.