www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11681] New: std.datetime.IntervalRange.opAssign with non-ref parameter is required

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

           Summary: std.datetime.IntervalRange.opAssign with non-ref
                    parameter is required
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: electrolysis.jp+d gmail.com


--- Comment #0 from e10s <electrolysis.jp+d gmail.com> 2013-12-04 18:21:08 JST
---
import std.datetime;

void main(){
    auto interval1 = Interval!Date(Date(2013, 1, 1), Date(2013, 1, 4));
    auto interval2 = Interval!Date(Date(2014, 2, 1), Date(2014, 2, 4));

    auto range1 = interval1.fwdRange(a => a + 1.days);
    auto range2 = interval2.fwdRange(a => a + 1.days);

    range1 = range2; // ok
    range1 = range2.save; // compilation error
    // range1 = interval2.fwdRange(a => a + 2.days); // compilation error
}

----

This code causes the following compilation error:

 foo.d(11): Error: function std.datetime.IntervalRange!(Date, cast(Direction)1)
 .IntervalRange.opAssign (ref IntervalRange!(Date, cast(Direction)1) rhs) is
not callable
 using argument types (IntervalRange!(Date, cast(Direction)1))

The same problem will occur in PosInfIntervalRange and NegInfIntervalRange.
Due to this, IntervalRange can't be passed to std.algorithm.map.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 04 2013
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11681



--- Comment #1 from e10s <electrolysis.jp+d gmail.com> 2013-12-09 01:44:55 JST
---
Pull Request:
https://github.com/D-Programming-Language/phobos/pull/1758

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 08 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11681



--- Comment #2 from github-bugzilla puremagic.com 2013-12-13 03:37:48 PST ---
Commit pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/6e7b79bed3a6239ddeb0f21b2ad6e45276bb976a
Merge pull request #1758 from e10s/issue11681

Fix Issue 11681 - std.datetime.IntervalRange.opAssign with non-ref parameter is
required

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 13 2013
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11681


e10s <electrolysis.jp+d 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: -------
Dec 13 2013