Silence a warning on the latest 6.2-dev toolchain when building a test. #969
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We are getting a (sort of spurious but also not really) warning when building a test where we have a particularly weird bit of code:
The code in question will be executed, but will always throw an
ExpectationFailedError
. The compiler's getting a bit confused because the expansion of the macro includes a call to a function that returnsT
, whereT
is the type of the expression being unwrapped. SinceT
isNever
in this context, the compiler infers that that function does not return. The compiler's inference is correct, but it's unclear what exactly it thinks will never be executed here.In any event, the warning is spurious and does not indicate a problem with the test, so I'm changing the return type of the problematic function from
Never?
toInt?
to make the compiler happy.Checklist: