Init accessors affect initialization of Optionals #73922
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
triage needed
This issue needs more specific labels
Description
This code compiles fine:
But when using an init accessor to wrap the original property, the compiler will emit an error:
Note that neither
self.a = 10
norself.aa = 10
is permitted by the compiler.The above behaviors are inconsistent.
Reproduction
The latter code snippet in "Description".
Expected behavior
No compiler errors.
Environment
Additional information
No response
The text was updated successfully, but these errors were encountered: