mirror of
https://github.com/dlang/phobos.git
synced 2025-05-03 08:30:33 +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!();
|
alias forward = TypeTuple!();
|
||||||
}
|
}
|
||||||
|
|
||||||
version(unittest) private
|
|
||||||
{
|
|
||||||
int foo(int n) { return 1; }
|
|
||||||
int foo(ref int n) { return 2; }
|
|
||||||
}
|
|
||||||
unittest
|
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);
|
assert(bar(1) == 1);
|
||||||
int i;
|
int i;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue