Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.0-beta-5
-
None
-
None
-
Windows XP
Description
This test program demonstrates the problem:
import java.util.regex.Matcher;
import java.util.regex.Pattern;
// This use of "~" works.
pattern = ~ "
.groovy$";
println "pattern from constant is: " + pattern;
// This use of "~" produces an error.
string = "
.groovy$";
println "string is: " + string;
pattern = ~ string;
The top of the error trace is:
java.lang.VerifyError: (class: foo, method: run signature:
()Ljava/lang/Object Incompatible argument to function