Skip to content

@which errors when function is defined using parametric ComponentArray #92

@amrods

Description

@amrods

does this error with @which belong here?

using ComponentArrays

ca = ComponentArray(x=2.0, y=2.0)

function f(ca::ComponentArray{T}) where T
    sum(ca)
end

julia> @which f(ca)
Error showing value of type Method:
ERROR: UndefVarError: T not defined
Stacktrace:
  [1] show(io::IOContext{IOBuffer}, #unused#::
SYSTEM (REPL): showing an error caused an error
ERROR: UndefVarError: T not defined
Stacktrace:
  [1] show(io::IOContext{IOBuffer}, #unused#::
SYSTEM (REPL): caught exception of type UndefVarError while trying to handle a nested exception; giving up

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