www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7756] New: iota(const doubles) problem

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

           Summary: iota(const doubles) problem
           Product: D
           Version: unspecified
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc


--- Comment #0 from bearophile_hugs eml.cc 2012-03-23 16:11:31 PDT ---
This program compiles with no errors:

import std.range, std.array;
void main() {
    alias const int CC;
    array(iota(cast(CC)0, cast(CC)10, cast(CC)1));
}



While this:

import std.range, std.array;
void main() {
    alias const double CC;
    array(iota(cast(CC)0.0, cast(CC)10.0, cast(CC)1.0));
}


Gives with DMD 2.059head:

...\dmd2\src\phobos\std\array.d(55): Error: result[i] isn't mutable
test.d(4): Error: template instance std.array.array!(Result) error
instantiating

Elsewhere there is a bug report about array() of const items.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 23 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7756


irritate <irritate gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |irritate gmail.com


--- Comment #1 from irritate <irritate gmail.com> 2013-06-18 18:57:57 PDT ---
Issue does not occur for me on head revision, DMD v2.064.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 18 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7756


bearophile_hugs eml.cc changed:

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


--- Comment #2 from bearophile_hugs eml.cc 2013-06-19 02:44:25 PDT ---
(In reply to comment #1)
 Issue does not occur for me on head revision, DMD v2.064.

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