[Issue 11605] New: Cannot print const classes
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Nov 26 01:56:47 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11605
Summary: Cannot print const classes
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: monarchdodra at gmail.com
--- Comment #0 from monarchdodra at gmail.com 2013-11-26 01:56:44 PST ---
Not sure if druntime or phobos problem.
//----
import std.stdio;
class Foo{}
void main()
{
immutable(Foo) a;
writeln(a);
}
//----
src\phobos\std\format.d(2619): Error: template instance
formatObject!(LockingTextWriter, immutable(Foo), char) does not match template
declaration formatObject(Writer, T, Char)(ref Writer w, ref T val, ref
FormatSpec!Char f) if (hasToString!(T, Char))
src\phobos\std\format.d(3056): Error: template instance
std.format.formatValue!(LockingTextWriter, immutable(Foo), char) error
instantiating
src\phobos\std\format.d(427): instantiated from here:
formatGeneric!(LockingTextWriter, immutable(Foo), char)
//----
The "root" problem seems related to
"https://d.puremagic.com/issues/show_bug.cgi?id=7879" : "toString" is not
const.
--
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