According to Phobos object docs: uint flags(); Get flags for type: 1 means GC should scan for pointers This is implemented correctly. import std.stdio; void main() { writefln(typeid(uint).flags & 1); //0 writefln(typeid(uint*).flags & 1); //1 writefln(typeid(void*).flags & 1); //1 writefln(typeid(float).flags & 1); //0 } However, source code to setTypeInfo: void setTypeInfo(TypeInfo ti, void* p) { if (ti.flags() & 1) hasNoPointers(p); else hasPointers(p); } The if statement in this code is clearly backwards.
No longer relevant to D2, but should still be fixed in D1.
Commit pushed to phobos-1.x at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/e13d211422f71a681f08bf28df2c54bd7bf9dc88 fix Issue 2328 - setTypeInfo in gc.d backwards.