groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Sun (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (GROOVY-3446) Method call resolves to statically imported method instead of equally named local method
Date Fri, 25 Jan 2019 17:56:00 GMT

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

Mime
View raw message