Skip to content

Generic signature should box primitive type underlying refinement #3956

Closed
@gsps

Description

@gsps
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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions