Skip to content

Wrong type captured in 0.6 #21178

@marius311

Description

@marius311

I think I found another minor type bug. Running on e3e912a, the F2 type below is captured as a SimpleVector which is incorrect,

struct Foo{A,B} end
bar(::F1,::F2) where {B1,B2,F1<:Foo{B1,<:Any},F2<:Foo{B2}} = F1,F2,B1,B2
bar(Foo{1,2}(),Foo{1,2}())
> (Foo{1,2}, SimpleVector, 1, 1)

Getting rid of the <:Any, or capturing that parameter explicitly, seems to fix it.

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behaviorcompiler: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