Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
groovy $ cat Demo.groovy @groovy.transform.CompileStatic class Demo { def someMethod() { String.doSomething() } } groovy $ groovy $ groovyc Demo.groovy org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Demo.groovy: 4: [Static type checking] - Cannot find matching method java.lang.Class#doSomething(). Please check if the declared type is right and if the method exists. @ line 4, column 3. String.doSomething() ^ 1 error
I think it would make more sense to refer to java.lang.String#doSomething() rather than java.lang.Class#doSomething(). I understand that there may be complications related to the type checker making a distinction between String.doSomething() and Class<String>.doSomething() but I am filing this here to prompt a look at the issue to see if the situation can be improved.