File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ language: ja
5151 def toHexString: String = java.lang.Integer.toHexString(self)
5252 }
5353
54- 実行時には、この ` 3.toHexString ` という式は、新しくインスタンス化されるオブジェクトへのメソッド呼び出しではなく、静的なオブジェクトへのメソッド呼び出しと同様のコード (` RichInt$.MODULE$.extension$ toHexString(3) ` ) へと最適化される。
54+ 実行時には、この ` 3.toHexString ` という式は、新しくインスタンス化されるオブジェクトへのメソッド呼び出しではなく、静的なオブジェクトへのメソッド呼び出しと同様のコード (` RichInt$.MODULE$.toHexString$extension (3) ` ) へと最適化される。
5555
5656## 正当性
5757
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ The following fragment of `RichInt` shows how it extends `Int` to allow the expr
5353 }
5454
5555At runtime, this expression ` 3.toHexString ` is optimised to the equivalent of a method call on a static object
56- (` RichInt$.MODULE$.extension$ toHexString(3) ` ), rather than a method call on a newly instantiated object.
56+ (` RichInt$.MODULE$.toHexString$extension (3) ` ), rather than a method call on a newly instantiated object.
5757
5858## Correctness
5959
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ Value class只能继承universal traits,但其自身不能再被继承。所
4343 def toHexString: String = java.lang.Integer.toHexString(self)
4444 }
4545
46- 在运行时,表达式3.toHexString 被优化并等价于静态对象的方法调用 (RichInt$.MODULE$.extension$ toHexString(3)),而不是创建一个新实例对象,再调用其方法。
46+ 在运行时,表达式3.toHexString 被优化并等价于静态对象的方法调用 (RichInt$.MODULE$.toHexString$extension (3)),而不是创建一个新实例对象,再调用其方法。
4747
4848## 正确性
4949
You can’t perform that action at this time.
0 commit comments