Why does the following give a linker error?

If I change static Note[0] empty; to static Note[] empty;, all is well. Or if I leave it as Note[0] empty; and don't use it in getNotes, all is well.

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 --version
DMD32 D Compiler v2.070.0
Windows 10

Reply via email to