digitalmars.D.bugs - [Issue 19129] New: std.typecons.scoped crashes when used on classes
- d-bugmail puremagic.com (23/23) Jul 30 2018 https://issues.dlang.org/show_bug.cgi?id=19129
https://issues.dlang.org/show_bug.cgi?id=19129 Issue ID: 19129 Summary: std.typecons.scoped crashes when used on classes that have context Product: D Version: D2 Hardware: All URL: http://dlang.org/ OS: All Status: NEW Severity: major Priority: P3 Component: phobos Assignee: nobody puremagic.com Reporter: eyal weka.io Example: int y; class C { this(int x) { y = x; } } import std.typecons: scoped; scoped!C(1); // crashes, as ctx.y segfaults when ctx remains null scoped should probably reject classes that have a "this" member (that aren't `static class`). --
Jul 30 2018