我试图了解当我收到诸如“groovy.lang.MissingMethodException: No signature of method: Three.method() is applicable for argument types:”之类的错误时发生了什么
b = "Tea"
class Three
{
String myVar1, myVar2, myVar3, myVar4, myVar5, myVar6
def method(myVar1,myVar2,myVar3,myVar4,myVar5,myVar6)
{
try {
println myVar1, myVar2, myVar3, myVar4, myVar5, myVar6
} catch (groovy.lang.MissingPropertyException e) {
println "error caught"
}
}
}
try {
new Three().method(myVar1:b);
} catch (groovy.lang.MissingPropertyException e) {
println "error caught"
}
try {
new Three().method(myVar1=b);
} catch (groovy.lang.MissingPropertyException e) {
println "error caught"
}
try {
new Three().method(b);
} catch (groovy.lang.MissingPropertyException e) {
println "error caught"
}