Skip to content

Generic signature should box primitive type underlying refinement #3956

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
gsps opened this issue Feb 2, 2018 · 0 comments
Closed

Generic signature should box primitive type underlying refinement #3956

gsps opened this issue Feb 2, 2018 · 0 comments

Comments

@gsps
Copy link
Contributor

gsps commented Feb 2, 2018

object Foo {
  type RInt = Int { val x: Int }
  def f(xs: List[Int]): List[RInt] = ???
}

leads to an error checking the validity of the generated signature:

3 |  def f(xs: List[Int]): List[RInt] = ???
  |      ^
  |      compiler bug: created invalid generic signature for method f in Foo
  |      signature: (Lscala/collection/immutable/List<Ljava/lang/Object;>;)Lscala/collection/immutable/List<I>;
  |      if this is reproducible, please report bug at https://github.com/lampepfl/dotty/issues
(Lscala/collection/immutable/List<Ljava/lang/Object;>;)Lscala/collection/immutable/List<I>;: 'T' expected at index 88
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant