[Issue 11539] New: wrong "Orphan format specifier:" error message
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Nov 18 06:05:27 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11539
Summary: wrong "Orphan format specifier:" error message
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: monarchdodra at gmail.com
--- Comment #0 from monarchdodra at gmail.com 2013-11-18 06:05:24 PST ---
//----
import std.stdio;
void main()
{
writefln("%s"); //1
writefln("%s hello %s"); //2
}
//----
Produces:
//1
std.format.FormatException at C:\D\dmd.2.064.2\dmd2\windows\bin\..\..\src\phobos\std\format.d(438):
Orphan format specifier: %%s
//2
std.format.FormatException at C:\D\dmd.2.064.2\dmd2\windows\bin\..\..\src\phobos\std\format.d(438):
Orphan format specifier: %%s hello %s
It appears the error message contains the actual format string, and not the
actual format specifier.
The fix is trivial, and in said exception line:
text("Orphan format specifier: %", fmt));
s/fmt/spec.spec/
to fix
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list