Skip to content

trait val with symbolic name is lost #13252

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

Closed
edolgy opened this issue Aug 4, 2021 · 0 comments · Fixed by #13269
Closed

trait val with symbolic name is lost #13252

edolgy opened this issue Aug 4, 2021 · 0 comments · Fixed by #13269
Assignees
Milestone

Comments

@edolgy
Copy link

edolgy commented Aug 4, 2021

Compiler version

3.0.2-RC1

Minimized code

object Test:

  class Star

  trait Foo:
    @annotation.targetName("star") val * : Star = new Star

  object Bar extends Foo

  def main(sa: Array[String]): Unit =
    Bar.*

Output

[error] java.lang.AbstractMethodError: test.Test$Bar$.star()Ltest/Test$Star;
[error]         at test.Test$.main(Test.scala:14)
[error]         at test.Test.main(Test.scala)
odersky added a commit to dotty-staging/dotty that referenced this issue Aug 7, 2021
Enter symbols under their target names in their parent scope after erasure.

Fixes scala#13252
@dwijnand dwijnand assigned odersky and unassigned anatoliykmetyuk Aug 7, 2021
@Kordyjan Kordyjan added this to the 3.1.0 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants