[ create a new paste ] login | about

Link: http://codepad.org/QSE36vhJ    [ raw code | output | fork ]

D, pasted on May 28:
1
2
3
4
5
6
7
8
struct S {
    int x;
}

void main() {
    S i = 5;
    printf("%d", i.x); // prints 0
}


Output:
1
2
3
Line 6: Error: no property 'opCall' for type 'S'
Line 6: Error: function expected before (), not 1 of type int
Line 6: Error: cannot implicitly convert expression (1(5)) of type int to S


Create a new paste based on this one


Comments: