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

STC: no error for incorrect bounds match

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0-rc-2
    • 3.0.0-rc-3, 2.5.16
    • None
    • None

    Description

      Consider the following:

      @groovy.transform.CompileStatic
      class C {
        void x(Class<? extends CharSequence> c) {
        }
        void y() {
          def t = (Class<?>) String.class
          x(t) // should be error for <?> not satisfying <? extends CharSequence>
        }
      }
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: