grails - Member variable becomes null, spuriously? -


I follow a claim failure which I have tried to sketch down. In short, an initial class member becomes zero When I call the override method.

  Abstract class A & lt; T & gt; {T target def (some) {target aim! = Null / Sanitation check - fails when it is returned below}}} in Class B, A & lt; Some & gt; {Fixed B Macab () {DEF B = NEW B (B) target = new (); B.target! = Null return b)} // package test / test code // DRF b = bmkb () //  

I'm having trouble creating a minimum test case - on compileonline.com (with some in the long run) Runs successfully on our machines with our code

If I re-apply the some method in sub-code B, the problem gets resolved.

Has anyone seen a similar effect? I'm already quite disappointed.

Problems found: A mixer uses the same member name

By taking a step through the medium and carefully checking the local stack variable, we found that is a variable variable target that was receiving the assignment message. Probably, any instance of a mixin with a variable variable sharing a name should be subject to the behavior described above, but we do not know the full set of conditions

The most important time- The timely solution (@ciric with an approval) was to give our variable target another name.

follow-up question

  1. Is this the expected behavior? The best solution in the ocean of bad guys?
  2. Has this behavior changed with a new Groovy compiler or a gravel stack?
  3. What is the minimum test case (still relevant)?

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -