Skip to content

Member defined in REPL should shadow previously imported member #4230

Closed
@Blaisorblade

Description

@Blaisorblade

Below an (un)reproducible transcript of the REPL not handling shadowing correctly. After both importing and defining f, only the imported one is in scope.

> repl
[...]
scala> object A { def f = 1 }
// defined object A
scala> import A._
scala> def f = "hi"
def f: String
scala> f
val res0: Int = 1

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions