Uploaded image for project: 'Swift'
  1. Swift
  2. SR-13892

Improve diagnostics involving "covariant 'Self'"

    XMLWordPrintable

    Details

      Description

      Confusion in forum post: https://forums.swift.org/t/why-error-covariant-self-type-cannot-be-referenced-from-a-stored-property-initializer/42235 involving the diagnostic

      "covariant 'Self' type cannot be referenced from a stored property initializer"

      It is not necessarily obvious to a developer what this means. We should do some combination of rewording the diagnostic, add an extra note explaining the issue, and maybe add a fix-it replacing 'Self' with the name of the class.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            theindigamer Varun Gandhi
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: