Open
Description
Reproduction steps
Scala version: 2.13.12
In Test.scala
trait Trait
object Object {
object Implementation extends Trait
}
trait Trait2 {
def foo: Trait
}
class Test {
object InsideClass extends Trait2 {
val obj = Object
override def foo = obj.Implementation
}
}
Compile with scalac -quickfix:any -Xsource:3 Test.scala
and it updates the file to
trait Trait
object Object {
object Implementation extends Trait
}
trait Trait2 {
def foo: Trait
}
class Test {
object InsideClass extends Trait2 {
val obj = Object
override def foo: Test.InsideClass.obj.Implementation.type = obj.Implementation
}
}
which isn't valid, since Test
is a class.
Problem
Quickfix uses non-stable identifiers as stable identifiers
Metadata
Metadata
Assignees
Labels
No labels