You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2019/02/21 06:19:02 UTC

[jira] [Closed] (GROOVY-3446) Method call resolves to statically imported method instead of equally named local method

     [ https://issues.apache.org/jira/browse/GROOVY-3446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul King closed GROOVY-3446.
-----------------------------

> Method call resolves to statically imported method instead of equally named local method
> ----------------------------------------------------------------------------------------
>
>                 Key: GROOVY-3446
>                 URL: https://issues.apache.org/jira/browse/GROOVY-3446
>             Project: Groovy
>          Issue Type: Sub-task
>          Components: Compiler
>    Affects Versions: 1.7-beta-1
>            Reporter: Peter Niederwieser
>            Assignee: Daniel Sun
>            Priority: Major
>             Fix For: 2.5.6, 3.0.0-alpha-5
>
>
> {code}
> package groovy.bugs
> import static java.lang.System.currentTimeMillis
> class Groovy3446_Bug extends GroovyTestCase {
>   void testLocalMethodFavoredOverStaticallyImportedMethod() {
>     assert currentTimeMillis() == "local method called"
>   }
>   def currentTimeMillis() {
>     "local method called"
>   }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)