Eric Milles created GROOVY-8354:
-----------------------------------

             Summary: Star imports allow partially-qualified typed
                 Key: GROOVY-8354
                 URL: https://issues.apache.org/jira/browse/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|http://docs.groovy-lang.org/latest/html/documentation/#_star_import].
  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.
{code}
import groovy.transform.*

@builder.Builder
class Buildable {
  Number number
  String string
}

​println Buildable.builder().build()
{code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to