Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Range being flagged as "duplicate" #4624

Open
RaphGL opened this issue Dec 24, 2024 · 0 comments
Open

Range being flagged as "duplicate" #4624

RaphGL opened this issue Dec 24, 2024 · 0 comments

Comments

@RaphGL
Copy link

RaphGL commented Dec 24, 2024

Context

Using a range in a switch is being flagged as duplicate by the compiler. I found this out while trying to check some unicode codepoints.

  • Arch Linux x86
  • odin version dev-2024-12:7be003557 (but I've been told that it's failing even on master branch)

Failure Information (for bugs)

/home/raph/Projects/OdinKDL2/helpers.odin(28:15) Error: Duplicate case ''\uDFFF'' 
    previous case at /home/raph/Projects/OdinKDL2/helpers.odin(28:4) 
    ... D800'..='\uDFFF'

Steps to Reproduce

Compile the following code and it will throw an error:

package main 

foo :: proc(r: rune) {
    switch r {
    case '\uD800'..='\uDFFF':
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant