[SR-10963] Error message from early return in convenience init could be improved #53351
Labels
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
improvement
Additional Detail from JIRA
md5: dee45a3dee7ad1067a9f513cabcb0d44
Issue Description:
The mistake in the code below is difficult to find with the help of the compiler error:
> ./ConvenienceInit.swift:40:5: error: 'self' used before 'self.init' call or assignment to 'self'
The error points to the end of the convenience init, instead of the early return statement.
My suggestion here is to include the line number of any/the first path which contains an invalid return-statement (since there may well be many - and one of them, at a time, gives something to work with).
The text was updated successfully, but these errors were encountered: