6

Xcode 14, in a playground (with import UIKit):

let uuid = UUID().uuidString
let boundary = "Boundary-\(uuid)"

Fine. But uuid isn't really needed, so let's collapse that into a single line:

let boundary = "Boundary-\(UUID().uuidString)"

That elicits a compile error:

error: 'UUID' is only available in iOS 6.0 or newer; clients of '__lldb_expr_9' may have a lower deployment target

I seem to have riled up the compiler into some weird edge case about how string interpolation works in a playground. What might be going on here?

matt
  • 515,959
  • 87
  • 875
  • 1,141

0 Answers0