New issue 405 by mendapar...@gmail.com: NoSuchMethodError for type bound
generic method
http://code.google.com/p/groovypptest/issues/detail?id=405
If had a type bound generic method defined in pure Java class then @Typed
groovy fails at runtime with NoSuchMethodError.
Here is an example:
---------------------------
public class Hello {
...
}
---------------------------
public class HelloTools {
public static <T extends Hello> T say(T hello) {
...
}
}
---------------------------
Then following groovy code fails at runtime:
---------------------------
class HelloTest {
@Test
void test1() {
def hello = new Hello()
HelloTools.say(hell)
}
@Typed
@Test
void test2() {
def hello = new Hello()
HelloTools.say(hell)
}
}
---------------------------
The second test will fail with the NoSuchMethodError
I am using the latest release of Groovy++ with Groovy 1.8.2
Here I am attaching a test project.
Attachments:
hello-groovy.tar.gz 1.4 KB
You can also test with getAnnotation method defined in Class. The signature
of this method is:
public <A extends Annotation> A getAnnotation(Class<A> annotationClass)
Look at the project activity @mendapar
After Groovy/Spring announced they are working on their own static Groovy
(completely undermining g++ in the process), g++ activity stopped.
Really unfortunate, g++ had nice momentum and provided strong typing +
speed with Groovy concision. Oh well, big companies tend to ruin the open
source party.
I believe g++ project lead is working on JetBrains' Kotlin project.
Anyway, would be nice if there were some confirmation as to what is going
on (or not) with g++ project.