Avatar
Avatar
Iceman
@swift-5.5.3 @resultBuilder enum MyBuilder { static func buildBlock<C>(_ c: C) -> C { c } @_disfavoredOverload static func buildBlock<C>(_ c: C) -> Int { 1 } } func f(@MyBuilder content: () -> Int) { print(content()) } f { "" }
exit status: 1 with stderr:<stdin>:17:5: error: cannot convert value of type 'String' to closure result type 'Int' "" ^~