[jira] [Commented] (GROOVY-5471) Add "indy" option to Groovy Console

2017-01-03 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on GROOVY-5471:


GitHub user jwagenleitner opened a pull request:

https://github.com/apache/groovy/pull/475

GROOVY-5471: Add "indy" option to Groovy Console (and AstBrowser)



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jwagenleitner/groovy groovy5471

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/groovy/pull/475.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #475


commit 8a8fd94a09491f24c692df5aa132de9c34bed70d
Author: John Wagenleitner 
Date:   2017-01-03T06:42:21Z

GROOVY-5471: Add "indy" option to Groovy Console (and AstBrowser)




> Add "indy" option to Groovy Console
> ---
>
> Key: GROOVY-5471
> URL: https://issues.apache.org/jira/browse/GROOVY-5471
> Project: Groovy
>  Issue Type: Bug
>  Components: Groovy Console
>Affects Versions: 2.0-beta-3
>Reporter: Cédric Champeau
>
> If "invokedynamic" support is available, the groovy console should show an 
> option allowing the scripts written in the console to be compiled with indy 
> support too.
> Otherwise, the user might think that because he's using a "indy" jar, the 
> Groovy Console will compile scripts with indy activated, but in reality, only 
> core groovy classes will use indy.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[GitHub] groovy pull request #475: GROOVY-5471: Add "indy" option to Groovy Console (...

2017-01-03 Thread jwagenleitner
GitHub user jwagenleitner opened a pull request:

https://github.com/apache/groovy/pull/475

GROOVY-5471: Add "indy" option to Groovy Console (and AstBrowser)



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/jwagenleitner/groovy groovy5471

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/groovy/pull/475.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #475


commit 8a8fd94a09491f24c692df5aa132de9c34bed70d
Author: John Wagenleitner 
Date:   2017-01-03T06:42:21Z

GROOVY-5471: Add "indy" option to Groovy Console (and AstBrowser)




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Resolved] (GROOVY-8032) nested classes on interfaces are not static

2017-01-03 Thread Christopher Smith (JIRA)

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

Christopher Smith resolved GROOVY-8032.
---
Resolution: Duplicate

> nested classes on interfaces are not static
> ---
>
> Key: GROOVY-8032
> URL: https://issues.apache.org/jira/browse/GROOVY-8032
> Project: Groovy
>  Issue Type: Bug
>  Components: class generator
>Affects Versions: 2.4.7
>Reporter: Christopher Smith
>Priority: Minor
>
> According to the JLS, "A member type declaration in an interface is 
> implicitly {{static}} and {{public}}", and there does not seem to be any 
> reason for Groovy to support non-static nested classes on interfaces. 
> However, classes not explicitly marked {{static}} do not have the static flag 
> set. This appears to be a simple bug in the class generator, as the generated 
> constructor does not attempt to store an outer reference or otherwise behave 
> as an inner class. It does, however, break reflective code (Jackson) that 
> gets very confused when looking for an eligible constructor.
> {code}
> interface Example {
>   class Response {
> int code
>   }
> }
> {code}
> Expected result: {{Example$Response}} has the static modifier flag set.
> Actual result: It does not.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (GROOVY-8032) nested classes on interfaces are not static

2017-01-03 Thread Christopher Smith (JIRA)

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

Christopher Smith commented on GROOVY-8032:
---

Looks like I was using an older micro of the compiler even though the 
dependency itself was 2.4.7. Looks like a dupe. Heck of a time searching for 
it, though! ;-)

> nested classes on interfaces are not static
> ---
>
> Key: GROOVY-8032
> URL: https://issues.apache.org/jira/browse/GROOVY-8032
> Project: Groovy
>  Issue Type: Bug
>  Components: class generator
>Affects Versions: 2.4.7
>Reporter: Christopher Smith
>Priority: Minor
>
> According to the JLS, "A member type declaration in an interface is 
> implicitly {{static}} and {{public}}", and there does not seem to be any 
> reason for Groovy to support non-static nested classes on interfaces. 
> However, classes not explicitly marked {{static}} do not have the static flag 
> set. This appears to be a simple bug in the class generator, as the generated 
> constructor does not attempt to store an outer reference or otherwise behave 
> as an inner class. It does, however, break reflective code (Jackson) that 
> gets very confused when looking for an eligible constructor.
> {code}
> interface Example {
>   class Response {
> int code
>   }
> }
> {code}
> Expected result: {{Example$Response}} has the static modifier flag set.
> Actual result: It does not.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (GROOVY-8033) STC: spread property references fails in static method

2017-01-03 Thread Shil Sinha (JIRA)

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

Shil Sinha commented on GROOVY-8033:


This seems to occur in all cases when the inferred type of the collection 
variable is not derived from List (e.g. Set, Queue, etc.)

> STC: spread property references fails in static method
> --
>
> Key: GROOVY-8033
> URL: https://issues.apache.org/jira/browse/GROOVY-8033
> Project: Groovy
>  Issue Type: Bug
>  Components: Static Type Checker
>Affects Versions: 2.4.7
>Reporter: Eric Milles
>
> I managed to boil this down to static method versus non-static method.  When 
> I use the spread operator in a Set to access a property (backed by getter), I 
> am getting a type checking error.  If I remove the TypeChecked, all is well.  
> If I remove static from the method, all is well.
> {code}
> @groovy.transform.TypeChecked
> class Foo {
>   static def meth() {
> Set defs = []
> defs*.additionalBeanInfo
>   }
> }
> {code}
> Error during compile (or in the IDE):
> Foo.groovy: 11: [Static type checking] - No such property: additionalBeanInfo 
> for class: java.util.Set 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (GROOVY-8033) STC: spread property references fails in static method

2017-01-03 Thread Eric Milles (JIRA)

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

Eric Milles updated GROOVY-8033:

Description: 
I managed to boil this down to static method versus non-static method.  When I 
use the spread operator in a Set to access a property (backed by getter), I am 
getting a type checking error.  If I remove the TypeChecked, all is well.  If I 
remove static from the method, all is well.

{code}
@groovy.transform.TypeChecked
class Foo {
  static def meth() {
Set defs = []
defs*.additionalBeanInfo
  }
}
{code}

Error during compile (or in the IDE):
Foo.groovy: 11: [Static type checking] - No such property: additionalBeanInfo 
for class: java.util.Set 

  was:
I managed to boil this down to static method versus non-static method.  When I 
use the spread operator in a Set to access a property (backed by getter), I am 
getting a type checking error.  If I remove the TypeChecked, all is well.  If I 
remove static from the method all is well.

{code}
@groovy.transform.TypeChecked
class Foo {
  static def meth() {
Set defs = []
defs*.additionalBeanInfo
  }
}
{code}

Error during compile (or in the IDE):
Foo.groovy: 11: [Static type checking] - No such property: additionalBeanInfo 
for class: java.util.Set 


> STC: spread property references fails in static method
> --
>
> Key: GROOVY-8033
> URL: https://issues.apache.org/jira/browse/GROOVY-8033
> Project: Groovy
>  Issue Type: Bug
>  Components: Static Type Checker
>Affects Versions: 2.4.7
>Reporter: Eric Milles
>
> I managed to boil this down to static method versus non-static method.  When 
> I use the spread operator in a Set to access a property (backed by getter), I 
> am getting a type checking error.  If I remove the TypeChecked, all is well.  
> If I remove static from the method, all is well.
> {code}
> @groovy.transform.TypeChecked
> class Foo {
>   static def meth() {
> Set defs = []
> defs*.additionalBeanInfo
>   }
> }
> {code}
> Error during compile (or in the IDE):
> Foo.groovy: 11: [Static type checking] - No such property: additionalBeanInfo 
> for class: java.util.Set 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (GROOVY-8033) STC: spread property references fails in static method

2017-01-03 Thread Eric Milles (JIRA)

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

Eric Milles updated GROOVY-8033:

Description: 
I managed to boil this down to static method versus non-static method.  When I 
use the spread operator in a Set to access a property (backed by getter), I am 
getting a type checking error.  If I remove the TypeChecked, all is well.  If I 
remove static from the method all is well.

{code}
@groovy.transform.TypeChecked
class Foo {
  static def meth() {
Set defs = []
defs*.additionalBeanInfo
  }
}
{code}

Error during compile (or in the IDE):
Foo.groovy: 11: [Static type checking] - No such property: additionalBeanInfo 
for class: java.util.Set 

  was:
I managed to boil this down to static method versus non-static method.  When I 
use the spread operator in a Set to access a property (backed by getter), I am 
getting a type checking error.  If I remove the TypeChecked, all is well.  If I 
remove static on the method all is well.

{code}
@groovy.transform.TypeChecked
class Foo {
  static def meth() {
Set defs = []
defs*.additionalBeanInfo
  }
}
{code}

Error during compile (or in the IDE):
Foo.groovy: 11: [Static type checking] - No such property: additionalBeanInfo 
for class: java.util.Set 


> STC: spread property references fails in static method
> --
>
> Key: GROOVY-8033
> URL: https://issues.apache.org/jira/browse/GROOVY-8033
> Project: Groovy
>  Issue Type: Bug
>  Components: Static Type Checker
>Affects Versions: 2.4.7
>Reporter: Eric Milles
>
> I managed to boil this down to static method versus non-static method.  When 
> I use the spread operator in a Set to access a property (backed by getter), I 
> am getting a type checking error.  If I remove the TypeChecked, all is well.  
> If I remove static from the method all is well.
> {code}
> @groovy.transform.TypeChecked
> class Foo {
>   static def meth() {
> Set defs = []
> defs*.additionalBeanInfo
>   }
> }
> {code}
> Error during compile (or in the IDE):
> Foo.groovy: 11: [Static type checking] - No such property: additionalBeanInfo 
> for class: java.util.Set 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (GROOVY-8033) STC: spread property references fails in static method

2017-01-03 Thread Eric Milles (JIRA)

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

Eric Milles updated GROOVY-8033:

Description: 
I managed to boil this down to static method versus non-static method.  When I 
use the spread operator in a Set to access a property (backed by getter), I am 
getting a type checking error.  If I remove the TypeChecked, all is well.  If I 
remove static on the method all is well.

