You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2023/12/22 11:39:00 UTC
[jira] [Closed] (GROOVY-4770) "constructor" in EMC DSL doesn't work as expected
[ https://issues.apache.org/jira/browse/GROOVY-4770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King closed GROOVY-4770.
-----------------------------
> "constructor" in EMC DSL doesn't work as expected
> -------------------------------------------------
>
> Key: GROOVY-4770
> URL: https://issues.apache.org/jira/browse/GROOVY-4770
> Project: Groovy
> Issue Type: Sub-task
> Components: groovy-runtime
> Affects Versions: 1.8-rc-3
> Environment: Mac OS X 10.6.7 / JVM: 1.6.0_24
> Reporter: Kazuchika Sekiya
> Priority: Minor
>
> class Foo {}
> Foo.metaClass.constructor = { println "in constructor" }
> foo = new Foo()
> This prints "in constructor" as expected.
> But an equivalent EMC DSL:
> Foo.metaClass {
> constructor { println "in constructor" }
> }
> doesn't work. (no output)
> Looks like it's recognized as just a regular method named "constructor".
--
This message was sent by Atlassian Jira
(v8.20.10#820010)