This may not actually have been a problem to start and possibly just something weird we had in our app ref; however, I decided to still make this change anyway. By moving the call body in to a separate method, the compile-time error is a lot more accurate. Though, it's not as pretty as before, I think the clarity and accuracy outweighs the custom error message.
Also by adding a few comments above the method, you get a little bit of documentation, and the actual action that's failing which should lead you to a fix a bit quicker.
See #1843 for more info on the error message change
Checklist
[x] - An issue already exists detailing the issue/or feature request that this PR fixes
[x] - All specs are formatted with crystal tool format spec src
[x] - Inline documentation has been added and/or updated
[x] - Lucky builds on docker with ./script/setup
[x] - All builds and specs pass on docker with ./script/test
Purpose
Fixes #1843
Description
This may not actually have been a problem to start and possibly just something weird we had in our app ref; however, I decided to still make this change anyway. By moving the call body in to a separate method, the compile-time error is a lot more accurate. Though, it's not as pretty as before, I think the clarity and accuracy outweighs the custom error message.
Also by adding a few comments above the method, you get a little bit of documentation, and the actual action that's failing which should lead you to a fix a bit quicker.
See #1843 for more info on the error message change
Checklist
crystal tool format spec src
./script/setup
./script/test