Skip to content

Commit

Permalink
add testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
shoo committed Nov 20, 2012
1 parent a8305d0 commit f82ebec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions std/typecons.d
Expand Up @@ -2905,6 +2905,7 @@ unittest
@property ref int val2(){ return field; }

const int func(int x, int y){ return x; }
void func1(ref int a){ a = 9; }

T opCast(T)(){ return T.init; }

Expand Down Expand Up @@ -2946,6 +2947,8 @@ unittest

// member function
assert(h.func(2,4) == 2);
h.func1(n);
assert(n == 9);

// bug5896 test
assert(h.opCast!int() == 0);
Expand Down

0 comments on commit f82ebec

Please sign in to comment.