groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Milles (JIRA)" <>
Subject [jira] [Created] (GROOVY-8354) Star imports allow partially-qualified typed
Date Sun, 15 Oct 2017 02:50:00 GMT
Eric Milles created GROOVY-8354:

             Summary: Star imports allow partially-qualified typed
                 Key: GROOVY-8354
             Project: Groovy
          Issue Type: Bug
            Reporter: Eric Milles

Star imports like {{import java.lang.*}} allow partially-qualified references like {{reflect.Field}}
to work.  It appears this only works with explicit star imports in a compilation unit, not
default imports.

Some may call this a feature, but I couldn't find any description of it in the [language documentation|].
 And this bug results in a lot of extra work during type resolution, in addition to the confusion
it causes for Java developers.

I'm expecting an error for this, but it works just fine.
import groovy.transform.*

class Buildable {
  Number number
  String string

​println Buildable.builder().build()

This message was sent by Atlassian JIRA

View raw message