Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Not A Bug
-
Affects Version/s: 1.7.1
-
Fix Version/s: None
-
Component/s: syntax
-
Labels:None
-
Environment:Windows Vista
-
Number of attachments :
Description
I am learning MOP in groovy. I am using Groovy 1.7.1.
As per the Programming Groovy book,when we work with nested categories, the inner categories takes precedence over the outer.
But when i try the below code , it is the reverse .is this correct?
groovy> class one {
groovy> def static toString(String self)
groovy> }
groovy> class two {
groovy> def static toSring(String self)
groovy> }
groovy> use(one){use(two) {"hello".toString()}}
one
I have also opened a thread at http://groups.google.co.in/group/groovy-user/browse_thread/thread/da5149edf2ce7c24#
I didn't realize on the mailing list that your typo was present from the first example itself. If in the class "two", I correct the typo and make it toString() from toSring(), it works fine.