Skip to content

UndefVarError with tuple destructuring #38016

@mwarusz

Description

@mwarusz
julia> function f((x, y))
       let
        T = Int
        x::T = 3
        y::T = 4
       end
       end
f (generic function with 1 method)

julia> f((1, 2))
ERROR: UndefVarError: T not defined

I am using Julia version 1.5.2. This works correctly if the function signature is f(x, y).

Metadata

Metadata

Assignees

No one assigned

    Labels

    compiler:loweringSyntax lowering (compiler front end, 2nd stage)duplicateIndicates similar issues or pull requests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions