Skip to content

Parsing error on non-decimal integer complex numbers #56799

Open
@ethomag

Description

I have noticed this in Julia 1.10 and 1.11.

I agree, a strange usage but I tripped over it in a real-world use case.

julia> 0x01+0x01im
ERROR: ParseError:    
# Error @ REPL[1]:1:6
0x01+0x01im           
#    └────┘ ── invalid numeric constant

The same goes for other bases and sizes.
This works fine, though:

julia> 0x01+0x01*im
0x01 + 0x01im

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    parserLanguage parsing and surface syntax

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions