-
Notifications
You must be signed in to change notification settings - Fork 790
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
Always use typeEquivAux EraseMeasures
(for integral range optimizations)
#17048
Conversation
❗ Release notes required
|
typeEquivAux EraseMeasures
typeEquivAux EraseMeasures
(for integral range optimizations)
Is it worth adding any more tests here compared to the ones in #17040? |
The tests added in #17040 actually already showed this problem — that's why the baselines needed to be updated in this PR. I just didn't notice that there were additional places affected by this in #17040 because I was focusing on (1) whether the code compiled at all and (2) that the generated IL used the new I think that these tests (the ones added in #17040 and updated here) are enough to show that the class of bug caused by using If we wanted to be more thorough in general, though, we really should add duplicates of all the existing emitted IL tests for integral ranges but with units of measure — although we would then be faced with #17046 and fsharp/fslang-suggestions#535. We might even add additional tests that asserted that the emitted IL for the unit-less versions matched the emitted IL for the versions with units. As a sanity check, we could also/alternatively add duplicates with units of measure of all the existing non-emitted-IL tests for ranges, like these, though again we'd need to work around fsharp/fslang-suggestions#535. |
@brianrourkeboll thanks for the detailed explanation. I think this can go as is then, the tests you suggest would be helpful but definitely a separate and potentially big effort. Thanks! |
* Disallow calling abstract methods directly on interfaces (#17021) * Disallow calling abstract methods directly on interfaces * More tests * IWSAMs are not supported by NET472 * Update src/Compiler/Checking/ConstraintSolver.fs Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com> * fix typos * looking for the right check * Add comments * move release notes * Add a new error number and message * Update docs/release-notes/.FSharp.Compiler.Service/8.0.400.md Co-authored-by: Brian Rourke Boll <brianrourkeboll@users.noreply.github.com> * Update docs/release-notes/.FSharp.Compiler.Service/8.0.400.md Co-authored-by: Brian Rourke Boll <brianrourkeboll@users.noreply.github.com> * Improve error message --------- Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com> Co-authored-by: Brian Rourke Boll <brianrourkeboll@users.noreply.github.com> * Always use `typeEquivAux EraseMeasures` (for integral range optimizations) (#17048) * Always use `typeEquivAux EraseMeasures` * Update release notes * Update baselines --------- Co-authored-by: Petr <psfinaki@users.noreply.github.com> --------- Co-authored-by: Edgar Gonzalez <edgar.gonzalez@fundourselves.com> Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com> Co-authored-by: Brian Rourke Boll <brianrourkeboll@users.noreply.github.com> Co-authored-by: Petr <psfinaki@users.noreply.github.com> Co-authored-by: Kevin Ransom (msft) <codecutter@hotmail.com>
* Disallow calling abstract methods directly on interfaces (#17021) * Disallow calling abstract methods directly on interfaces * More tests * IWSAMs are not supported by NET472 * Update src/Compiler/Checking/ConstraintSolver.fs Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com> * fix typos * looking for the right check * Add comments * move release notes * Add a new error number and message * Update docs/release-notes/.FSharp.Compiler.Service/8.0.400.md Co-authored-by: Brian Rourke Boll <brianrourkeboll@users.noreply.github.com> * Update docs/release-notes/.FSharp.Compiler.Service/8.0.400.md Co-authored-by: Brian Rourke Boll <brianrourkeboll@users.noreply.github.com> * Improve error message --------- Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com> Co-authored-by: Brian Rourke Boll <brianrourkeboll@users.noreply.github.com> * Always use `typeEquivAux EraseMeasures` (for integral range optimizations) (#17048) * Always use `typeEquivAux EraseMeasures` * Update release notes * Update baselines --------- Co-authored-by: Petr <psfinaki@users.noreply.github.com> --------- Co-authored-by: Edgar Gonzalez <edgar.gonzalez@fundourselves.com> Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com> Co-authored-by: Brian Rourke Boll <brianrourkeboll@users.noreply.github.com> Co-authored-by: Petr <psfinaki@users.noreply.github.com> Co-authored-by: Vlad Zarytovskii <vzaritovsky@hotmail.com>
* Disallow calling abstract methods directly on interfaces (#17021) * Disallow calling abstract methods directly on interfaces * More tests * IWSAMs are not supported by NET472 * Update src/Compiler/Checking/ConstraintSolver.fs Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com> * fix typos * looking for the right check * Add comments * move release notes * Add a new error number and message * Update docs/release-notes/.FSharp.Compiler.Service/8.0.400.md Co-authored-by: Brian Rourke Boll <brianrourkeboll@users.noreply.github.com> * Update docs/release-notes/.FSharp.Compiler.Service/8.0.400.md Co-authored-by: Brian Rourke Boll <brianrourkeboll@users.noreply.github.com> * Improve error message --------- Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com> Co-authored-by: Brian Rourke Boll <brianrourkeboll@users.noreply.github.com> * Always use `typeEquivAux EraseMeasures` (for integral range optimizations) (#17048) * Always use `typeEquivAux EraseMeasures` * Update release notes * Update baselines --------- Co-authored-by: Petr <psfinaki@users.noreply.github.com> * Error message that explicitly disallowed static abstract members in classes. (#17055) * WIP * Error message that explicitly disallowed static abstract methods in abstract classes * release notes * SynTypeDefnKind.Class * Fix #16761 (#17047) * Fix #16761 * Fully async version + ignore cancellation on external navigation * Automated command ran: fantomas Co-authored-by: vzarytovskii <1260985+vzarytovskii@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: Edgar Gonzalez <edgar.gonzalez@fundourselves.com> Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com> Co-authored-by: Brian Rourke Boll <brianrourkeboll@users.noreply.github.com> Co-authored-by: Petr <psfinaki@users.noreply.github.com> Co-authored-by: Vlad Zarytovskii <vzaritovsky@hotmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Kevin Ransom (msft) <codecutter@hotmail.com>
Description
Followup to #16650 and #17040.
typeEquivAux EraseMeasures
instead ofstripMeasuresFromTy
for the integral range optimizations. I should have done this in Use alternative way of ignoring measures when detecting integral types #17040 to begin with. Note that the appropriate unsigned type and checks are now correctly present in the emitted IL.Checklist