{code}
@groovy.transform.TypeChecked
class Foo {
  static def meth() {
Set defs = []
defs*.additionalBeanInfo
  }
}
{code}

Error during compile (or in the IDE):
Foo.groovy: 11: [Static type checking] - No such property: additionalBeanInfo 
for class: java.util.Set 

  was:
I managed to boil this down to static method versus non-static method.  When I 
use the spread operator in a Set to access a property (backed by getter), I am 
getting a type checking error.  If I remove the TypeChecked, all is well.  If I 
remove static on the method all is well.

{code}
class Foo {
  static def meth() {
Set defs = []
defs*.additionalBeanInfo
  }
}
{code}

Error during compile (or in the IDE):
Foo.groovy: 11: [Static type checking] - No such property: additionalBeanInfo 
for class: java.util.Set 


> STC: spread property references fails in static method
> --
>
> Key: GROOVY-8033
> URL: https://issues.apache.org/jira/browse/GROOVY-8033
> Project: Groovy
>  Issue Type: Bug
>  Components: Static Type Checker
>Affects Versions: 2.4.7
>Reporter: Eric Milles
>
> I managed to boil this down to static method versus non-static method.  When 
> I use the spread operator in a Set to access a property (backed by getter), I 
> am getting a type checking error.  If I remove the TypeChecked, all is well.  
> If I remove static on the method all is well.
> {code}
> @groovy.transform.TypeChecked
> class Foo {
>   static def meth() {
> Set defs = []
> defs*.additionalBeanInfo
>   }
> }
> {code}
> Error during compile (or in the IDE):
> Foo.groovy: 11: [Static type checking] - No such property: additionalBeanInfo 
> for class: java.util.Set 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (GROOVY-8033) STC: spread property references fails in static method

2017-01-03 Thread Eric Milles (JIRA)
Eric Milles created GROOVY-8033:
---

 Summary: STC: spread property references fails in static method
 Key: GROOVY-8033
 URL: https://issues.apache.org/jira/browse/GROOVY-8033
 Project: Groovy
  Issue Type: Bug
  Components: Static Type Checker
Affects Versions: 2.4.7
Reporter: Eric Milles


I managed to boil this down to static method versus non-static method.  When I 
use the spread operator in a Set to access a property (backed by getter), I am 
getting a type checking error.  If I remove the TypeChecked, all is well.  If I 
remove static on the method all is well.

{code}
class Foo {
  static def meth() {
Set defs = []
defs*.additionalBeanInfo
  }
}
{code}

Error during compile (or in the IDE):
Foo.groovy: 11: [Static type checking] - No such property: additionalBeanInfo 
for class: java.util.Set 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (GROOVY-8032) nested classes on interfaces are not static

2017-01-03 Thread Shil Sinha (JIRA)

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

Shil Sinha commented on GROOVY-8032:


Hi Christopher, 

How are you checking static modifier flag? This issue was fixed as part of 
GROOVY-7312 (which was included in 2.4.7); I haven't been able to reproduce it.

> nested classes on interfaces are not static
> ---
>
> Key: GROOVY-8032
> URL: https://issues.apache.org/jira/browse/GROOVY-8032
> Project: Groovy
>  Issue Type: Bug
>  Components: class generator
>Affects Versions: 2.4.7
>Reporter: Christopher Smith
>Priority: Minor
>
> According to the JLS, "A member type declaration in an interface is 
> implicitly {{static}} and {{public}}", and there does not seem to be any 
> reason for Groovy to support non-static nested classes on interfaces. 
> However, classes not explicitly marked {{static}} do not have the static flag 
> set. This appears to be a simple bug in the class generator, as the generated 
> constructor does not attempt to store an outer reference or otherwise behave 
> as an inner class. It does, however, break reflective code (Jackson) that 
> gets very confused when looking for an eligible constructor.
> {code}
> interface Example {
>   class Response {
> int code
>   }
> }
> {code}
> Expected result: {{Example$Response}} has the static modifier flag set.
> Actual result: It does not.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (GROOVY-8032) nested classes on interfaces are not static

2017-01-03 Thread Christopher Smith (JIRA)
Christopher Smith created GROOVY-8032:
-

 Summary: nested classes on interfaces are not static
 Key: GROOVY-8032
 URL: https://issues.apache.org/jira/browse/GROOVY-8032
 Project: Groovy
  Issue Type: Bug
  Components: class generator
Affects Versions: 2.4.7
Reporter: Christopher Smith
Priority: Minor


According to the JLS, "A member type declaration in an interface is implicitly 
{{static}} and {{public}}", and there does not seem to be any reason for Groovy 
to support non-static nested classes on interfaces. However, classes not 
explicitly marked {{static}} do not have the static flag set. This appears to 
be a simple bug in the class generator, as the generated constructor does not 
attempt to store an outer reference or otherwise behave as an inner class. It 
does, however, break reflective code (Jackson) that gets very confused when 
looking for an eligible constructor.

{code}
interface Example {
  class Response {
int code
  }
}
{code}

Expected result: {{Example$Response}} has the static modifier flag set.
Actual result: It does not.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)