Affects Version/s: 1.7.2, 1.7.10, 1.8.0
Fix Version/s: None
Environment:Win7 64, JDK 1.6.0_17
I have an outer FactoryClass creating instances of an InnerClass:
Now I create an Instance of MyInnerClass and try to access a non-existent property or method on it:
The following error occurs:
When I uncomment the line
it is correctly resolved.
But if I try to add propertyMissing() to my InnerClass:
the same error persists.
I read (here: http://groovy.329449.n5.nabble.com/methodMissing-message-td4288343.html#a4305333) that inner classes will get an automatic propertyMissing() from the compiler, delegating to their outer class. Is this the root of the problem here?
In my Opinion, several things should be changed here:
1) Existing propertyMissing()-implementations should not be disregarded (this is critical to me!)
2) The error message should state correctly that InnerClass does not have the specified property
3) The same goes for methodMissing() (This is going to be critical for me verry soon, too!)
The problem occurs regardless of MyFactory being a stand-alone class or an inner class of the executing code (f.e. test)
I'm not good with jUnit, I hope Spock is fine, too.