[
https://issues.apache.org/jira/browse/GROOVY-8836?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16644412#comment-16644412
]
Paul King edited comment on GROOVY-8836 at 10/10/18 3:55 AM:
-------------------------------------------------------------
This is due to running the program on JDK11 as per the linked issue. Also, as a
side note, {{copyOfRange}} throws {{IllegalArgumentException}} if from > to.
Groovy 2.5.3 which supports JDK11+ is due for release shortly.
was (Author: paulk):
This is due to running the program on JDK11 as per the linked issue. Also, as a
side note, {{copyOfRange}} throws {{IllegalArgumentException}} if from > to.
> 'semantic analysis' fail
> ------------------------
>
> Key: GROOVY-8836
> URL: https://issues.apache.org/jira/browse/GROOVY-8836
> Project: Groovy
> Issue Type: Bug
> Components: groovy-runtime
> Affects Versions: 3.0.0-alpha-3, 2.5.2
> Reporter: Behruz
> Priority: Blocker
> Labels: intellij, java
>
> in intellij: Tried running following script:
> {code:java}
> def arr = (0..10).toArray()
> def reverted = Arrays.copyOfRange arr, arr.length, 0
> println reverted
> {code}
> Got following stack:
> {code:java}
> WARNING: An illegal reflective access operation has occurred
> WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1
> (file:/ ... /groovy/3.0.0-alpha-3/groovy-3.0.0-alpha-3.jar) to constructor
> java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
> WARNING: Please consider reporting this to the maintainers of
> org.codehaus.groovy.vmplugin.v7.Java7$1
> WARNING: Use --illegal-access=warn to enable warnings of further illegal
> reflective access operations
> WARNING: All illegal access operations will be denied in a future release
> Caught: BUG! exception in phase 'semantic analysis' in source unit '...
> \.IntelliJIdea2018.2\config\scratches\scratch.groovy' null
> BUG! exception in phase 'semantic analysis' in source unit '...
> \.IntelliJIdea2018.2\config\scratches\scratch.groovy' null
> 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)
> Caused by: java.lang.UnsupportedOperationException
> at
> groovyjarjarasm.asm.ClassVisitor.visitNestMemberExperimental(ClassVisitor.java:248)
> at groovyjarjarasm.asm.ClassReader.accept(ClassReader.java:651)
> at groovyjarjarasm.asm.ClassReader.accept(ClassReader.java:391)
> ... 3 more
> {code}
> I know nothing about Groovy, but it said 'Bug!', so I report
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)