We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
as
The as method can't be used on a union when one of the types is a pointer.
The following doesn't compile:
a = Pointer(UInt8).new(1) || 2 p! typeof(a), a b = a.as(Pointer(UInt8)) p! typeof(b), b
Gives the error:
3 | b = a.as(Pointer(UInt8)) ^ Error: can't cast (Int32 | Pointer(UInt8)) to Pointer(UInt8)
Crystal 1.7.2
The text was updated successfully, but these errors were encountered:
Related to/duplicate of #9281?
Sorry, something went wrong.
Definitively a duplicate
No branches or pull requests
The
as
method can't be used on a union when one of the types is a pointer.The following doesn't compile:
Gives the error:
Crystal 1.7.2
The text was updated successfully, but these errors were encountered: