-
Notifications
You must be signed in to change notification settings - Fork 388
Closed
scala/scala3
#22674Labels
bugSomething that is making a piece of functionality unusableSomething that is making a piece of functionality unusable
Milestone
Description
Describe the bug
Given the following Scala code:
sealed trait TA:
type SomeType
trait TB extends TA:
override type SomeType = Nothing
trait TC extends TA:
override type SomeType = String
If I try to rename the SomeType
in the base trait TA
to AnotherType
I get the following:
sealed trait TA:
type AnotherType
trait TB extends TA:
override type SomeType = Nothing
trait TC extends TA:
override type SomeType = String
Note that the types in TB
and TC
are not renamed.
Funnily enough, if I rename that type in the TB
trait then the type in the base trait is also renamed (but not in the TC
trait):
sealed trait TA:
type AnotherType
trait TB extends TA:
override type AnotherType = Nothing
trait TC extends TA:
override type SomeType = String
Expected behavior
I would expected to get the following if I rename the SomeType
in the base trait TA
to AnotherType
:
sealed trait TA:
type AnotherType
trait TB extends TA:
override type AnotherType = Nothing
trait TC extends TA:
override type AnotherType = String
Operating system
macOS
Editor/Extension
Nvim (nvim-metals)
Version of Metals
v1.5.1
Extra context or search terms
No response
Metadata
Metadata
Assignees
Labels
bugSomething that is making a piece of functionality unusableSomething that is making a piece of functionality unusable
Type
Projects
Status
Done