-
Notifications
You must be signed in to change notification settings - Fork 21
An NPE in TypeTree.setOriginal #7284
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
Comments
Imported From: https://issues.scala-lang.org/browse/SI-7284?orig=1 |
@xeno-by said (edited on Mar 22, 2013 9:20:16 AM UTC): def setOriginal(tree: Tree): this.type = {
def followOriginal(t: Tree): Tree = t match {
case tt: TypeTree => followOriginal(tt.original)
case t => t
}
orig = followOriginal(tree); setPos(tree.pos)
this
} |
@paulp said: |
@xeno-by said: |
@xeno-by said: The problematic scenario is caused by the weird combination of:
Probably the correct fix here would be setting the type macro application tree as original for the result of macro expansion, which would prevent #2 from happening, making the bug impossible. That said, I think we still should fix the NPE in setOriginal. It's just we don't have an integration test triggering that NPE. |
@paulp said: |
@xeno-by said: |
The text was updated successfully, but these errors were encountered: