Skip to content

Specialize ∘ on type arguments? #34849

@jw3126

Description

@jw3126

The following does not infer:

julia> f(itr) = map(Intsign, itr)
f (generic function with 2 methods)

julia> f((1,))
(1,)

julia> @code_warntype f((1,))
Variables
  #self#::Core.Compiler.Const(f, false)
  itr::Tuple{Int64}

Body::Tuple{Any}
1%1 = (Main.Int  Main.sign)::Core.Compiler.Const(Base.var"#56#57"{DataType,typeof(sign)}(Int64, sign), false)
│   %2 = Main.map(%1, itr)::Tuple{Any}
└──      return %2

This occured here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions