[Issue 5115] std.typecons.scoped problems

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Dec 21 00:54:45 PST 2010


http://d.puremagic.com/issues/show_bug.cgi?id=5115



--- Comment #6 from bearophile_hugs at eml.cc 2010-12-21 00:52:48 PST ---
(In reply to comment #5)
> Isn't the problem rather that the type of f2 is Scoped!Foo, while the type of
> f1 is just Foo?  The compiler doesn't know that it should call the destructor
> of a Foo at the end of the scope.

You are probably right. Then why isn't this a compile error?

Foo f1 = scoped!Foo();

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list