Groovy
  1. Groovy
  2. GROOVY-6039

Allow type checking extensions to handle ambiguous references to methods

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: 2.2.0-beta-1
    • Component/s: Static Type Checker
    • Labels:
      None

      Description

      There are cases where the type checker wouldn't be able to determine what method is called based on arguments. There's currently no way to handle that with the standard type checking extension mechanism.

      Suggested DSL code:

      // resolve the ambiguous method by returning the one which has an Integer as parameter
      ambiguousMethods { methods, origin ->
          methods.find { it.parameters.any { it.type == classNodeFor(Integer) } }
      }
      

        Activity

        Cédric Champeau created issue -
        Cédric Champeau made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Paul King made changes -
        Fix Version/s 2.2.0 [ 19073 ]
        Fix Version/s 2.2.0-beta-1 [ 19074 ]
        Paul King made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12734952 ] Default workflow, editable Closed status [ 12746691 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12972462 ] Default workflow, editable Closed status [ 12980313 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        1m 13s 1 Cédric Champeau 05/Mar/13 07:47
        Resolved Resolved Closed Closed
        126d 20h 55m 1 Paul King 10/Jul/13 05:42

          People

          • Assignee:
            Cédric Champeau
            Reporter:
            Cédric Champeau
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development