[Issue 5730] New: Error: variable has scoped destruction, cannot build closure
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Mar 11 10:25:22 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5730
Summary: Error: variable has scoped destruction, cannot build
closure
Product: D
Version: D2
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: samukha at voliacable.com
--- Comment #0 from Max Samukha <samukha at voliacable.com> 2011-03-11 10:22:17 PST ---
The below should compile without errors:
struct S
{
~this()
{
}
}
void main()
{
S s;
enum error = __traits(compiles, { auto s1 = s; }));
static assert(!error); // line 1
}
----
Error: static assert (!true) is false
Comment out "line 1" to get the error that explains the problem:
Error: variable test.main.s has scoped destruction, cannot build closure
--
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