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

static type checker fails to check constructor arguments

    XMLWordPrintableJSON

Details

    Description

      class Foo<T>{  Foo(T a, T b){} }
      @groovy.transform.TypeChecked
      def bar() {
          Foo<Map> f = new Foo<Map>("a",1)
      }
      bar()
      

      The code passes, even though "a" and 1 are surely no maps.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: