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

Cannot use default map constructor with Java classes and type checking

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.1
    • Static Type Checker
    • None

    Description

      Example:

      @GrabResolver('http://repo.grails.org/grails/core')
      @Grab(group='org.grails', module='grails-bootstrap', version='2.0.4')
      import org.codehaus.groovy.grails.resolve.SnapshotAwareM2Resolver
      
      @groovy.transform.CompileStatic
      def foo() {
       def url = "blah"
       def resolver = new SnapshotAwareM2Resolver(name: url, root: url, m2compatible: true, changingPattern: ".*SNAPSHOT")
      }
      

      Results in:

      [Static type checking] - Cannot find matching method org.codehaus.groovy.grails.resolve.SnapshotAwareM2Resolver#<init>(java.util.Map <java.lang.String, java.io.Serializable>)
       at line: 8, column: 17
      

      Attachments

        Activity

          People

            melix Cédric Champeau
            graemerocher Graeme Rocher
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: