Avatar
omochimetaru 3/24/2020 8:57 AM
@swift-main -frontend -typecheck -debug-constraints protocol P {} struct S: P {} struct V { static let value = V() } class Service { func perform() { let s = S() let _: Any = encodeResponse(s) } private func encodeResponse(_ s: S, indent: V = V.value) -> [String: Any] { [:] } private func encodeResponse<T: P>(_ response: T) -> Any { 0 } } let s = Service() s.perform()
8:57 AM
あれ?BOTちゃんが居ない。
8:57 AM
@swiftbot -frontend -typecheck -debug-constraints protocol P {} struct S: P {} struct V { static let value = V() } class Service { func perform() { let s = S() let _: Any = encodeResponse(s) } private func encodeResponse(_ s: S, indent: V = V.value) -> [String: Any] { [:] } private func encodeResponse<T: P>(_ response: T) -> Any { 0 } } let s = Service() s.perform()