Xcode: String interpolation / String(describing:) automatic fix broken

Hi! imagine this

guard let foo = bar.baz else {
    print("\(foo.value)")
    return foo.value
}

I get Xcode error String interpolation produces a debug description for an optional value; did you mean to make this explicit? with the fixing option: Use 'String(describing:)' to silence this warning

When I click Fix button I got:

guard let foo = bar.baz else {
    print("\(foString(describing: o.value)"))
    return foo.value
}

The automatic completion is broken. Is it a known bug or there is something wrong with me? ;)

  • Xcode version 15.3 (15E204a)
  • macOS Sonoma 14.4.1 (23E224)
  • Apple M1 Pro

It's not a bug. That's just to warn you that print may show an optional

optional(some value)

But you don't have to care for a print on the console.

Please show complete code.

Xcode: String interpolation / String(describing:) automatic fix broken
 
 
Q