[Issue 16129] New: Linker error when using zero length array
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Sun Jun  5 14:39:00 PDT 2016
    
    
  
https://issues.dlang.org/show_bug.cgi?id=16129
          Issue ID: 16129
           Summary: Linker error when using zero length array
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: fooleryt70 at gmail.com
struct Note
{
    string topic;
    string content;
}
class NoteStore
{    
    Note[][string] store;
    static Note[0] empty;
    Note[] getNotes(string id)
    {
        return (id in store) ? store[id] : empty;
    }    
}
void main() {}
dmd ns.d
 OPTLINK (R) for Win32  Release 8.00.17
 Copyright (C) Digital Mars 1989-2013  All rights reserved.
 http://www.digitalmars.com/ctg/optlink.html
 ns.obj(ns)  Offset 00678H Record Type 009D
  Error 16: Index Range
 --- errorlevel 1
dmd --version
DMD32 D Compiler v2.071.0
Copyright (c) 1999-2015 by Digital Mars written by Walter Bright
--
    
    
More information about the Digitalmars-d-bugs
mailing list