mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 22:50:38 +03:00
Change module level functions to nested class static member.
This commit is contained in:
parent
cd432f7b2f
commit
a404b3108f
1 changed files with 6 additions and 6 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue