In the code snippet below, ideally we want to propagate uw::DataType information to #7:
julia> code_typed((Any,Type); optimize=false) do uw, ti
(uw isa DataType && ti <: uw.name.wrapper) || return nothing
uw
end
1-element Vector{Any}:
CodeInfo(
1 ─ %1 = (uw isa Main.DataType)::Bool
└── goto #3 if not %1
2 ─ %3 = Base.getproperty(uw::DataType, :name)::Core.TypeName
│ %4 = Base.getproperty(%3, :wrapper)::Type
│ (@_4 = ti <: %4)::Bool
└── goto #4
3 ─ (@_4 = false)::Core.Const(false)
4 ┄ %8 = @_4::Bool
└── goto #6 if not %8
5 ─ goto #7
6 ─ return Main.nothing
7 ─ return uw
) => Any
I feel like this can be fixed by a lowering improvement as we did for #39611?
/cc @simeonschaub @vtjnash
In the code snippet below, ideally we want to propagate
uw::DataTypeinformation to#7:I feel like this can be fixed by a lowering improvement as we did for #39611?
/cc @simeonschaub @vtjnash