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

No parse error for interface method with default value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • parser-antlr4
    • None

    Description

      I noticed this syntax mentioned here: https://groovy.apache.org/wiki/GEP-12.html

      Is this supposed to be valid for some case or is it defunct?

      interface I {
        def m() default { 1 }
      }
      

      It does not produce any parser or compiler errors. But I don't think the default value saved in MethodNode is used for anything.

      Attachments

        Activity

          People

            Unassigned Unassigned
            emilles Eric Milles
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: