エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
Should implicit classes always extend AnyVal?
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
Should implicit classes always extend AnyVal?
Let's look at the limitations listed for value classes and think when they may not be suitable fo... Let's look at the limitations listed for value classes and think when they may not be suitable for implicit classes: "must have only a primary constructor with exactly one public, val parameter whose type is not a value class." So if the class you are wrapping is itself a value class, you can't use an implicit class as a wrapper, but you can do this: // wrapped class class Meters(val value: Int) e

