Change module level functions to nested class static member.

This commit is contained in:
k-hara 2012-11-25 15:52:42 +09:00
parent cd432f7b2f
commit a404b3108f

View file

@ -1940,14 +1940,14 @@ template forward(args...)
alias forward = TypeTuple!();
}
version(unittest) private
{
int foo(int n) { return 1; }
int foo(ref int n) { return 2; }
}
unittest
{
int bar()(auto ref int x) { return foo(forward!x); }
class C
{
static int foo(int n) { return 1; }
static int foo(ref int n) { return 2; }
}
int bar()(auto ref int x) { return C.foo(forward!x); }
assert(bar(1) == 1);
int i;