Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Named Tuples do not have completion suggestions #20478

Closed
bishabosha opened this issue May 27, 2024 · 0 comments · Fixed by #21202
Closed

Named Tuples do not have completion suggestions #20478

bishabosha opened this issue May 27, 2024 · 0 comments · Fixed by #21202
Assignees
Labels
area:named-tuples Issues tied to the named tuples feature. area:presentation-compiler Related to the presentation compiler module used by Metals and possibly other tools itype:bug

Comments

@bishabosha
Copy link
Member

bishabosha commented May 27, 2024

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

@bishabosha bishabosha added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label area:named-tuples Issues tied to the named tuples feature. area:presentation-compiler Related to the presentation compiler module used by Metals and possibly other tools and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels May 27, 2024
@bishabosha bishabosha changed the title selection Completions are not populated with namedTuples Named Tuples do not have completion suggestions May 30, 2024
@KacperFKorban KacperFKorban self-assigned this Jul 16, 2024
KacperFKorban referenced this issue Jul 17, 2024
closes scala#20478

---------

Co-authored-by: Jędrzej Rochala <[email protected]>
WojciechMazur referenced this issue Aug 28, 2024
closes scala#20478

---------

Co-authored-by: Jędrzej Rochala <[email protected]>
[Cherry-picked 3e78238]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:named-tuples Issues tied to the named tuples feature. area:presentation-compiler Related to the presentation compiler module used by Metals and possibly other tools itype:bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants