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
51
51
def toHexString: String = java.lang.Integer.toHexString(self)
52
52
}
53
53
54
- 実行時には、この ` 3.toHexString ` という式は、新しくインスタンス化されるオブジェクトへのメソッド呼び出しではなく、静的なオブジェクトへのメソッド呼び出しと同様のコード (` RichInt$.MODULE$.extension$ toHexString(3) ` ) へと最適化される。
54
+ 実行時には、この ` 3.toHexString ` という式は、新しくインスタンス化されるオブジェクトへのメソッド呼び出しではなく、静的なオブジェクトへのメソッド呼び出しと同様のコード (` RichInt$.MODULE$.toHexString$extension (3) ` ) へと最適化される。
55
55
56
56
## 正当性
57
57
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
53
53
}
54
54
55
55
At 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.
57
57
58
58
## Correctness
59
59
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ Value class只能继承universal traits,但其自身不能再被继承。所
43
43
def toHexString: String = java.lang.Integer.toHexString(self)
44
44
}
45
45
46
- 在运行时,表达式3.toHexString 被优化并等价于静态对象的方法调用 (RichInt$.MODULE$.extension$ toHexString(3)),而不是创建一个新实例对象,再调用其方法。
46
+ 在运行时,表达式3.toHexString 被优化并等价于静态对象的方法调用 (RichInt$.MODULE$.toHexString$extension (3)),而不是创建一个新实例对象,再调用其方法。
47
47
48
48
## 正确性
49
49
You can’t perform that action at this time.
0 commit comments