[jira] [Closed] (GROOVY-11341) @CompileStatic: Compilation fails due to a synthetic bridge method in the subclass
[ https://issues.apache.org/jira/browse/GROOVY-11341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King closed GROOVY-11341. -- > @CompileStatic: Compilation fails due to a synthetic bridge method in the > subclass > -- > > Key: GROOVY-11341 > URL: https://issues.apache.org/jira/browse/GROOVY-11341 > Project: Groovy > Issue Type: Bug > Components: Static compilation, Static Type Checker >Affects Versions: 2.4.x, 2.5.x, 3.0.21, 5.0.0-alpha-7, 4.0.20 >Reporter: Peter Schmitz >Assignee: Eric Milles >Priority: Minor > Labels: CompileStatic, groovyc > Fix For: 5.0.0-alpha-8 > > > Given the following Java classes: > {code:java} > public interface InterfaceBase { > Object getValue(); > } > > public class MyImplBase { > public Long getValue() { > return 42L; > } > } > > public class MyImpl extends MyImplBase implements InterfaceBase { > } {code} > > And the following SimpleCaller.groovy: > {code:java} > @groovy.transform.CompileStatic > class SimpleCaller { >public static void main(String[] args) { > Long v = new MyImpl().getValue(); > System.out.println(v); //42 >} > } {code} > The compilation fails with: > > {{SimpleCaller.groovy: 7: [Static type checking] - Cannot assign value of > type java.lang.Object to variable of type java.lang.Long}} > {{ @ line 7, column 16.}} > {{ Long v = new MyImpl().getValue();}} > {{ ^}} > > Compiling the equivalent {{SimpleCaller.java}} with _javac_ completes > successfully. > > This structure is a bit uncommon, because MyImplBase uses a covariant return > type and doesn't implement the interface directly, only its subclass does. > > I believe the problem is connected to the synthetic bridge method inserted > into the bytecode of {_}MyImpl{_}, which is picked up and preferred by > _groovyc_ over the non-synthetic method in {_}MyImplBase{_}. > > > In case this is related: The synthetic bridge method is selected when using > reflection as well, causing the inferred type by javac and reflection to > diverge: > {code:java} > Method getValueMethod = MyImpl.class.getMethod("getValue"); > // public java.lang.Object MyImpl.getValue() {code} > > > Workarounds: > > * Disable static compilation > * An explicit cast to Long in SimpleCaller. > * Explicitly repeat the covariant method signature in MyImpl > * If possible, add/Move the implements to MyImplBase - then the synthetic > method is in the same class as the real one, which _groovyc_ is able to > detect. > Using generics in the Interface doesn't work either (probably due to type > erasure). > > Seems to be a more generalized issue when compared to the similar GROOVY-5003 -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Closed] (GROOVY-11343) Bump asm to 9.7
[ https://issues.apache.org/jira/browse/GROOVY-11343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King closed GROOVY-11343. -- > Bump asm to 9.7 > --- > > Key: GROOVY-11343 > URL: https://issues.apache.org/jira/browse/GROOVY-11343 > Project: Groovy > Issue Type: Dependency upgrade >Reporter: Paul King >Assignee: Paul King >Priority: Major > Fix For: 5.0.0-alpha-8, 4.0.21 > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Closed] (GROOVY-11350) Bump log4j2 version to 2.23.1 (test dependency)
[ https://issues.apache.org/jira/browse/GROOVY-11350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King closed GROOVY-11350. -- > Bump log4j2 version to 2.23.1 (test dependency) > --- > > Key: GROOVY-11350 > URL: https://issues.apache.org/jira/browse/GROOVY-11350 > Project: Groovy > Issue Type: Dependency upgrade >Reporter: Paul King >Assignee: Paul King >Priority: Major > Fix For: 5.0.0-alpha-8, 4.0.21 > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Closed] (GROOVY-11347) Support JDK 23
[ https://issues.apache.org/jira/browse/GROOVY-11347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King closed GROOVY-11347. -- > Support JDK 23 > -- > > Key: GROOVY-11347 > URL: https://issues.apache.org/jira/browse/GROOVY-11347 > Project: Groovy > Issue Type: Improvement >Reporter: Paul King >Assignee: Paul King >Priority: Major > Fix For: 5.0.0-alpha-8, 4.0.21 > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Closed] (GROOVY-11346) Bump checkstyle to 10.14.2 (build dependency)
[ https://issues.apache.org/jira/browse/GROOVY-11346?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King closed GROOVY-11346. -- > Bump checkstyle to 10.14.2 (build dependency) > - > > Key: GROOVY-11346 > URL: https://issues.apache.org/jira/browse/GROOVY-11346 > Project: Groovy > Issue Type: Dependency upgrade >Reporter: Paul King >Assignee: Paul King >Priority: Major > Fix For: 5.0.0-alpha-8 > > > For Groovy 5+. > > See: > https://checkstyle.org/releasenotes.html#Release_10.14.2 -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Closed] (GROOVY-11342) SQL enhancement to allow metadata access for execute
[ https://issues.apache.org/jira/browse/GROOVY-11342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King closed GROOVY-11342. -- > SQL enhancement to allow metadata access for execute > > > Key: GROOVY-11342 > URL: https://issues.apache.org/jira/browse/GROOVY-11342 > Project: Groovy > Issue Type: Improvement >Reporter: Paul King >Assignee: Paul King >Priority: Major > Fix For: 5.0.0-alpha-8, 4.0.21 > > Attachments: SqlExamples2.groovy > > > See: > https://lists.apache.org/thread/3xgm7p2nlv8zz6n9cnpgsmdgzjtojz2v > There are 5 variants of {{execute}} which take a {{processResults}} Closure. > I imagine we would leave those as is and add 5 new variants that would also > take a meta Closure. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Closed] (GROOVY-11348) Bump gradle to 8.7 (build)
[ https://issues.apache.org/jira/browse/GROOVY-11348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King closed GROOVY-11348. -- > Bump gradle to 8.7 (build) > -- > > Key: GROOVY-11348 > URL: https://issues.apache.org/jira/browse/GROOVY-11348 > Project: Groovy > Issue Type: Dependency upgrade >Reporter: Paul King >Assignee: Paul King >Priority: Major > Fix For: 5.0.0-alpha-8 > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Closed] (GROOVY-11349) Bump asciidoctorj pdf to 2.3.15
[ https://issues.apache.org/jira/browse/GROOVY-11349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King closed GROOVY-11349. -- > Bump asciidoctorj pdf to 2.3.15 > --- > > Key: GROOVY-11349 > URL: https://issues.apache.org/jira/browse/GROOVY-11349 > Project: Groovy > Issue Type: Dependency upgrade >Reporter: Paul King >Assignee: Paul King >Priority: Minor > Fix For: 5.0.0-alpha-8 > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Closed] (GROOVY-11319) Access to a private property of a parent object is not caught
[ https://issues.apache.org/jira/browse/GROOVY-11319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King closed GROOVY-11319. -- > Access to a private property of a parent object is not caught > - > > Key: GROOVY-11319 > URL: https://issues.apache.org/jira/browse/GROOVY-11319 > Project: Groovy > Issue Type: Bug > Components: Static Type Checker >Reporter: Thodoris Sotiropoulos >Assignee: Eric Milles >Priority: Minor > Fix For: 5.0.0-alpha-8, 4.0.21 > > > I have the following ill-typed program > {code} > class A { > private int getX() { > return 1; > } > } > class B extends A { > void test() { > def y = super.x; > System.out.println(y); > } > } > public class Test { > public static void main(String[] args) { > new B().test(); > } > } > {code} > h3. Actual behavior > The program compiles. When I run it, I receive: > {code} > Exception in thread "main" groovy.lang.MissingPropertyException: No such > property: x for class: B > at > org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:68) > at > org.codehaus.groovy.runtime.ScriptBytecodeAdapter.getPropertyOnSuper(ScriptBytecodeAdapter.java:426) > at B.test(test.groovy:9) > at Test.main(test.groovy:16) > {code} > h3. Expected behavior > The problem is on line 9, when the program accesses the private property x of > the parent object. > Tested against master (commit: e17149013c5943ad3493f9597e6720eb6529d120) -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Closed] (GROOVY-11355) Bump checkstyle to 10.15.0 (build dependency)
[ https://issues.apache.org/jira/browse/GROOVY-11355?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King closed GROOVY-11355. -- > Bump checkstyle to 10.15.0 (build dependency) > - > > Key: GROOVY-11355 > URL: https://issues.apache.org/jira/browse/GROOVY-11355 > Project: Groovy > Issue Type: Dependency upgrade >Reporter: Paul King >Assignee: Paul King >Priority: Major > Fix For: 5.0.0-alpha-8 > > > For Groovy 5+. > > See: > https://checkstyle.org/releasenotes.html#Release_10.14.2 -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Closed] (GROOVY-11344) Bump jackson/jackson-databind to 2.17.0
[ https://issues.apache.org/jira/browse/GROOVY-11344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King closed GROOVY-11344. -- > Bump jackson/jackson-databind to 2.17.0 > --- > > Key: GROOVY-11344 > URL: https://issues.apache.org/jira/browse/GROOVY-11344 > Project: Groovy > Issue Type: Dependency upgrade >Reporter: Paul King >Assignee: Paul King >Priority: Major > Fix For: 5.0.0-alpha-8, 4.0.21 > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Closed] (GROOVY-11351) Add zip and columns extension methods
[ https://issues.apache.org/jira/browse/GROOVY-11351?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King closed GROOVY-11351. -- > Add zip and columns extension methods > - > > Key: GROOVY-11351 > URL: https://issues.apache.org/jira/browse/GROOVY-11351 > Project: Groovy > Issue Type: Improvement >Reporter: Paul King >Assignee: Paul King >Priority: Major > Fix For: 5.0.0-alpha-8 > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Closed] (GROOVY-11337) Bump asciidoctorj-diagram to 2.3.0
[ https://issues.apache.org/jira/browse/GROOVY-11337?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King closed GROOVY-11337. -- > Bump asciidoctorj-diagram to 2.3.0 > -- > > Key: GROOVY-11337 > URL: https://issues.apache.org/jira/browse/GROOVY-11337 > Project: Groovy > Issue Type: Dependency upgrade >Reporter: Daniel Sun >Assignee: Paul King >Priority: Major > Fix For: 5.0.0-alpha-8 > > Attachments: image-2024-03-11-06-06-04-300.png, > image-2024-03-11-06-07-12-504.png, image-2024-03-11-20-23-46-948.png > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Closed] (GROOVY-11345) Bump jqwik to 1.8.4 (test dependency)
[ https://issues.apache.org/jira/browse/GROOVY-11345?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King closed GROOVY-11345. -- > Bump jqwik to 1.8.4 (test dependency) > - > > Key: GROOVY-11345 > URL: https://issues.apache.org/jira/browse/GROOVY-11345 > Project: Groovy > Issue Type: Dependency upgrade >Reporter: Paul King >Assignee: Paul King >Priority: Major > Fix For: 5.0.0-alpha-8, 4.0.21 > > -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Closed] (GROOVY-7734) ClassNode tryFindPossibleMethod only defined for TupleExpression
[ https://issues.apache.org/jira/browse/GROOVY-7734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King closed GROOVY-7734. - > ClassNode tryFindPossibleMethod only defined for TupleExpression > > > Key: GROOVY-7734 > URL: https://issues.apache.org/jira/browse/GROOVY-7734 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.5 >Reporter: Anton >Assignee: Eric Milles >Priority: Major > Fix For: 3.0.21, 4.0.19, 5.0.0-alpha-6 > > > As seen here > https://github.com/apache/groovy/blob/master/src/main/org/codehaus/groovy/ast/ClassNode.java#L1257-L1258 > if {{arguments}} is not a {{TupleExpression}} the method just returns. > Shouldn't this be defined for other expression types as well? -- This message was sent by Atlassian Jira (v8.20.10#820010)
Re: [PR] Bump com.gradle.enterprise from 3.16.2 to 3.17.1 [groovy]
paulk-asert commented on PR #2074: URL: https://github.com/apache/groovy/pull/2074#issuecomment-2049074043 @dependabot close As per version info in https://docs.gradle.com/enterprise/gradle-plugin/legacy/#release_history and the version currently used by ge.apache.org, this isn't a compatible version for us yet. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@groovy.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Bump com.gradle.enterprise from 3.16.2 to 3.17.1 [groovy]
dependabot[bot] closed pull request #2074: Bump com.gradle.enterprise from 3.16.2 to 3.17.1 URL: https://github.com/apache/groovy/pull/2074 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@groovy.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org