www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11945] New: LockingTextWriter fails with repeat

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11945

           Summary: LockingTextWriter fails with repeat
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: tobias pankrath.net


--- Comment #0 from Tobias Pankrath <tobias pankrath.net> 2014-01-18 10:26:27
PST ---
stdout.lockingTextWriter().put(repeat("#", 12));


/usr/include/dlang/dmd/std/stdio.d(1546): Error: no property 'ptr' for type
'Take!(Repeat!char)'
test.d(6): Error: template instance
std.stdio.File.LockingTextWriter.put!(Take!(Repeat!char)) error instantiating

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 18 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11945


Peter Alexander <peter.alexander.au gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |peter.alexander.au gmail.co
                   |                            |m


--- Comment #1 from Peter Alexander <peter.alexander.au gmail.com> 2014-01-27
13:09:09 PST ---
I get a different error for that.

Are you sure the error doesn't correspond to this call?

stdout.lockingTextWriter().put(repeat('#', 12));

(Note '#' vs "#")

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 27 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11945



--- Comment #2 from github-bugzilla puremagic.com 2014-02-15 04:47:57 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/5dbb6539e3bce241ccea886ebef9ad1f4e201020
Fix Issue 11945 - LockingTextWriter.put

The function just had sloppy constraints while assuming it was a string. This
fixes it up and adds some basic unit tests.

https://d.puremagic.com/issues/show_bug.cgi?id=11945

https://github.com/D-Programming-Language/phobos/commit/2b558a95f21cfd6a3b6db7d45916a11a8a828798
Merge pull request #1887 from Poita/bug11945

Fix Issue 11945 - LockingTextWriter.put

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 15 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11945


Peter Alexander <peter.alexander.au gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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