Skip to content

setfield! does not call convert #16195

Closed
@stevengj

Description

@stevengj
type Foo; x::Float64; end
foo = Foo(0)
foo.x = 3
foo.(:x) = 4
setfield!(foo, :x, 5)

The last line throws TypeError: setfield!: expected Float64, got Int64.

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