Skip to content

Pickling error with match type as method argument type #5680

Open
@milessabin

Description

@milessabin

Compiling the following,

object Test {
  // The identity on Unit
  type Id[X] = X match {
    case _ => X
  }

  def foo[T](it: Id[T]) = ???
  foo(())
}

with -Xprint-types -Ytest-pickler -Yprint-pos -Yprint-pos-syms as in CompilationTests.pickling results in a round trip failure,

miles@tarski:dotty (master)% diff before-pickling.txt after-pickling.txt
33c33
<       <<Test.foo:([T](it: T): scala.Nothing)>@<118..121>[scala.Unit]:
---
>       <<Test.foo:([T](it: Test.Id[T]): scala.Nothing)>@<118..121>[scala.Unit]:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions