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

Compiler does not warn on duplicate keys for dictionary literals

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Compiler, Standard Library
    • Labels:
      None
    • Environment:

      Version 9.2 (9C40b)

      Description

      let insets: UIEdgeInsets = [\.left: 4, \.right: 4, \.left: 8]

      The compiler accepts this without warning. I think it probably should warn/error if the literal can be checked at compile time.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              erica erica sadun
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: