-
Notifications
You must be signed in to change notification settings - Fork 3
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
Attempting to mock File results in error #49
Comments
Traced the issue to stubbable.cr, line 129-164. Seems like there are some cases that it's not handling well. |
The original issue has been resolved, however there's another issue that prevents mocking a = true ? Pointer(UInt8).null : nil
b = a.as(Pointer(UInt8))
p! a, typeof(a), b, typeof(b) I'm not sure if this is intended or a bug in the compiler. This code works for other non-pointer types. https://gitlab.com/arctic-fox/spectator/-/jobs/3648109240#L35 |
Ahh that's what that question was in reference to |
It doesn't appear that the issue with pointers in unions will be fixed soon. A workaround in Spectator would be substantial. There's a possible fix that may even reduce compilation time, but it could take a while to implement. |
The constructed previous_def call was malformed for stub methods. Resolves the original issue in #49
Fix splat argument expansion in method redefinition See merge request arctic-fox/spectator!36
Not sure if this is part of the intended purpose of mocks or not, but I'm attempting to mock the
File
class and I get the following error:The text was updated successfully, but these errors were encountered: