[Issue 5950] Linker problem with AA.get()

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jun 18 09:35:52 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5950


Rainer Schuetze <r.sagitario at gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |r.sagitario at gmx.de


--- Comment #2 from Rainer Schuetze <r.sagitario at gmx.de> 2011-06-18 09:31:05 PDT ---
This seems to happen when there is an identical associative array declared in
an imported file, but that is not used to generate code from. Obviously dmd
believes it does not need to generate the template code again. Here's a reduced
test case:

-----
module test1;
int[string] map;

-----
module test2;
import test1;

int main()
{
    int[string] m;
    return m.keys.length;
}
-----

compiling this with "dmd test2.d" with the latest compiler from github yields

OPTLINK (R) for Win32  Release 8.00.11
Copyright (C) Digital Mars 1989-2010  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
test2.obj(test2)
 Error 42: Symbol Undefined
_D6object28__T16AssociativeArrayTAyaTiZ16Associative
Array4keysMFNdZAAya
--- errorlevel 1

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list