[SR-430] Poor diagnostic when using delegating initializers without self #43047
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
Additional Detail from JIRA
md5: 8f428ac4858738ea9e18f96933959219
duplicates:
Issue Description:
The compiler gives a confusing diagnostic when implementing a delegating initializer and calling
init
instead ofself.init
. For example:This gives the error: "initializers may only be declared within a type".
In this case, I think the error should be something like "delegating initializers must use self.init to call other initializers" with a fix-it to add the "self." prefix.
The text was updated successfully, but these errors were encountered: