Spencer Salazarnew testing framework3e7be8b13 years agoHistory
27 lines · 412 B · Text
RawDownload
// 26.ck : member functions that return object // delcare classclass X{    int i;} // declare another classclass Y{    // declare a X as a member of Y    X x;     // return x through a function    fun X foo() { return x; };} // instantiate a YY y; // assign to y's x's field i1 => y.x.i; // get x through the function and test the valueif( y.foo().i != 1 ) <<<"fail">>>;else <<<"success">>>;

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