[Issue 7476] Write(ln) functions no longer accept retro range
http://d.puremagic.com/issues/show_bug.cgi?id=7476 --- Comment #10 from github-bugzi...@puremagic.com 2012-02-18 10:47:07 PST --- Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/3a03376c7d6b8b5b998aa5c3e0dfd9837e3198dc Merge pull request #426 from 9rnsr/fix7476 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: ---
[Issue 7476] Write(ln) functions no longer accept retro range
http://d.puremagic.com/issues/show_bug.cgi?id=7476 Yao Gomez yao.go...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC||yao.go...@gmail.com Resolution||FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7476] Write(ln) functions no longer accept retro range
http://d.puremagic.com/issues/show_bug.cgi?id=7476 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added CC||bearophile_h...@eml.cc --- Comment #11 from Kenji Hara k.hara...@gmail.com 2012-02-18 22:43:55 PST --- *** 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: ---
[Issue 7476] Write(ln) functions no longer accept retro range
http://d.puremagic.com/issues/show_bug.cgi?id=7476 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added CC||simend...@gmail.com --- Comment #9 from Kenji Hara k.hara...@gmail.com 2012-02-17 07:13:24 PST --- *** 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: ---
[Issue 7476] Write(ln) functions no longer accept retro range
http://d.puremagic.com/issues/show_bug.cgi?id=7476 Kevin ke...@brogan.ca changed: What|Removed |Added CC||ke...@brogan.ca --- Comment #1 from Kevin ke...@brogan.ca 2012-02-10 00:34:41 PST --- Works for me. Windows 7 64bit - Service Pack 1 C:\Users\Kevin\Documents\D Projects\ConsoleApp1\ConsoleApp1\binwhere dmd C:\D\dmd\windows\bin\dmd.exe C:\D\dmd2\windows\bin\dmd.exe C:\Users\Kevin\Documents\D Projects\ConsoleApp1\ConsoleApp1\binC:\D\dmd2\windows\bin\dmd.exe ..\main.d C:\Users\Kevin\Documents\D Projects\ConsoleApp1\ConsoleApp1\binmain.exe dcba C:\Users\Kevin\Documents\D Projects\ConsoleApp1\ConsoleApp1\bintype ..\main.d import std.stdio, std.range; void main() { write(retro(abcd)); } C:\Users\Kevin\Documents\D Projects\ConsoleApp1\ConsoleApp1\binC:\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: ---
[Issue 7476] Write(ln) functions no longer accept retro range
http://d.puremagic.com/issues/show_bug.cgi?id=7476 --- Comment #2 from Kevin ke...@brogan.ca 2012-02-10 00:38:30 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. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---
[Issue 7476] Write(ln) functions no longer accept retro range
http://d.puremagic.com/issues/show_bug.cgi?id=7476 Jonathan M Davis jmdavisp...@gmx.com changed: What|Removed |Added CC||jmdavisp...@gmx.com --- Comment #3 from Jonathan M Davis jmdavisp...@gmx.com 2012-02-10 00:43:32 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: ---
[Issue 7476] Write(ln) functions no longer accept retro range
http://d.puremagic.com/issues/show_bug.cgi?id=7476 --- Comment #4 from Kevin ke...@brogan.ca 2012-02-10 02:00:32 PST --- 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\bindmd ../main.d DMD v2.058 DEBUG c:\Users\Kevin\Documents\D Projects\ConsoleApp1\ConsoleApp1\binmain.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: ---
[Issue 7476] Write(ln) functions no longer accept retro range
http://d.puremagic.com/issues/show_bug.cgi?id=7476 --- Comment #5 from Kevin ke...@brogan.ca 2012-02-10 02:04:28 PST --- I've got to stop typing at 2 in the morning... I mean 2.058 Debug, as shown in the console dump. (In reply to comment #4) 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: ---
[Issue 7476] Write(ln) functions no longer accept retro range
http://d.puremagic.com/issues/show_bug.cgi?id=7476 timon.g...@gmx.ch changed: What|Removed |Added CC||timon.g...@gmx.ch --- Comment #6 from timon.g...@gmx.ch 2012-02-10 04:22:52 PST --- 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: ---
[Issue 7476] Write(ln) functions no longer accept retro range
http://d.puremagic.com/issues/show_bug.cgi?id=7476 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added AssignedTo|nob...@puremagic.com|and...@metalanguage.com --- Comment #7 from Kenji Hara k.hara...@gmail.com 2012-02-10 04:55:04 PST --- 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: ---
[Issue 7476] Write(ln) functions no longer accept retro range
http://d.puremagic.com/issues/show_bug.cgi?id=7476 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #8 from Kenji Hara k.hara...@gmail.com 2012-02-10 05:08:10 PST --- 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: ---