www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12539] New: Compiler crash when looking up a nonexistent tuple element in an associative array

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

           Summary: Compiler crash when looking up a nonexistent tuple
                    element in an associative array
           Product: D
           Version: unspecified
          Platform: x86_64
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: gamecubic hotmail.com


--- Comment #0 from gamecubic hotmail.com 2014-04-07 11:29:30 PDT ---
Happens on Windows 7 x86_64 with DMD 2.065

Does not happen on DPaste

```
template Tuple (E...)
{
    alias Tuple = E;
}

void main ()
{
    // Would be a string tuple.
    alias Foo = Tuple!();
    int[string] map = [];

    auto a = map[Foo[0]];
}
```

I would expect a build failure (as happens on DPaste), but not a compiler
crash.

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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice, pull
           Platform|x86_64                      |All
            Version|unspecified                 |D2
         OS/Version|Windows                     |All


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2014-04-07 18:23:21 PDT ---
https://github.com/D-Programming-Language/dmd/pull/3435

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



--- Comment #2 from github-bugzilla puremagic.com 2014-04-08 04:55:34 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/8f70c6f23c8d615affd73e1a23fcb32ef5ddea59
fix Issue 12539 - Compiler crash when looking up a nonexistent tuple element in
an associative array

https://github.com/D-Programming-Language/dmd/commit/3001fb407685e05f68e49742ef43192cf692ee97
Merge pull request #3435 from 9rnsr/fix12539

Issue 12539 - Compiler crash when looking up a nonexistent tuple element in an
associative array

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


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: -------
Apr 08 2014