REVERTED: Fix stackoverflow when referenced by self annotation#9023
REVERTED: Fix stackoverflow when referenced by self annotation#9023lrytz merged 1 commit intoscala:2.13.xfrom
Conversation
|
Jenkins pipeline is pending at https://scala-ci.typesafe.com/job/scala-2.13.x-validate-main/12079/console because error happened. Maybe it should be closed manually. |
|
@changvvb would you mind rebasing against the current head of 2.13.x? that should make the problem go away |
@SethTisue It seems not work 😕. |
88d5b2a to
4c34306
Compare
|
I'll re-fix the commits so we can reduce the noise merging this PR would bring. |
0c0eb8c to
b8bb729
Compare
b288e5a to
da80ac4
Compare
|
@lrytz over at scala/community-build#1164 this caused a regression; one Akka source file started failing to compile. I isolated it to just: (the exact annotation isn't important, e.g. such an import is a bit unusual. the Akka folks wanted it because they were doing this: and note that you can't move the import inside the class definition because the location where they want to refer to interestingly, Dotty has the same bug or limitation, whichever you want to call it: not sure if this is a 2.13.3-blocker or not. in the Akka source the problem is easy to work around because you can either 1) |
|
@smarter would you like me to open a lampepfl/dotty ticket on this? |
|
I would suggest reverting this change for 2.13.3. Lazy typechecking of annotations can be relied on in pretty subtle ways. Perhaps our annotation typechecking should have an extra phase:
If there are still cases that could run into a |
|
I like the suggestion of lazily type checking the parts of an I also agree that reverting is the safer choice for 2.13.3. |
|
Yes, Symbol#hasAnnotation can be more clever. |
Fixes scala/bug#11870
(reverted in #9069)