Readonly members syntax and symbol API (#32888)
* 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
Showing
想要评论请 注册 或 登录