Skip to content

Named Tuples do not have completion suggestions #20478

Closed
@bishabosha

Description

@bishabosha

Compiler version

3.5.0-RC1

Minimized code

import scala.language.experimental.namedTuples

import scala.NamedTuple.*

val person = (name = "Jamie", city = "Lausanne")

class NamedTupleSelectable extends Selectable {
  type Fields <: AnyNamedTuple
  def selectDynamic(name: String): Any = ???
}

val person2 = new NamedTupleSelectable {
  type Fields = (name: String, city: String)
}

Output

scala> // paste the above here
val person: (name : String, city : String) = (Jamie,Lausanne)
val person2: NamedTupleSelectable{type Fields = (name : String, city : String)} = anon$1@2dcbf825

scala> person.ci<TAB> // no completions here
scala> person2.ci<TAB> // no completions here

Expectation

there should be completions, as there are for standard structural refinements

Metadata

Metadata

Assignees

Labels

area:named-tuplesIssues tied to the named tuples feature.area:presentation-compilerRelated to the presentation compiler module used by Metals and possibly other toolsitype:bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions