Spencer Salazarnew testing framework3e7be8b13 years agoHistory
36 lines · 537 B · Text
RawDownload
// 36.ck : function overloading across inheritance, with overriding // base calssclass X{    fun void foo( int a )    { <<<a>>>; }     fun void foo( int a, int b )    { <<<a+b>>>; }} // class Yclass Y extends X{    // override X's foo( int )    fun void foo( int a )    { <<<a+1>>>; }     fun void foo( int a, int b )    { <<<a+b+1>>>; }} // class Zclass Z extends Y{    // override Y's foo( int, int )    fun void foo( int a, int b )    { <<<"success">>>;}} // instantiate a ZZ x; // call the foox.foo(3,5);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t