Hi there,

do I make some mistake not understanding properly those two ASTTs, or is this a 
Groovy bug?
Thanks!
OC

===
975 ocs /tmp> <nv.groovy 
import groovy.transform.*
import groovy.transform.options.*
class Test {
  @NamedVariant @VisibilityOptions(Visibility.PUBLIC) private makeSense(int 
dollars, int cents) {
    "d:$dollars c:$cents"
  }
}
def t=new Test()
println t.makeSense(dollars: 2, cents: 50)
976 ocs /tmp> /usr/local/groovy-4.0.24/bin/groovy nv
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
/private/tmp/nv.groovy: 4: 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.
 @ line 4, column 3.
     @NamedVariant @VisibilityOptions(Visibility.PUBLIC) private makeSense(int 
dollars, int cents) {
     ^

/private/tmp/nv.groovy: -1: 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.
 @ line -1, column -1.
2 errors

977 ocs /tmp> 
===

Reply via email to