You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeCastError is a runtime error, it happens when resolving a union to a type that doesn't match its actual value at runtime.
You're looking at a compile error here.
Also remember, casting is interpreting the same value (the same bytes) as a different type. Conversion or coercion is producing an equivalent or comparable value in a different type. as does casting only.
https://play.crystal-lang.org/#/r/a1tf
I would have expected this to work like the example in the API docs, where it actually raises a TypeCastError.
The text was updated successfully, but these errors were encountered: