Bug 16319 – std.experimental.allocator.make subtly wrong with nested classes
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-07-24T20:50:00Z
Last change time
2016-10-01T11:46:45Z
Assigned to
nobody
Creator
lodovico
Comments
Comment #0 by lodovico — 2016-07-24T20:50:51Z
std.experimental.allocator.make does not initialize the implicit `this.outer` pointer of nested classes. After you find out, it is obvious that make cannot initialize it.
But it is subtle and may cause long hours of useless debugging to find it out.
make should either print a big red warning when used on a nested class or require an additional runtime argument to initialize the outer field with.
Comment #1 by github-bugzilla — 2016-08-16T04:21:41Z