Daniel Sun created GROOVY-12817:
-----------------------------------
Summary: super.setMetaClass() from a user-defined setMetaClass
still does not reach the DGM implementation
Key: GROOVY-12817
URL: https://issues.apache.org/jira/browse/GROOVY-12817
Project: Groovy
Issue Type: Bug
Components: groovy-runtime
Reporter: Daniel Sun
GROOVY-5285 (Closed/Fixed in 2.0-beta-3) was about `super.setMetaClass()`
overflowing when there is no Groovy base class.
`groovy.ThisAndSuperTest#testSuperSetMetaClassChain` in
`src/test/groovy/groovy/ThisAndSuperTest.groovy` is still `@NotYetImplemented`.
The test defines `void setMetaClass(MetaClass metaClass) {
super.setMetaClass(metaClass) }` and then does `x.metaClass = x.metaClass`,
with a comment that this should reach the DGM `setMetaClass` (see
`MetaClassImpl#getMethodWithCaching`).
Scanned SHA: `ca71425976fd2e3da6db9634955ba0d39550a6d4`.
Re-checked on 22 Nov 2026 (Asia/Taipei) at the same SHA by temporarily removing
@NotYetImplemented and running the test on JDK 17: it still fails with
java.lang.StackOverflowError. super.setMetaClass() from a user-defined
setMetaClass still does not reach the DGM implementation.
**Acceptance criterion:** The assignment completes without overflow or a
missing-method failure, and the annotation is removed.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)