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

invalid generics symbol arity does not lead to compilation error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.3.0, 2.4.0-beta-3
    • 2.5.0-alpha-1
    • Static Type Checker
    • None

    Description

      class A {}
      @groovy.transform.CompileStatic
      static <C> void foo() {
        new A<C>()
      }

      This code should not compile, since A has no generics parameter, but the "new"-call does use one. Most probably all 2.x versions are affected

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              blackdrag Jochen Theodorou
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: