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

Method call with type args loses information within trait

    XMLWordPrintableJSON

Details

    Description

      Consider the following:

      trait T {
          def <X> X m(x) {x}
          @TypeChecked
          def test() {
              Number n = 1
              n = this.<Object>m(n) // should fail STC
          }
      }
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: