Skip to content

Allow ^ in constant numeric expressions#14951

Merged
straight-shoota merged 1 commit intocrystal-lang:masterfrom
HertzDevil:feature/const-xor
Sep 3, 2024
Merged

Allow ^ in constant numeric expressions#14951
straight-shoota merged 1 commit intocrystal-lang:masterfrom
HertzDevil:feature/const-xor

Conversation

@HertzDevil
Copy link
Contributor

@HertzDevil HertzDevil commented Aug 29, 2024

This operator was oddly missing even though | and & are already supported:

enum Foo
  A = 1 | 2 # okay
  B = 1 & 2 # okay
  C = 1 ^ 2 # Error: invalid constant value
end

@ysbaddaden ysbaddaden added this to the 1.14.0 milestone Sep 2, 2024
@straight-shoota straight-shoota merged commit 598931c into crystal-lang:master Sep 3, 2024
@HertzDevil HertzDevil deleted the feature/const-xor branch September 4, 2024 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants