www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8585] New: iota(ubyte) problem

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

           Summary: iota(ubyte) problem
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



import std.range: iota;
void main() {
    auto r = iota(cast(ubyte)5);
}


DMD 2.061alpha gives:

...\dmd2\src\phobos\std\range.d(4732): Error: cannot implicitly convert
expression (cast(int)this.pastLast - 1) of type int to inout(ubyte)
...\dmd2\src\phobos\std\range.d(4767): Error: template instance
std.range.iota!(ubyte,ubyte) error instantiating
test.d(3):        instantiated from here: iota!(ubyte)
test.d(3): Error: template instance std.range.iota!(ubyte) error instantiating

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Aug 25 2012
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8585


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

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



12:57:54 PST ---
*** This issue has been marked as a duplicate of issue 8920 ***

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