mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-13 19:33:13 +01:00
the memory block as having pointers (for scanning) opposite of what it should. So pointers would not be seen and freed. Should fix a bunch of regressions with AAs.
21 lines
329 B
D
21 lines
329 B
D
// adapted from dstress.run.a.associative_array_19_<n> to catch regressions early
|
|
|
|
module mini.aa7;
|
|
|
|
extern (C) int printf(char*, ...);
|
|
extern (C) void gc_collect();
|
|
|
|
|
|
int main(){
|
|
char*[char] aa;
|
|
|
|
char key = 'a';
|
|
aa[key] = &key;
|
|
gc_collect();
|
|
assert(aa[key] == &key);
|
|
assert(key in aa);
|
|
|
|
return 0;
|
|
}
|
|
|