Skip to content

-Ytest-pickler fails on literal type in intersection #5486

Closed
@panacekcz

Description

@panacekcz

Test code:

class Test {
  def test = -(1:1 & Any)
}

dotc -Ytest-pickler -Xprint-types Test.scala:

exception occurred while compiling Test.scala
class dotty.tools.dotc.reporting.diagnostic.messages$Error at ?: pickling difference for class Test in Test.scala, for details:

diff before-pickling.txt after-pickling.txt:

14c14
<       <<(<1:scala.Int> :<1:scala.Int>.type & scala.Any):scala.Int(1)>.unary_-:
---
>       <<(<1:scala.Int> :<1:scala.Int>.type & scala.Any):scala.Int>.unary_-:=>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions