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

Add -language:noAutoTupling in Scala 3 #218

Open
mrdziuban opened this issue May 14, 2024 · 0 comments
Open

Add -language:noAutoTupling in Scala 3 #218

mrdziuban opened this issue May 14, 2024 · 0 comments

Comments

@mrdziuban
Copy link
Contributor

mrdziuban commented May 14, 2024

I just discovered that auto tupling is enabled by default in Scala 3 but can be disabled with this flag. Would you be open to adding it?

For example

def foo(t: (Int, String)) = t

// before - compiles just fine
foo(1, "test")

// after - error
-- [E007] Type Mismatch Error: -------------------------------------------------
1 |foo(1, "test")
  |    ^
  |    Found:    (1 : Int)
  |    Required: (Int, String)
  |
  | longer explanation available when compiling with `-explain`
-- Error: ----------------------------------------------------------------------
1 |foo(1, "test")
  |       ^^^^^^
  |      too many arguments for method foo: (t: (Int, String)): (Int, String)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant