Skip to content

getindex on Composites doesn't alway return Zero() for not foundΒ #238

Open
@oxinabox

Description

@oxinabox
julia> c = Composite{Any}()
Composite{Any}NamedTuple()

julia> c[:a]
ERROR: type NamedTuple has no field a

julia> c[1]
ERROR: BoundsError: attempt to access NamedTuple{(),Tuple{}}
  at index [1]

getproperty works right though:

julia> c.a
Zero()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Structural TangentRelated to the `Tangent` type for structured (composite) values

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions