|
Groovy example source code file (ClassInNamedParamsBug.groovy)
The Groovy ClassInNamedParamsBug.groovy source code
package groovy.bugs
class ClassInNamedParamsBug extends GroovyTestCase {
void testBug() {
def foo = method(class:'cheese', name:'cheddar')
assert foo.name == "cheddar"
assert foo.class == "cheese"
foo = method(name:'cheddar', class:'cheese')
assert foo.name == "cheddar"
assert foo.class == "cheese"
}
def method(Map data) {
data
}
}
Other Groovy examples (source code examples)Here is a short list of links related to this Groovy ClassInNamedParamsBug.groovy source code file: |
Other websites by Alvin Alexander:
Life/living in Alaska (OneMansAlaska.com)
How I Sold My Business (HowISoldMyBusiness.com)
Copyright 1998-2011 Alvin Alexander, devdaily.com
All Rights Reserved.