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

STC: no error for incorrect bounds match

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-rc-2
    • Fix Version/s: 3.0.0-rc-3
    • Component/s: None
    • Labels:
      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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: