[Issue 16319] New: std.experimental.allocator.make subtly wrong with nested classes
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Jul 24 13:50:51 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16319
Issue ID: 16319
Summary: std.experimental.allocator.make subtly wrong with
nested classes
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: lodovico at giaretart.net
CC: lodovico at giaretart.net
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.
--
More information about the Digitalmars-d-bugs
mailing list