Skip to content

I can't unimport names under scala package object #11317

@eed3si9n

Description

@eed3si9n

steps

I want to mask scala.Seq.

scala> :paste
// Entering paste mode (ctrl-D to finish)

object Foo {
  import scala.{ Seq => _, _ }
  val xs = Seq(1, 2, 3)
}

// Exiting paste mode, now interpreting.

defined object Foo

scala> Foo.xs
res1: Seq[Int] = List(1, 2, 3)

problem

The name Seq is still available within object Foo { ... }.

expectation

The code does not compile.

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