Avatar
なるほどなるほど.
5:09 AM
ありがとうございます🙏
5:12 AM
ちゃんと動いてそうな感じはします🤔 protocol Helloable { static func hello() } struct Something<A, B> {} typealias Something_Int<B> = Something<Int, B> extension Something_Int: Helloable where B == Int { static func hello() { print("hello") } } Something<Int, Int>.hello() // OK Something_Int<Int>.hello() // OK Something_Int<String>.hello() // NG
5:14 AM
でも前にこういう書き方でもっと複雑なことやって Seg Fault 地獄に陥った気もするので,避けといた方がいいのかな🤔 (edited)