Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-1706

groovyConsole resolves static methods incorrectly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0
    • 1.5
    • None
    • None

    Description

      class A {
         static void dangerous() { println "I'm an A" }
      }
      class B extends A  {
         static void dangerous() { println "I'm a B" }
      }
      A object1 = new A()
      object1.dangerous()  // outputs "I'm an A"
      B object2 = new B()
      object2.dangerous()  // outputs "I'm an A" OOOPS
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            marc@anyware.co.uk Marc Palmer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: