Thread overview
[Issue 11730] New: associative array with Nullable!SysTime values: Called `get' on null Nullable!SysTime.
Dec 12, 2013
Mario Kroeplin
Dec 14, 2013
Kenji Hara
Dec 15, 2013
Kenji Hara
December 12, 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11730

           Summary: associative array with Nullable!SysTime values: Called
                    `get' on null Nullable!SysTime.
           Product: D
           Version: D2
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: regression
          Priority: P2
         Component: Phobos
        AssignedTo: nobody@puremagic.com
        ReportedBy: kroeplin.d@googlemail.com


--- Comment #0 from Mario Kroeplin <kroeplin.d@googlemail.com> 2013-12-12 06:31:34 PST ---
The following program throws on D 2.064.2:

import std.datetime;
import std.typecons;

void main()
{
    Nullable!SysTime[string] map;

    map["foo"] = Nullable!SysTime();
}

core.exception.AssertError@.dvm/compilers/dmd-2.064.2/bin/../src/phobos/std/typecons.d(1233): Called `get' on null Nullable!SysTime.

It works on D 2.063.2.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 14, 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11730


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull, wrong-code
          Component|Phobos                      |DMD
         OS/Version|Linux                       |All


--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2013-12-14 09:37:33 PST ---
https://github.com/D-Programming-Language/dmd/pull/2961

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 15, 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11730



--- Comment #2 from github-bugzilla@puremagic.com 2013-12-14 22:53:33 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/123bd0d8cf14a32eb914761c3c415f37b520c912
fix Issue 11730 - associative array with Nullable!SysTime values: Called `get'
on null Nullable!SysTime

When I fixed bug 6178, I internally used `cast(void)exp)` to suppress
unexpected "has no side effect" error.

But, `CastExp` always try to resolve alias this of its operand to find most matching type to `void` via `Expression::castTo`. It should be disabled.

https://github.com/D-Programming-Language/dmd/commit/e6ffe6e50ffda444b4f4ec086f8149c55d74c933 Merge pull request #2961 from 9rnsr/fix11730

[REG2.064] Issue 11730 - associative array with Nullable!SysTime values: Called `get' on null Nullable!SysTime

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 15, 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11730


Kenji Hara <k.hara.pg@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: -------