digitalmars.D.learn - Struct destructor in a with block
- Tofu Ninja (24/24) Feb 02 2015 module main;
- =?UTF-8?B?QWxpIMOHZWhyZWxp?= (8/32) Feb 02 2015 Yes, it's a known bug that has been fixed on git head but I can't find
- Tofu Ninja (3/10) Feb 02 2015 Yeah, i noticed the typo right after I posted...
module main; import std.stdio; void main(string[] args) { with(test()) { foo(); } } struct test { void foo() { writeln("foo"); } ~this() { writeln("destoy"); } } prints: destroy foo Is this a bug?
Feb 02 2015
On 02/02/2015 07:51 PM, Tofu Ninja wrote:module main; import std.stdio; void main(string[] args) { with(test()) { foo(); } } struct test { void foo() { writeln("foo"); } ~this() { writeln("destoy"); } } prints: destroy foo Is this a bug?Yes, it's a known bug that has been fixed on git head but I can't find the bug report. :-/ The new output: foo destoy Yes, without the 'r'. ;) Ali
Feb 02 2015
On Tuesday, 3 February 2015 at 05:09:55 UTC, Ali Çehreli wrote:Yes, it's a known bug that has been fixed on git head but I can't find the bug report. :-/Ok cool, good to know.The new output: foo destoy Yes, without the 'r'. ;) AliYeah, i noticed the typo right after I posted...
Feb 02 2015