You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An object initializer consists of a sequence of member initializers, enclosed by { and } tokens and separated by commas. Each member_initializer designates a target for the initialization. An identifier must name an accessible field or property of the object being initialized
As you can see, fieldlike events are not supported by the language spec.
If you are still interested in this issue (I note that there have been zero comments since its initial posting), please open an issue on the appropriate repo.
See also #18002 for a general discussion of closing and/or moving language issues out of this repo.
Reproduce using the following test (already in Roslyn, but Skipped)
EXPECTED: test passes
ACTUAL:
error CS1913: Member 'z' cannot be initialized. It is not a field or property.
Migrated from TFS/DevDiv 529272
The text was updated successfully, but these errors were encountered: