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

Raw Value of literal String #file breaks enum with String Protocol

    XMLWordPrintable

    Details

      Description

      Bug with #file

      enum Foo: String {

          case bar = #file

      }

       

      This causes an internal error: Segmentation Fault: 11

      Is #file considered a literal String?

      "(5)" is not a literal. But Apple's Swift 5.2 Guide describes #file, #line, #function, #colorLiteral, etc. all as literals.

      ___

      Bug with nil

      enum I:Int?{

         case a = nil

      }

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              suyashsrijan Suyash Srijan
              Reporter:
              0-1 Jonathan Pappas
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: