Description
The following code is throwing a compilation error (the strange code is a DSL):
def FloatComparison() { when: o.PROPerty1 < o.PROPerty2 then: result = true } Missing closing bracket '>' for generics types; solution: Please specify the missing bracket! at line: 5, column: 5
Here are some snippets that don't produce this error:
def FloatComparison() { when: o.pROPerty1 < o.PROPerty2 //the first letter of the first variable is lowercase then: result = true }
def FloatComparison() { when: o.PROPerty1 < o.PROPerty2 //the label is removed and .x is added after result (without .x the exception occurs) result.x = true }
Looking at the samples that work, this whole mess doesn't make any sense. It seems like a minor but very annoying bug in the compiler. We are working on a DSL, so we can't influence the names of the properties or anything significant that would be a proper workaround.
(This is technically not a JUnit test case, but I think it's enough because it can be simply copied into the Groovy console and run)