Skip to content

Commit

Permalink
fix Issue 21920 - [REG master] Error: auto can only be used as part…
Browse files Browse the repository at this point in the history
… of `auto ref` for template function parameters
  • Loading branch information
ibuclaw committed May 17, 2021
1 parent 116d33b commit c162202
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions std/stdio.d
Original file line number Diff line number Diff line change
Expand Up @@ -4356,6 +4356,13 @@ void writeln(T...)(T args)
useInit(stdout.lockingTextWriter());
}

@system unittest
{
// https://issues.dlang.org/show_bug.cgi?id=21920
void function(string) printer = &writeln!string;
if (false) printer("Hello");
}


/***********************************
Writes formatted data to standard output (without a trailing newline).
Expand Down

0 comments on commit c162202

Please sign in to comment.