Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Downcasting on tagged integers needs to be handled.
This is one of those "what was I thinking?!" moments where it's hard to imagine how I got so confused that I made the mistake this commit fixes. yksom, correctly, stops you trying to downcast a `Val` to an `Int`. However, the `*downcast` functions took that too far by also trying to stop you checking whether a run-time `Val` that happened to be an `Int` could be downcast or not. If you did, you got (in debug mode) an assertion failure or (in runtime mode) undefined behaviour. This simple commit rectifies this mistake by explicitly checking for tagged integers when downcasting.
- Loading branch information