Consider the following:
trait Filtering {
StringBuilder append(String str) {
def subst = str.replace('o', '')
super.append(subst)
}
String toString() {
super.toString()
}
}
def sb = new StringBuilder().withTraits(Filtering)
sb.append('Groovy')
println sb.toString()
(source http://docs.groovy-lang.org/latest/html/documentation/#_semantics_of_super_inside_a_trait)
"super.append" and "super.toString" have their method names highlighted as "default" instead of "unkonwn" (underlined). Since the type of "super" cannot be determined from the trait, it should be treated as dynamic.
Also, "super" should not be hoverable/selectable in these expressions.
