[jira] [Resolved] (GROOVY-10122) Wrong cast in stubs generated
[ https://issues.apache.org/jira/browse/GROOVY-10122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eric Milles resolved GROOVY-10122. -- Fix Version/s: 4.0.0-beta-1 Resolution: Fixed > Wrong cast in stubs generated > - > > Key: GROOVY-10122 > URL: https://issues.apache.org/jira/browse/GROOVY-10122 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Affects Versions: 3.0.8 >Reporter: Daniil Ovchinnikov >Assignee: Eric Milles >Priority: Major > Fix For: 4.0.0-beta-1 > > Attachments: mre.zip > > > {noformat} > $ #unzip > $ cd mre/src > $ groovy -version > Groovy Version: 3.0.8 JVM: 15.0.1 Vendor: Oracle Corporation OS: Mac OS X > $ groovyc -j JavaBase.java GroovyInheritor.groovy JavaUsage.java > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed: > Compile error during compilation with javac. > /var/folders/t7/26sb5vb111n3ljbmwv4s340mgn/T/groovy-generated--java-source12536140884342736527/GroovyInheritor.java:14: > error: incompatible types: Object cannot be converted to Integer > super((java.lang.Object)null); > ^ > Note: Some messages have been simplified; recompile with -Xdiags:verbose to > get full output > 1 error > 1 error > {noformat} > The issue is not reproducible in 3.0.7. > Same issue can be reproduced opening the directory in IntelliJ and invoking > Rebuild Project. > Related https://youtrack.jetbrains.com/issue/IDEA-270650 -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (GROOVY-10122) Wrong cast in stubs generated
[ https://issues.apache.org/jira/browse/GROOVY-10122?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17355939#comment-17355939 ] Eric Milles commented on GROOVY-10122: -- I see where the problem is in JavaStubGenerator. You can work around this by adding a typecast to your Groovy source: {code:groovy} class G extends J { G() { super((Integer)integerMethod()) } static Integer integerMethod() { 42 } } {code} > Wrong cast in stubs generated > - > > Key: GROOVY-10122 > URL: https://issues.apache.org/jira/browse/GROOVY-10122 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Affects Versions: 3.0.8 >Reporter: Daniil Ovchinnikov >Priority: Major > Attachments: mre.zip > > > {noformat} > $ #unzip > $ cd mre/src > $ groovy -version > Groovy Version: 3.0.8 JVM: 15.0.1 Vendor: Oracle Corporation OS: Mac OS X > $ groovyc -j JavaBase.java GroovyInheritor.groovy JavaUsage.java > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed: > Compile error during compilation with javac. > /var/folders/t7/26sb5vb111n3ljbmwv4s340mgn/T/groovy-generated--java-source12536140884342736527/GroovyInheritor.java:14: > error: incompatible types: Object cannot be converted to Integer > super((java.lang.Object)null); > ^ > Note: Some messages have been simplified; recompile with -Xdiags:verbose to > get full output > 1 error > 1 error > {noformat} > The issue is not reproducible in 3.0.7. > Same issue can be reproduced opening the directory in IntelliJ and invoking > Rebuild Project. > Related https://youtrack.jetbrains.com/issue/IDEA-270650 -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Assigned] (GROOVY-10122) Wrong cast in stubs generated
[ https://issues.apache.org/jira/browse/GROOVY-10122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eric Milles reassigned GROOVY-10122: Assignee: Eric Milles > Wrong cast in stubs generated > - > > Key: GROOVY-10122 > URL: https://issues.apache.org/jira/browse/GROOVY-10122 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Affects Versions: 3.0.8 >Reporter: Daniil Ovchinnikov >Assignee: Eric Milles >Priority: Major > Attachments: mre.zip > > > {noformat} > $ #unzip > $ cd mre/src > $ groovy -version > Groovy Version: 3.0.8 JVM: 15.0.1 Vendor: Oracle Corporation OS: Mac OS X > $ groovyc -j JavaBase.java GroovyInheritor.groovy JavaUsage.java > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed: > Compile error during compilation with javac. > /var/folders/t7/26sb5vb111n3ljbmwv4s340mgn/T/groovy-generated--java-source12536140884342736527/GroovyInheritor.java:14: > error: incompatible types: Object cannot be converted to Integer > super((java.lang.Object)null); > ^ > Note: Some messages have been simplified; recompile with -Xdiags:verbose to > get full output > 1 error > 1 error > {noformat} > The issue is not reproducible in 3.0.7. > Same issue can be reproduced opening the directory in IntelliJ and invoking > Rebuild Project. > Related https://youtrack.jetbrains.com/issue/IDEA-270650 -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Updated] (GROOVY-10122) Wrong cast in stubs generated
[ https://issues.apache.org/jira/browse/GROOVY-10122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniil Ovchinnikov updated GROOVY-10122: Attachment: mre.zip > Wrong cast in stubs generated > - > > Key: GROOVY-10122 > URL: https://issues.apache.org/jira/browse/GROOVY-10122 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler >Affects Versions: 3.0.8 >Reporter: Daniil Ovchinnikov >Priority: Major > Attachments: mre.zip > > > {noformat} > $ #unzip > $ cd mre/src > $ groovy -version > Groovy Version: 3.0.8 JVM: 15.0.1 Vendor: Oracle Corporation OS: Mac OS X > $ groovyc -j JavaBase.java GroovyInheritor.groovy JavaUsage.java > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed: > Compile error during compilation with javac. > /var/folders/t7/26sb5vb111n3ljbmwv4s340mgn/T/groovy-generated--java-source12536140884342736527/GroovyInheritor.java:14: > error: incompatible types: Object cannot be converted to Integer > super((java.lang.Object)null); > ^ > Note: Some messages have been simplified; recompile with -Xdiags:verbose to > get full output > 1 error > 1 error > {noformat} > The issue is not reproducible in 3.0.7. > Same issue can be reproduced opening the directory in IntelliJ and invoking > Rebuild Project. > Related https://youtrack.jetbrains.com/issue/IDEA-270650 -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (GROOVY-10122) Wrong cast in stubs generated
Daniil Ovchinnikov created GROOVY-10122: --- Summary: Wrong cast in stubs generated Key: GROOVY-10122 URL: https://issues.apache.org/jira/browse/GROOVY-10122 Project: Groovy Issue Type: Bug Components: Stub generator / Joint compiler Affects Versions: 3.0.8 Reporter: Daniil Ovchinnikov Attachments: mre.zip {noformat} $ #unzip $ cd mre/src $ groovy -version Groovy Version: 3.0.8 JVM: 15.0.1 Vendor: Oracle Corporation OS: Mac OS X $ groovyc -j JavaBase.java GroovyInheritor.groovy JavaUsage.java org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Compile error during compilation with javac. /var/folders/t7/26sb5vb111n3ljbmwv4s340mgn/T/groovy-generated--java-source12536140884342736527/GroovyInheritor.java:14: error: incompatible types: Object cannot be converted to Integer super((java.lang.Object)null); ^ Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output 1 error 1 error {noformat} The issue is not reproducible in 3.0.7. Same issue can be reproduced opening the directory in IntelliJ and invoking Rebuild Project. Related https://youtrack.jetbrains.com/issue/IDEA-270650 -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Created] (GROOVY-10121) @AnnotationCollector does not work with JUnit 5
Michał Mally created GROOVY-10121: - Summary: @AnnotationCollector does not work with JUnit 5 Key: GROOVY-10121 URL: https://issues.apache.org/jira/browse/GROOVY-10121 Project: Groovy Issue Type: Bug Components: bytecode Affects Versions: 3.0.8 Environment: Gradle 7.0.2 Build time: 2021-05-14 12:02:31 UTC Revision: 1ef1b260d39daacbf9357f9d8594a8a743e2152e Kotlin: 1.4.31 Groovy: 3.0.7 Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020 JVM: 11.0.10 (Amazon.com Inc. 11.0.10+9-LTS) OS: Mac OS X 10.15.7 x86_64 Reporter: Michał Mally Following exception is thrown when trying to build project with JUnit 5 where `@AnnotationCollector` is used at any `@interface` in `/src/test/groovy`: {code:java} org.gradle.api.internal.tasks.testing.TestSuiteExecutionException: Could not execute test class 'pl.helenium.SomeCollectedAnnotations$CollectorHelper'. at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:53) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33) at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94) at com.sun.proxy.$Proxy2.processTestClass(Unknown Source) at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:119) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182) at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164) at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:414) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: java.lang.IncompatibleClassChangeError: pl.helenium.SomeCollectedAnnotations and pl.helenium.SomeCollectedAnnotations$CollectorHelper disagree on InnerClasses attribute at java.base/java.lang.Class.getDeclaringClass0(Native Method) at java.base/java.lang.Class.getEnclosingClass(Class.java:1517) at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.isInnerClass(JUnitPlatformTestClassProcessor.java:104) at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.access$200(JUnitPlatformTestClassProcessor.java:54) at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.execute(JUnitPlatformTestClassProcessor.java:90) at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.execute(JUnitPlatformTestClassProcessor.java:79) at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:62)