Skip to content

Router type mismatch when importing scala.collection.mutable._ #953

@david-bouyssie

Description

@david-bouyssie

When performing this import import scala.collection.mutable._ in the header of a given script ammonite crashes with this error:

type mismatch
 found   : (ammonite.$file.myscript_2.$routesOuter.type, scala.collection.mutable.Map[String,String], scala.collection.mutable.Seq[String]) => ammonite.main.Router.Result[Any]
 required: (ammonite.$file.myscript_2.$routesOuter.type, scala.collection.immutable.Map[String,String], scala.collection.Seq[String]) => ammonite.main.Router.Result[Any]
  def apply() = ammonite.main.Router.generateRoutes[$routesOuter.type]

As a workaround I'm only doing import scala.collection.mutable and I refer then to mutable.XXX in my script.

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