Skip to content

const before destructuring is inconsistent #54787

@Keno

Description

@Keno
julia> const (a,) = (1,2,3)
(1, 2, 3)

julia> a
1

julia> isconst(@__MODULE__, :a)
true

vs


julia> const (b...,) = (1,2,3)
(1, 2, 3)

julia> b
(1, 2, 3)

julia> isconst(@__MODULE__, :b)
false

I'm not really a fan of these complex destructurings in const at all, but they should at least be consistent.

Metadata

Metadata

Assignees

Labels

compiler:loweringSyntax lowering (compiler front end, 2nd stage)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions