We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
----- module test; import std.stdio; struct S { public void toString (scope void delegate(scope const(char)[]) @safe nothrow sink) @safe { sink("output"); } } void main() { S s; writeln(s); } ----- $ dmd test.d ----- /Library/D/dmd/src/phobos/std/format.d(3962): Error: function `test.S.toString(scope void delegate(scope const(char)[]) nothrow @safe sink)` is not callable using argument types `(void delegate(scope const(char)[] s) @safe)` /Library/D/dmd/src/phobos/std/format.d(3962): cannot pass argument `__lambda4` of type `void delegate(scope const(char)[] s) @safe` to parameter `scope void delegate(scope const(char)[]) nothrow @safe sink` /Library/D/dmd/src/phobos/std/format.d(4342): Error: template instance `std.format.formatObject!(LockingTextWriter, S, char)` error instantiating /Library/D/dmd/src/phobos/std/format.d(1854): instantiated from here: `formatValueImpl!(LockingTextWriter, S, char)` /Library/D/dmd/src/phobos/std/format.d(575): instantiated from here: `formatValue!(LockingTextWriter, S, char)` /Library/D/dmd/src/phobos/std/stdio.d(1506): instantiated from here: `formattedWrite!(LockingTextWriter, char, S)` /Library/D/dmd/src/phobos/std/stdio.d(3863): instantiated from here: `write!(S, char)` test.d(14): instantiated from here: `writeln!(S)` Failed: ["/Library/D/dmd/bin/dmd", "-g", "-unittest", "-v", "-o-", "test.d", "-I."] [Finished in 0.7s] -----
The text was updated successfully, but these errors were encountered:
No branches or pull requests
andrej.mitrovich (@AndrejMitrovic) reported this on 2020-01-08T07:33:18Z
Transfered from https://issues.dlang.org/show_bug.cgi?id=20487
Description
The text was updated successfully, but these errors were encountered: