So my understanding was that one of the concerns for this proposal was that it would conflict with Static Blocks. I can see one potential conflict, for instance, the following would be a valid static block:
class C {
static { get; set; }
}
But then adding = at the end would turn it into an auto-accessor:
class C {
static { get; set; } = 123
}
Is this something we can address in the syntax itself? Is this a use case that is meaningful? Users could probably do:
class C {
['static'] { get; set; }
}
If they wanted to define an auto-accessor named static.
So my understanding was that one of the concerns for this proposal was that it would conflict with Static Blocks. I can see one potential conflict, for instance, the following would be a valid static block:
But then adding
=
at the end would turn it into an auto-accessor:Is this something we can address in the syntax itself? Is this a use case that is meaningful? Users could probably do:
If they wanted to define an auto-accessor named
static
.