こんな事をgo1.19でやりたかった。
type A interface{} type Hoge interface { A | comparable }
でも書いてみるとgoplsにcannot use comparable in union
と怒られてしまう。
調べてみると次のIssueがヒットした。
https://github.com/golang/go/issues/49602
どうもgo1.18ではできないということしか書いていない。
解決方法を思いついたら追記します。
こんな事をgo1.19でやりたかった。
type A interface{} type Hoge interface { A | comparable }
でも書いてみるとgoplsにcannot use comparable in union
と怒られてしまう。
調べてみると次のIssueがヒットした。
https://github.com/golang/go/issues/49602
どうもgo1.18ではできないということしか書いていない。
解決方法を思いついたら追記します。