[Issue 7763] No template instantiation backtrace printed trying to use writefln on a const or immutable object reference

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Dec 26 16:28:12 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7763


Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |andrej.mitrovich at gmail.com
         Resolution|                            |FIXED


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2012-12-26 16:28:09 PST ---
Seems fixed in 2.060:

--------
D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\format.d(2158): Error: template
instance formatObject!(LockingTextWriter,const(Object),char)
formatObject!(LockingTextWriter,const(Object),char) does not match template
declaration formatObject(Writer,T,Char) if (hasToString!(T,Char))
D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\format.d(2158): Error: function
expected before (), not formatObject!(LockingTextWriter,const(Object),char) of
type void
D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\format.d(2572): Error: template
instance std.format.formatValue!(LockingTextWriter,const(Object),char) error
instantiating
D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\format.d(398):        instantiated
from here: formatGeneric!(LockingTextWriter,const(Object),char)
D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\stdio.d(728):        instantiated
from here: formattedWrite!(LockingTextWriter,char,const(Object))
D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\stdio.d(1711):        instantiated
from here: writefln!(string,const(Object))
test.d(5):        instantiated from here: writefln!(string,const(Object))
test.d(10):        instantiated from here: Set!(const(Object))
D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\format.d(398): Error: template
instance std.format.formatGeneric!(LockingTextWriter,const(Object),char) error
instantiating
D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\stdio.d(728):        instantiated
from here: formattedWrite!(LockingTextWriter,char,const(Object))
D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\stdio.d(1711):        instantiated
from here: writefln!(string,const(Object))
test.d(5):        instantiated from here: writefln!(string,const(Object))
test.d(10):        instantiated from here: Set!(const(Object))
D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\stdio.d(728): Error: template
instance std.format.formattedWrite!(LockingTextWriter,char,const(Object)) error
instantiating
D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\stdio.d(1711):        instantiated
from here: writefln!(string,const(Object))
test.d(5):        instantiated from here: writefln!(string,const(Object))
test.d(10):        instantiated from here: Set!(const(Object))
D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\stdio.d(1711): Error: template
instance std.stdio.File.writefln!(string,const(Object)) error instantiating
test.d(5):        instantiated from here: writefln!(string,const(Object))
test.d(10):        instantiated from here: Set!(const(Object))
test.d(5): Error: template instance std.stdio.writefln!(string,const(Object))
error instantiating
test.d(10):        instantiated from here: Set!(const(Object))
test.d(10): Error: template instance test.Set!(const(Object)) error
instantiating
--------

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list