[jira] [Updated] (GROOVY-8054) Static imports inconsistency with @CompileStatic and use()

2017-01-16 Thread Daniil Ovchinnikov (JIRA)

 [ 
https://issues.apache.org/jira/browse/GROOVY-8054?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniil Ovchinnikov updated GROOVY-8054:
---
Component/s: Compiler

> 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: Compiler, 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)


[jira] [Updated] (GROOVY-8054) Static imports inconsistency with @CompileStatic and use()

2017-01-16 Thread Daniil Ovchinnikov (JIRA)

 [ 
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)