[ create a new paste ] login | about

Project: ncu
Link: http://ncu.codepad.org/sHrGrdJc    [ raw code | output | fork ]

GiM - D, pasted on Jun 29:
1
2
3
4
5
6
7
8
9
10
extern(C) int write(int fd, char *buf, int len);
void gwrite(char[] str) { write(2, str.ptr, str.length); }

interface Big { void brother(); }
void foo(Big biggy) { biggy.brother(); }
void main()
{
    foo(new class Big { void brother() { gwrite("hello\n"); } });
    (new class Big { void brother() { gwrite("dummy\n"); } }).brother;
}


Output:
1
2
hello
dummy


Create a new paste based on this one


Comments: