www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12177] New: inout(Cycle!(string[2])) implicit cast problem

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

           Summary: inout(Cycle!(string[2])) implicit cast problem
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc


--- Comment #0 from bearophile_hugs eml.cc 2014-02-15 03:32:49 PST ---
I think this used to work until recently:


void main() {
    import std.range;
    foreach (s; recurrence!q{a[n - 1] ~ a[n - 2]}("1", "0")) {}
}


With DMD 2.065beta3 gives:

..\dmd2\src\phobos\std\range.d(4424,21): Error: cannot implicitly convert
expression ((nothrow Cycle!(string[2]) __ctmp1475 = 0;

 , __ctmp1475).this(*cast(string[2]*)this._ptr, this._index + i)) of type
Cycle!(string[2]) to inout(Cycle!(string[2]))

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


Vladimir Panteleev <thecybershadow gmail.com> changed:

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


--- Comment #1 from Vladimir Panteleev <thecybershadow gmail.com> 2014-02-15
19:22:51 EET ---
Introduced in https://github.com/D-Programming-Language/dmd/pull/3085

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



--- Comment #2 from Vladimir Panteleev <thecybershadow gmail.com> 2014-02-17
08:05:11 EET ---
Not sure how I got the above result. I'm getting a different one, and this one
makes more sense:
https://github.com/D-Programming-Language/phobos/pull/1835

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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
                 CC|                            |andrej.mitrovich gmail.com


--- Comment #3 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2014-02-17
02:11:50 PST ---
https://github.com/D-Programming-Language/phobos/pull/1950

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



--- Comment #4 from github-bugzilla puremagic.com 2014-02-17 22:59:42 PST ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/b770bddcaf4eed175461a0d0b982c76a3ca20f1e
Merge pull request #1950 from AndrejMitrovic/Fixup1835

Issue 12177 (regression) -  inout(Cycle!(string[2])) implicit cast problem

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


Andrej Mitrovic <andrej.mitrovich 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 17 2014