2022-12-01から1日間の記事一覧

Associated value付きのenumにIdentifiableを準拠させる

開発環境 $ swift --version swift-driver version: 1.62.15 Apple Swift version 5.7.1 (swiftlang-5.7.1.135.3 clang-1400.0.29.51) Target: x86_64-apple-macosx13.0 モチベーション こんなコードを書くとコンパイラに怒られる。 // Type 'CustomColor' d…