digitalmars.D.bugs - [Issue 7476] New: Write(ln) functions no longer accept retro range
- d-bugmail puremagic.com (37/37) Feb 09 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7476
- d-bugmail puremagic.com (30/30) Feb 10 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7476
- d-bugmail puremagic.com (7/7) Feb 10 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7476
- d-bugmail puremagic.com (10/12) Feb 10 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7476
- d-bugmail puremagic.com (12/12) Feb 10 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7476
- d-bugmail puremagic.com (8/11) Feb 10 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7476
- d-bugmail puremagic.com (11/11) Feb 10 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7476
- d-bugmail puremagic.com (46/46) Feb 10 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7476
- d-bugmail puremagic.com (10/10) Feb 10 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7476
- d-bugmail puremagic.com (10/10) Feb 17 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7476
- d-bugmail puremagic.com (9/9) Feb 18 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7476
- d-bugmail puremagic.com (10/10) Feb 18 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7476
- d-bugmail puremagic.com (10/10) Feb 18 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7476
http://d.puremagic.com/issues/show_bug.cgi?id=7476 Summary: Write(ln) functions no longer accept retro range Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: regression Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: dmitry.olsh gmail.com 12:06:31 PST --- import std.stdio, std.range; void main() { write(retro("abcd")); } Dmd outputs: std\range.d(295): Error: static assert "Cannot put a Result into a LockingTextWriter" std\format.d(1509): instantiated from here: put!(LockingTextWriter,Result) std\format.d(1984): instantiated from here: formatRange!(LockingTextWriter,Result,char) std\format.d(2228): instantiated from here: formatValue!(LockingTextWriter,Result,char) std\format.d(319): instantiated from here: formatGeneric!(LockingTextWriter,Result,char) std\stdio.d(684): instantiated from here: formattedWrite!(LockingTextWriter,char,Result) std\stdio.d(1503): instantiated from here: write!(Result) retro.d(5): instantiated from here: write!(Result) This worked on 2.057. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 09 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7476 Kevin <kevin brogan.ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kevin brogan.ca Works for me. Windows 7 64bit - Service Pack 1 C:\Users\Kevin\Documents\D Projects\ConsoleApp1\ConsoleApp1\bin>where dmd C:\D\dmd\windows\bin\dmd.exe C:\D\dmd2\windows\bin\dmd.exe C:\Users\Kevin\Documents\D Projects\ConsoleApp1\ConsoleApp1\bin>C:\D\dmd2\windows\bin\dmd.exe ..\main.d C:\Users\Kevin\Documents\D Projects\ConsoleApp1\ConsoleApp1\bin>main.exe dcba C:\Users\Kevin\Documents\D Projects\ConsoleApp1\ConsoleApp1\bin>type ..\main.d import std.stdio, std.range; void main() { write(retro("abcd")); } C:\Users\Kevin\Documents\D Projects\ConsoleApp1\ConsoleApp1\bin>C:\D\dmd2\windows\bin\dmd.exe DMD32 D Compiler v2.057 Copyright (c) 1999-2011 by Digital Mars written by Walter Bright Documentation: http://www.digitalmars.com/d/2.0/index.html Usage: --- truncate --- -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 10 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7476 Wait, I'm confused. You said it works on 2.057 (which I can confirm). What version is it not working on? 2.057 is the latest. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 10 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7476 Jonathan M Davis <jmdavisProg gmx.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jmdavisProg gmx.com PST ---Wait, I'm confused. You said it works on 2.057 (which I can confirm). What version is it not working on? 2.057 is the latest.The latest on github (and the current 2.058 beta). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 10 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7476 Just downloaded the git source and compiled with dmc Works for me on latest version. 2.048 Beta c:\Users\Kevin\Documents\D Projects\ConsoleApp1\ConsoleApp1\bin>dmd ../main.d DMD v2.058 DEBUG c:\Users\Kevin\Documents\D Projects\ConsoleApp1\ConsoleApp1\bin>main.exe dcba c:\Users\Kevin\Documents\D Projects\ConsoleApp1\ConsoleApp1\bin> -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 10 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7476 I've got to stop typing at 2 in the morning... I mean 2.058 Debug, as shown in the console dump.Just downloaded the git source and compiled with dmc Works for me on latest version. 2.048 Beta-- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 10 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7476 timon.gehr gmx.ch changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |timon.gehr gmx.ch I think it is a regression in Phobos. Have you compiled against Phobos 2.057 or Phobos 2.058head? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 10 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7476 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|nobody puremagic.com |andrei metalanguage.com A shallow answer: 2.058 was merged a pull to improve std.format: https://github.com/D-Programming-Language/phobos/pull/298 and after that this regression has been occurred. A deep answer: This is a problem rooted in the std.range.put implementation. reduced code: ---- import std.range; struct LockingTextWriter { void put(dchar c){} } struct RetroResult { bool end = false; property bool empty() const { return end; } property dchar front(){ return 'a'; } void popFront(){ end = true; } } void main() { LockingTextWriter w; RetroResult r; put(w, r); // test.d(20) } Output: ---- C:\dmd2\src\phobos\std\range.d(295): Error: static assert "Cannot put a RetroResult into a LockingTextWriter" test.d(20): instantiated from here: put!(LockingTextWriter,RetroResult) Current std.format.formatValue treats retro("abcd") as a kind of string range. And try to put it into Writer by using std.range.put(). void put(R, E)(ref R r, E e) // std.range.put signature When E is an array (of cause it is random access range), put() runs the range-to-range copy. But put() cannot instantiate with E that isn't array range. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 10 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7476 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |pull https://github.com/D-Programming-Language/phobos/pull/426 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 10 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7476 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |simendsjo gmail.com *** Issue 7531 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 17 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7476 Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/3a03376c7d6b8b5b998aa5c3e0dfd9837e3198dc Issue 7476 - Write(ln) functions no longer accept retro range -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 18 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7476 Yao Gomez <yao.gomez gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |yao.gomez gmail.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 18 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7476 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bearophile_hugs eml.cc --- *** Issue 7433 has been marked as a duplicate of this issue. *** -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 18 2012