-
Notifications
You must be signed in to change notification settings - Fork 831
Disallow calling abstract methods directly on interfaces #17021
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
Merged
Merged
Changes from 11 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
79df557
Disallow calling abstract methods directly on interfaces
edgarfgp d8bbd0f
Merge branch 'main' into fix-14012
edgarfgp d8d9062
More tests
edgarfgp b542709
IWSAMs are not supported by NET472
edgarfgp 7fa7b8f
Update src/Compiler/Checking/ConstraintSolver.fs
edgarfgp 7fa370b
fix typos
edgarfgp ce7acc2
looking for the right check
edgarfgp 9ecd812
Merge branch 'main' into fix-14012
edgarfgp 1fc2c73
Add comments
edgarfgp cccb6c7
Merge branch 'main' into fix-14012
edgarfgp f1310d5
move release notes
edgarfgp 604ba02
Add a new error number and message
edgarfgp 888382b
Merge branch 'main' into fix-14012
edgarfgp df5d20e
Update docs/release-notes/.FSharp.Compiler.Service/8.0.400.md
edgarfgp 5154ae8
Update docs/release-notes/.FSharp.Compiler.Service/8.0.400.md
edgarfgp fe85336
Merge branch 'main' into fix-14012
edgarfgp 968fe31
Improve error message
edgarfgp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| ### Fixed | ||
|
|
||
| Various parenthesization API fixes. ([PR #16977](https://github.com/dotnet/fsharp/pull/16977)) | ||
| * Disallow calling abstract methods directly on interfaces. ([PR #16319](https://github.com/dotnet/fsharp/pull/16319)) | ||
| * Various parenthesization API fixes. ([PR #16977](https://github.com/dotnet/fsharp/pull/16977)) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...entTests/Conformance/Types/TypeConstraints/IWSAMsAndSRTPs/ConstrainedAndInterfaceCalls.fs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| #nowarn "64" | ||
| open System | ||
| open System.Numerics | ||
|
|
||
| module ConstrainedCall = | ||
| let ``'T.op_Addition``<'T & #IAdditionOperators<'T, 'T, 'T>> x y = 'T.op_Addition (x, y) | ||
| let ``'T.(+)``<'T & #IAdditionOperators<'T, 'T, 'T>> x y = 'T.(+) (x, y) | ||
| let ``'T.op_CheckedAddition``<'T & #IAdditionOperators<'T, 'T, 'T>> x y = 'T.op_CheckedAddition (x, y) | ||
| let ``'T.Parse``<'T & #IParsable<'T>> x = 'T.Parse (x, null) | ||
|
|
||
| module InterfaceCall = | ||
| let ``IAdditionOperators.op_Addition`` x y = IAdditionOperators.op_Addition (x, y) | ||
| let ``IAdditionOperators.(+)`` x y = IAdditionOperators.(+) (x, y) | ||
| let ``IAdditionOperators.op_CheckedAddition`` x y = IAdditionOperators.op_CheckedAddition (x, y) | ||
| let ``IParsable.Parse``<'T & #IParsable<'T>> x : 'T = IParsable.Parse (x, null) | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Uh oh!
There was an error while loading. Please reload this page.