[ 
https://issues.apache.org/jira/browse/GROOVY-8354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16210913#comment-16210913
 ] 

Daniil Ovchinnikov commented on GROOVY-8354:
--------------------------------------------

[~emilles] You are forgetting that a package cannot be referenced as it makes 
little sense contrary to referencing a class.

I got a lot of troubles trying to support this _bug_ in IDEA.

> Star imports allow partially-qualified types
> --------------------------------------------
>
>                 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