8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e0ced78 + 9e0afdb commit 3cf86fcCopy full SHA for 3cf86fc
ja/overviews/core/value-classes.md
@@ -47,7 +47,7 @@ title: 値クラスと汎用トレイト
47
48
`RichInt` から抜粋した以下のコードは、それが `Int` を拡張して `3.toHexString` という式が書けるようにしていることを示す:
49
50
- class RichInt(val self: Int) extends AnyVal {
+ implicit class RichInt(val self: Int) extends AnyVal {
51
def toHexString: String = java.lang.Integer.toHexString(self)
52
}
53
zh-cn/overviews/core/value-classes.md
@@ -40,7 +40,7 @@ Value class只能继承universal traits,但其自身不能再被继承。所
40
41
下面有关RichInt的代码片段示范了RichInt是如何继承Int来允许3.toHexString的表达式:
42
43
44
45
46
0 commit comments