Avatar
Avatar
niw
@swift-5.8.1 class Box<T> { private var value: T init(_ value: T) { self.value = value } func mutate(_ mutation: (inout T) -> Void) { mutation(&self.value) } } func f() { let box = Box { } let s = "meow" box.mutate { value in value = { s } } } f()
<stdin>:22:13: warning: expression of type 'String' is unused s ^