I have Eclipse Luna (Service Release 1a (4.4.1)) with following plugins installed:
Groovy-Eclipse Feature
Groovy Compiler 2.0 Feature 2.9.1.xx-201412191752-e44
Grails IDE 3.6.3.201411271013-RELEASE
I have a simple class:
class Utilities
{
public static boolean hasValue(List list){
return !(list == null || list.isEmpty());
}
}
Another simple class:
class Test2 {
static main(def args)
{
def var1 = [2]
if(Utilities.hasValue((List)var1) //here one bracket is less but still compiler does not give any error
{
println "hello"
}
}
}
It is only when I run Test2, it gives me following exception:
No signature of method: static Utilities.hasValue() is applicable for argument types: (java.util.ArrayList, Test2$_main_closure1)
Also when I add another if() to Test2, then it gives not much sensing error description:
class Test2 {
static main(def args)
{
def var1 = [2]
if(Utilities.hasValue((List)var1)
{
println "hello"
}
if(true) { } //Groovy:Expecting '}', found 'if'
}
}
I tried same in Groovy/Grails Tool Suite (which is also eclipse based) by GoPivotal v 3.3.0.RELEASE. It also gives same error.
I have Eclipse Luna (Service Release 1a (4.4.1)) with following plugins installed:
Groovy-Eclipse Feature
Groovy Compiler 2.0 Feature 2.9.1.xx-201412191752-e44
Grails IDE 3.6.3.201411271013-RELEASE
I have a simple class:
Another simple class:
It is only when I run Test2, it gives me following exception:
Also when I add another
if()toTest2, then it gives not much sensing error description:I tried same in Groovy/Grails Tool Suite (which is also eclipse based) by GoPivotal v 3.3.0.RELEASE. It also gives same error.