[SR-15669] Diagnostics for reinitialization of ‘let’ property due to initilizer delegation is misleading #57948
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
Environment
macOS 12.2 Beta (21D5025f)
2021-12-23 trunk snapshot
Additional Detail from JIRA
md5: cb0ffaf2974505a5d24b0f2262b94fe7
relates to:
Issue Description:
This is the current behaviour:
This error message does not provide context, and misleads people to think that
let
properties may not be initialized directly with or without delegation.I think the error message should be something like “immutable value 'self.x' may only be initialized once”, similar to the message given to direct reinitialization of
let
properties:Or, even better if it marks where the property was/will be initialized via delegation:
The text was updated successfully, but these errors were encountered: