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

Type Int1 does not conform to protocol BooleanType

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Done
    • Component/s: Compiler
    • Environment:

      Xcode Version 7.3 beta (7D162j) - default toolchain

      Description

      [NOTE - See comment below. The .whiteColor and .blackColor methods were not actually being called as they should have been. The error message is still very bad though so I'm not resolving the issue.]

      Compile error "Type 'Int1' does not conform to protocol 'BooleanType'" is occurring when I don't think it should. First encountered in application code but the below example has the same error in the Playground.

      This isn't quite the minimal sample where this is happening but it is getting close. The error does disappear at some point in simplification even when I don't think that the types should fundamentally change.

      class PLStandardTableViewCell {
          var title: UILabel? = nil
          
          func setSelected(selected: Bool) {
              title?.textColor = selected ? .whiteColor : .blackColor
          }
      }
      

        Attachments

          Activity

            People

            • Assignee:
              mkchoi212 Mike Choi
              Reporter:
              josephlord Joseph Lord
            • Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: