[ https://issues.apache.org/jira/browse/GROOVY-11627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17949471#comment-17949471 ]
Eric Milles edited comment on GROOVY-11627 at 5/5/25 5:28 PM: -------------------------------------------------------------- This is checked here: https://github.com/apache/groovy/blob/8577625deca323abe6d9fc0853519cfa59eeb5fd/src/main/java/org/codehaus/groovy/classgen/ClassCompletionVerifier.java#L485 It was first added here: https://github.com/apache/groovy/commit/766af2728c59d2e4047644d9334495227a68ff49 It seems tied to this: https://github.com/apache/groovy/blob/e17e3be3a2ccc0c6bffef32ac23facaa3f3c7dad/src/main/java/groovy/lang/MetaClassImpl.java#L454 was (Author: emilles): This is checked here: https://github.com/apache/groovy/blob/8577625deca323abe6d9fc0853519cfa59eeb5fd/src/main/java/org/codehaus/groovy/classgen/ClassCompletionVerifier.java#L485 It was first added here: https://github.com/apache/groovy/commit/766af2728c59d2e4047644d9334495227a68ff49 > Compile Error when private and public functions use same name in compile > static mode > ------------------------------------------------------------------------------------ > > Key: GROOVY-11627 > URL: https://issues.apache.org/jira/browse/GROOVY-11627 > Project: Groovy > Issue Type: Bug > Components: Compiler, Static compilation > Affects Versions: 5.0.0-alpha-12 > Reporter: Saravanan > Assignee: Eric Milles > Priority: Minor > > When I define a class in Groovy with 2 methods with the same name, one > private and one public, I get this error during static compilation > {quote}Mixing private and public/protected methods of the same name causes > multimethods to be disabled and is forbidden to avoid surprising behaviour. > Renaming the private methods will solve the problem. > {quote} > I understand the need for multi methods and dispatching with runtime types, > but how can I disable this behaviour? I am using @CompileStatic and it still > hits this error > Per Jochen > {quote}CompileStatic does not support multi methods, so I totally agree that > this message should not appear for static compiled classes. > {quote} -- This message was sent by Atlassian Jira (v8.20.10#820010)