Skip to content

Range#size returns an Union instead of an Int32 #14587

Closed
@hutou

Description

@hutou

The following snippet:

range = 1_u8..5_u8
size = range.size
p! typeof(size)

returns

typeof(size) # => (Int32 | UInt8)

instead of the expected

typeof(size) # => Int32

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:bugA bug in the code. Does not apply to documentation, specs, etc.topic:stdlib:collection

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions