Skip to content

Unexpected behavior due to implicit convert with Char and Integer #44410

@mzgubic

Description

@mzgubic
julia> append!([1, 2, 3], "4")
4-element Vector{Int64}:
  1
  2
  3
 52

is unintuitive (I would expect an error).

I think the mechanism for this is that it treats the "4" as a collection of Chars, and converts them into integers.

cc @jakobnissen @andrewrosemberg @raphaelsaavedra

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueIndicates a good issue for first-time contributors to Juliastrings"Strings!"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions