7 lines
206 B
Text
7 lines
206 B
Text
// Without a delegate:
|
|
a:= Delegator();
|
|
a.operation().println(); //--> "default implementation"
|
|
|
|
// With a delegate:
|
|
a.delegate = Delegate();
|
|
a.operation().println(); //-->"delegate implementation"
|