[ https://issues.apache.org/jira/browse/GROOVY-3549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King updated GROOVY-3549: ------------------------------ Fix Version/s: (was: 3.x) > Usage of ".class" to disambiguate between methods > ------------------------------------------------- > > Key: GROOVY-3549 > URL: https://issues.apache.org/jira/browse/GROOVY-3549 > Project: Groovy > Issue Type: Improvement > Affects Versions: 1.6.3 > Reporter: Peter Niederwieser > Priority: Major > > From a programmer's perspective, it's clear that in the second example, > Class.getName() should be called. Can we support this in 2.0? > {code} > class JavaLangClassUsageTest extends GroovyTestCase { > void testCallFooGetNameMethod() { > assert Foo.getName() == "Foo.getName" // passes > } > void testCallJavaLangClassGetNameMethod() { > assert Foo.class.getName() == "Foo" // fails, actual: Foo.getName > } > } > class Foo { > static getName() { "Foo.getName" } > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)