[Issue 5683] Calling .clear on a fresh associative array causes	subsequent segfault
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Mon Apr  4 12:19:05 PDT 2011
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=5683
Iain Buclaw <ibuclaw at ubuntu.com> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw at ubuntu.com
--- Comment #1 from Iain Buclaw <ibuclaw at ubuntu.com> 2011-04-04 12:15:29 PDT ---
This is a horrible bug with .init, and nothing to do with .clear.
Same code but without the external call:
void main() {
  int[char] test;
  test = typeof(test).init;
  test['x'] = 42;
}
What seems to be happening is that the address of the constructor is being
assigned (ie: test = &test_init) when it should *really* be a direct
assignment.
-- 
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