Skip to content
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 80 commits into from
Apr 3, 2019
Merged

Features/readonly members #34712

merged 80 commits into from
Apr 3, 2019

Conversation

RikkiGibson
Copy link
Contributor

@RikkiGibson RikkiGibson commented Apr 3, 2019

Related to #32911 and dotnet/csharplang#1710

All commits have been previously reviewed.

cc @jaredpar

RikkiGibson and others added 30 commits February 13, 2019 11:28
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
…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
dotnet-automerge-bot and others added 22 commits March 22, 2019 18:30
…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
…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
* 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
…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 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
@RikkiGibson RikkiGibson requested review from a team as code owners April 3, 2019 02:06
@jcouv jcouv added this to the 16.1.P2 milestone Apr 3, 2019
Copy link
Member

@jcouv jcouv left a 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

@RikkiGibson RikkiGibson merged commit 2013069 into master Apr 3, 2019
@JoeRobich JoeRobich deleted the features/readonly-members branch April 3, 2019 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants