mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
4f7a4a3453
For some reason, attempting to get the class of the stubbed value causes a segfault. This appears to get swallowed in some cases. Trying to inspect the value was difficult without triggering some error. In the failing case, the value is 42 (returned by a stubbed foo method). The method is supposed to return a String, and this error checking should be triggered (line 119). The value is a union, and inspecting the bytes contained in it looks like it's prefixed with the Crystal type ID for Int32. However it looks like Crystal tries to treat it as a Bool? I'm not sure. Very weird behavior and instead of wasting more time on it, I'm omitting the returned type from the error. This type of casting error shouldn't be common. This seems like a Crystal bug, but I'm having a hard time distilling the issue. |
||
---|---|---|
.. | ||
docs | ||
features | ||
helpers | ||
issues | ||
matchers | ||
rspec | ||
spectator | ||
runtime_example_spec.cr | ||
spec_helper.cr |