Skip to content

Error when pickling - compiling project with 3.8.0-RC1 #24484

@OndrejSpanel

Description

@OndrejSpanel

My project fails compiling with 3.8.0-RC1. The error messages are quite cryptic.

Compiler version

3.8.0-RC1

Minimized code

Not yet, I will to provide it next week.

The type triggering the error looks like this:

  abstract class MapObject

  case class MapObjectInfo(name: String, obj: MapObject) {
    def isAgent: Boolean = obj.isInstanceOf[AgentRef]
    def isCrop: Boolean = !isAgent
    def isPlot: Boolean = obj.isPlot
  }
  type MapObjects = Map[(Int, Int), MapObjectInfo]

Output

error when pickling type (mapObjects : net.gamatron.procas.trpas.settlement.Settlement.MapObjects)
error when pickling tree this of class class dotty.tools.dotc.ast.Trees$This
error when pickling tree this.type of class class dotty.tools.dotc.ast.Trees$SingletonTypeTree
error when pickling tree this.type | pred.type of class class dotty.tools.dotc.ast.Trees$AppliedTypeTree
error when pickling tree new _root_.scala.annotation.retains[this.type | pred.type] of class class dotty.tools.dotc.ast.Trees$TypeApply
error when pickling tree new _root_.scala.annotation.retains[this.type | pred.type]() of class class dotty.tools.dotc.ast.Trees$Apply
error when pickling type Map[(Int, Int), net.gamatron.procas.trpas.settlement.Settlement.MapObjectInfo]

Expectation

The code should compile, or if it does not, the error should be actionable.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions