[Issue 1304] New: Exception breakage for associative arrays...

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Jul 1 15:23:03 PDT 2007


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

           Summary: Exception breakage for associative arrays...
           Product: DGCC aka GDC
           Version: unspecified
          Platform: All
               URL: http://rafb.net/p/fwGGd787.html
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: glue layer
        AssignedTo: dvdfrdmn at users.sf.net
        ReportedBy: schittenden at mac.com


Simple test case for an exception causes gdc to err out.


### BEGIN code
import std.stdint;

class Test1 {
public:
  void add(uint32_t i)
  body {
    try {
      uint val = my_hash[i];
    } catch (Exception e) {
      my_hash[i] = p++;
    } finally {
      // Do nothing
    }
  }

private:
  uint32_t[uint32_t] my_hash;
  uint32_t p = 0;
}

void main() {
  Test1 t = new Test1;
  t.add(1);
}
### END snippet


-- 



More information about the D.gnu mailing list