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

Improve StringGroovyMethods typing info for better @CompileStatic integration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.6, 2.4.0-beta-3
    • 2.4.0-beta-4
    • None
    • None

    Description

      This code:

      def foo(String a, String b) {}
      
      @groovy.transform.CompileStatic
      def bar() {
        foo("${'foo'}".stripIndent(), 'UTF-8')
      }
      
      bar()
      

      fails with:

      [Static type checking] - Cannot find matching method ConsoleScript30#foo(java.lang.CharSequence, java.lang.String)
      

      Attachments

        Activity

          People

            paulk Paul King
            paulk Paul King
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: