-
Notifications
You must be signed in to change notification settings - Fork 256
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
Type test for char #3814
Comments
I'm not sure I love this idea, as much as I agree with the motivation. Currently I usually think of |
This should be:
Valid Unicode scalar values go up to 0x10FFFF. It looks like Dafny implements this correctly and only the comment above was wrong. Of course, the |
Summary
For an integer
u
, the expressionu is char
is currently not supported.Many variations of of types are supported for
is
, but testing whether anint
is achar
is currently missing.Background and Motivation
Stating
u is char
as an integer range is awkward and error prone.Also, for code that is migrating from before-Unicode support to full Unicode support, it would be nicer to have an expression that takes on different meanings depending on what Unicode mode Dafny is invoked in.
Proposed Feature
With
--unicode-char:false
,u is char
(whereu has type
int`) should be equivalent toWith
--unicode-char:true
,u is char
(whereu has type
int`) should be equivalent toAlternatives
No response
The text was updated successfully, but these errors were encountered: