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

STC NPE using DGM collect on Iterator

    XMLWordPrintableJSON

Details

    Description

      @groovy.transform.TypeChecked
      def m() {
          List<String> list = ['foo', 'bar', 'baz']
          list.iterator().collect { it.startsWith('ba') } == [false, true, true]
      }
      
      m()
      

      Results in: 

      BUG! exception in phase 'instruction selection' in source unit 'TestScript.groovy' unexpected NullpointerException
      

      Attachments

        Issue Links

          Activity

            People

              jwagenleitner John Wagenleitner
              jwagenleitner John Wagenleitner
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: