Skip to content

Bug in closure conversion for cursed code #56510

Open
@Keno

Description

@Keno

The following fails to properly closure convert one of the references to X, leading to an incorrect error:

julia> struct X <: (global f; (f() = X); Any)
       x::f()
       end
ERROR: TypeError: in Type, in parameter, expected Type, got a value of type Core.Box
Stacktrace:
 [1] top-level scope
   @ REPL[1]:1

Metadata

Metadata

Assignees

No one assigned

    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