Skip to content

bug in method signatures with nested where inside variable bounds #31542

@JeffBezanson

Description

@JeffBezanson
julia> function f(x::Pair{A,B}) where {A, B<:(Vector{A} where A)}
       end
ERROR: syntax: invalid variable expression in "where"

This happens because of the odd way method signatures are lowered and the name collision with the inner and outer A; it's not a problem for where expressions generally:

julia> Pair{A,B} where {A, B<:(Vector{A} where A)}
Pair{A,B} where B<:(Array{A,1} where A) where A

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behaviorcompiler:loweringSyntax lowering (compiler front end, 2nd stage)

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions