version 3.2.1リリース
同一クラスのメソッドのself省略
> vim InternalMethodTest.clcl
class InternalMethodTest {
def initialize() {}
def method():int {
return method2();
# return self.method2()と書いても良い
}
def method2():int {
return 123
}
}
> vim a.cl
a := new InternalMethod();
Clover.test("internal method test", a.method() == 123);
> clover2 a.cl
internal method test...OK
上記のような感じです。フィールドの方はselfは省略できません。エディッタでのフィールド名の置き換えで便利なので。あとはローカル変数とフィールド名がバッティングするのは良くないと思うためです。