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

Ambiguous method call is not detected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1-beta-3
    • 1.5
    • None
    • None

    Description

      The following code should either trigger a compilation error of "repetitive method definition", or produce exception at runtime:

      <code>
      void foo(String one, String two = "two") {
      println "$one $two"
      }

      void foo(String one, String two = "two", String three = "three") {
      println "$one $two $three"
      }

      foo ("bar")
      </code>

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            ven Eugene Vigdorchik
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: