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

list literal constructor misses direct constructor call

    XMLWordPrintableJSON

Details

    Description

      In this example

      class F {
          F(int i){}
      }
      
      def foo() {
        F f = [1]
      }
      

      The static compiler produces a call to castToType to let the runtime transform [1] into F. Because of performance this should not be done.

      Attachments

        Activity

          People

            melix C├ędric Champeau
            blackdrag Jochen Theodorou
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: