Avatar
Avatar
Iceman
@swift-main let foo: (String) -> some CustomStringConvertible = { s in struct Foo: CustomStringConvertible { var description: String } return Foo(description: s) }
swiftNightly BOT 6/12/2024 2:35 PM
exit status: 1 with <stdin>:5:12: error: cannot convert value of type 'Foo' to closure result type 'some CustomStringConvertible' 3 | var description: String 4 | } 5 | return Foo(description: s) | `- error: cannot convert value of type 'Foo' to closure result type 'some CustomStringConvertible' 6 | } 7 |