-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Edit pass for C# 8 speclets #9042
Conversation
Closes dotnet#8098 Notes on this PR for reviewers: 1. I only edited the speclets that haven't been incorporated into the current draft V8 specification. (Thankfully, that means I didn't edit the NRT spec in this folder). 1. I did try to mark areas in the default interface members specification that weren't implemented in C# 8. I intended to mark all those as "not implemented in **C# 8**" because some involved early questions on static virtual (or abstract) methods or operators. I think it got most of these correct. However, that's the one area that could use the most careful review. In particular, none of the examples that specify *which* base interface method to invoke from an override compiled. I believe that wasn't implemented, even though it was specified with decisions to implement a given syntax.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlekseyTs would you be able to give the edits here a review?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally LGTM, but I'd like someone with better understanding of DIM to look at that one.
@@ -211,10 +207,14 @@ Because interfaces may now contain executable code, it is useful to abstract com | |||
|
|||
> ***Open issue***: should we permit interface methods to be `protected` or `internal` or other access? If so, what are the semantics? Are they `virtual` by default? If so, is there a way to make them non-virtual? | |||
|
|||
> ***Open issue***: If we support static methods, should we support (static) operators? | |||
> ***Open issue***: If we support static methods, should we support (static) operators? **Decision: NO** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels inaccurate. I think we supported operators too. #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made the same mistake here, by not implementing the operator. So, the compiler interpreted it as a bad declaration for a static virtual member, which isn't supported in C# 8.
@@ -741,12 +748,18 @@ but `C` is not recompiled. What happens when the program is run? An invocation o | |||
|
|||
### Permit `partial` in interface? (closed) | |||
|
|||
This was not implemented in C# 8. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure about this. I see a lot of DIM tests using partial interfaces. If partial interfaces were not supported prior to DIM support, it looks like they become available at the same time. #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @AlekseyTs
I see what I had done wrong: I created an interface that declared partial methods with arguments and different return types. Those weren't supported in C# 8.
Fixed.
Done with review of default-interface-methods.md (commit 1) |
Co-authored-by: Fred Silberberg <[email protected]>
Respond to @AlekseyTs 's comments.
…r/csharplang into csharp8-speclet-review
Thanks @AlekseyTs Updates from today address all your comments. |
Changes in default-interface-methods.md LGTM (commit 4) |
Closes #8098
Notes on this PR for reviewers:
In particular, none of the examples that specify which base interface method to invoke from an override compiled. I believe that wasn't implemented, even though it was specified with decisions to implement a given syntax.