D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7655 - scope class instantiations not supported in CTFE
Summary: scope class instantiations not supported in CTFE
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 enhancement
Assignee: No Owner
URL:
Keywords: CTFE
Depends on:
Blocks:
 
Reported: 2012-03-06 04:48 UTC by Martin Nowak
Modified: 2019-07-28 12:28 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Martin Nowak 2012-03-06 04:48:05 UTC
cat > bug.d << CODE
int foo()
{
    scope obj = new Object;
    return 1;
}

enum v = foo();
CODE

dmd -c bug
--------
Error: Cannot interpret delete obj at compile time
--------
Comment 1 Don 2012-03-07 00:57:14 UTC
Arguably a duplicate of bug 6907.
Comment 2 Mathias LANG 2019-07-28 12:28:37 UTC
This compiles with 2.086.0