-
Notifications
You must be signed in to change notification settings - Fork 4.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
Features/readonly members #34712
Merged
Merged
Features/readonly members #34712
Conversation
This file contains 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
Merge master into features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
* Add syntax tests for readonly members * Add simple test for readonly struct method * Allow readonly modifier on methods in structs * Add simple readonly class method test * Add SourceMemberMethodSymbol.IsReadOnly * Test readonly static method * Disallow readonly accessors on static properties * Check usages of readonly keyword in property (not accessor) declarations * Add ref-returning readonly method test * Add readonly ref readonly parsing test * Allow readonly modifier on property decls in general. Add more tests. * Add indexer tests * Readonly events on structs * Remove comment * Disallow readonly on events with associated fields * Test static readonly auto properties and destructors * Disallow redundant readonly on accessor. Simplify diagnostics for static readonly property. * Add tests based on feedback * Note that feature checks and corresponding tests are needed
* Add ITypeSymbol.IsReadOnly public API * Fix build failures in Roslyn.sln * Update doc comment
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
* Add new readonly members error codes * Use new diagnostics and update tests * Improve ValueChecks error messages * Remove unused error messages * Fixes from feedback * Allow 'readonly' on getter-only auto props and get accessors * Update spec. Improve error messages.
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
* Add IDS_FeatureReadOnlyMembers * Add CheckFeatureAvailability checks for readonly members * Remove prototype comment * Ensure LangVersion test is valid with default language version * Fix DeclarationParsingTests * Remove unnecessary comment
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
…merges/master-to-features/readonly-members
…nly-members Merge master to features/readonly-members
* Use RefKind.In for the ThisParameter of a readonly method * Remove prototype comments * Add readonly lambda test * Fix formatting * Update compiler test plan * Tweak wording * Move OverrideBaseMethod test to CodeGen tests file. Add 'fixed' test. * Test readonly partial methods * Add readonly explicit interface implementation test * Expand on ReadOnlyMembers_BaseMethod code gen tests * Check symbol APIs for mismatched readonly partial method * Update speclet * Respond to feedback * Refactor metadata round trip test
…features/readonly-members
* Check parser behavior for bad expression property declaration * Make readonly modifiers more strict on accessors to match accessibility behavior * Fix tests * Improve implicit copy warning message. Add compound property assignment test. * Test ErrorCode.ERR_ReadOnlyModMissingAccessor with an indexer * Simplify error message for 'static readonly' members
…es/readonly-members
…nly-members Merge master to features/readonly-members
…features/readonly-members
…nly-members Merge master to features/readonly-members
…nly-members Merge master to features/readonly-members
* Add IsDeclaredReadOnly and IsEffectivelyReadOnly to public API * Fix build. Add simple SemanticModel test. * Fix Roslyn users of IMethodSymbol. Expand semantic model test. * Fix visibility of MethodSymbol.vb members * Implement ReadOnly method API in CodeGenerationConstructedMethodSymbol * Cleanup usings and change NotImplementedException to ExceptionUtilities.Unreachable * Simplify down to IMethodSymbol.IsReadOnly * Fix IsReadOnly API for reduced extension methods. Test ref readonly ref properties. * Ensure that non-reduced extension methods are never 'readonly' * Update doc * Reduced extension methods are not declared readonly, they're effectively readonly. * Remove unused copy of extension methods test source
jcouv
approved these changes
Apr 3, 2019
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.
Since this is just a merge commit, I only did a cursory examination (quick scan, checking that no unintended files were changed). LGTM
jaredpar
approved these changes
Apr 3, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Related to #32911 and dotnet/csharplang#1710
All commits have been previously reviewed.
cc @jaredpar