Skip to content

Automatic expansion of Tuple1 #12797

Closed
Closed
@Adam-Vandervorst

Description

@Adam-Vandervorst

Compiler version

3.0.0

Minimized code

def g(a: Tuple1[Int]) = a._1*2

@main def main_f = 
    println(g(1))

Output

Found:    (1 : Int)
Required: Tuple1[Int]
    println(g(1))

Expectation

Work the same as

def f(a: Tuple2[Int, Int]) = a._1 + a._2

@main def main_f = 
    println(f(1, 2))

or work with g((1)), g((1,)), or g(1,).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions