Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-5073 GEP 8 - Static Type Checking
  3. GROOVY-3014

add an annotation that forces the compiler to check methods for their existence at compile time

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0-beta-1
    • None
    • None

    Description

      coming from Java it is a bit difficult for some users to find their way into dynamic programming, especially when it comes to method being there or not. therefor I suggested an annotation with source visibility, that can be used by the compiler to check if a method actually exists. This will slow down compilation a bit and may not be supported by IDEs as of yet. Also the check will be a check only, it will not force any kind of method selection at runtime. I suggested to let the compiler throw an error if the annotation forces compiler to check if a method exists, but is unknown, because I am against warnings. the annotation should be used at method or class scope.

      Attachments

        Activity

          People

            melix Cédric Champeau
            blackdrag Jochen Theodorou
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: