You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Daniel Sun (JIRA)" <ji...@apache.org> on 2019/01/25 17:56:00 UTC

[jira] [Resolved] (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 ]

Daniel Sun resolved GROOVY-3446.
--------------------------------
       Resolution: Fixed
         Assignee: Daniel Sun
    Fix Version/s: 3.0.0-alpha-5
                   2.5.6

The issue has been fixed already:
https://github.com/apache/groovy/commit/9b2386a2278c288ca911dfb22f2a0d1015ccd565

> 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)