Skip to content

Add -language:noAutoTupling in Scala 3 #218

@mrdziuban

Description

@mrdziuban

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions