[
https://issues.apache.org/jira/browse/GROOVY-8054?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniil Ovchinnikov updated GROOVY-8054:
---------------------------------------
Affects Version/s: 2.4.8
> Static imports inconsistency with @CompileStatic and use()
> ----------------------------------------------------------
>
> Key: GROOVY-8054
> URL: https://issues.apache.org/jira/browse/GROOVY-8054
> Project: Groovy
> Issue Type: Bug
> Components: Static compilation
> Affects Versions: 2.4.8
> Reporter: Daniil Ovchinnikov
>
> {code}
> package hello
> import groovy.transform.CompileStatic
> import static hello.C.*
> class C {
> static foo(a) { 'imported foo' }
> static bar(a) { 'imported bar' }
> }
> class Main {
> static void main(String[] args) {
> def main = new Main()
> println main.foo1() // imported foo
> println main.bar1() // class bar
> use(Main) {
> println main.bar1() // imported bar
> }
> }
> @CompileStatic
> def foo1() {
> foo '2'
> }
> def bar1() {
> bar '2'
> }
> static foo(String s) { 'class foo' }
> static bar(String s) { 'class bar' }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)