Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.0-beta-6
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
value = "test"
pattern = ~value
causes:
Exception in thread "main" java.lang.VerifyError: (class: test10, method: run signature: ()Ljava/lang/Object
Incompatible argument to function
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
at java.lang.Class.getDeclaredConstructors(Class.java:1169)
at groovy.lang.MetaClass.<init>(MetaClass.java:137)
at groovy.lang.MetaClassRegistry.getMetaClass(MetaClassRegistry.java:100)
at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:123)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:106)
The regex pattern operator would only take String arguments before. It will now accept any argument at all and will toString() the object in order to ensure it can be compiled.