Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
1.1-rc-2
-
None
Description
We can not implement overloading methods in the interfaces, please provide a way to complete it.
Thanks.
interface Talkable { void sayHello(String name) void sayHello() } def man = [ sayHello: {String name -> println " Hello, $name " }, // maybe "sayHello(String)" :{String name -> println " Hello, $name " } is better sayHello: { -> println "Hello, world"} // "sayHello()" :{ -> println "Hello, world"} ] as Talkable man.sayHello( " Daniel " )