Skip to content

Named tuples operations produce huge types in inlay hints #7397

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

Open
keynmol opened this issue Apr 13, 2025 · 1 comment · May be fixed by scala/scala3#23013
Open

Named tuples operations produce huge types in inlay hints #7397

keynmol opened this issue Apr 13, 2025 · 1 comment · May be fixed by scala/scala3#23013
Labels
bug Something that is making a piece of functionality unusable Scala 3 Generic ticket relating to Scala 3

Comments

@keynmol
Copy link
Contributor

keynmol commented Apr 13, 2025

Describe the bug

//> using scala 3.7.0-RC2
def hello = (path = ".", num = 5)

def test =
  hello ++ (line = 1)

@main def bla =
  val x: (path: String, num: Int, line: Int) = test

Inlay hint is super long for concatenation:

Image

And doing "Insert type" code action on test produces a huge type as well.

Expected behavior

Named tuples should be handled in a special way by other compiler or metals, producing the expected shortand type

Operating system

macOS

Editor/Extension

Other

Version of Metals

1.5.2

Extra context or search terms

named tuples, inlay hints, inferred type

tgodzik added a commit to tgodzik/scala3 that referenced this issue Apr 17, 2025
@tgodzik
Copy link
Contributor

tgodzik commented Apr 17, 2025

Trying a fix in scala/scala3#23013, let me know if that makes more sense.

@tgodzik tgodzik added bug Something that is making a piece of functionality unusable Scala 3 Generic ticket relating to Scala 3 labels Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is making a piece of functionality unusable Scala 3 Generic ticket relating to Scala 3
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants