groovy
  1. groovy
  2. GROOVY-4683 static import collection task
  3. GROOVY-3446

Method call resolves to statically imported method instead of equally named local method

    Details

    • Type: Sub-task Sub-task
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.7-beta-1
    • Fix Version/s: None
    • Component/s: Compiler
    • Labels:
      None
    • Testcase included:
      yes
    • Number of attachments :
      0

      Description

      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"
        }
      }
      

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Peter Niederwieser
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: