Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.5.4
-
Fix Version/s: 1.6-rc-1, 1.5.8, 1.7-beta-1
-
Component/s: ast builder
-
Labels:None
-
Environment:Windows 2000, JDK 1.6, Groovy 1.5.4
-
Number of attachments :
Description
Running this in groovyconsole
public class Configuration extends java.util.Properties { } 1
yields the following error:
Exception thrown: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, Script9: -1: the return type is incompatible with java.lang.String getProperty(java.lang.String) in java.util.Properties. Node: org.codehaus.groovy.ast.MethodNode. At [-1:-1] @ line -1, column -1.
But when the getProperty() method is overridden the code runs fine:
public class Configuration extends java.util.Properties { String getProperty(String s) { } } 1