D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4316 - this(this) cannot become safe function.
Summary: this(this) cannot become safe function.
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: patch, rejects-valid
Depends on:
Blocks:
 
Reported: 2010-06-14 23:39 UTC by SHOO
Modified: 2011-12-20 23:22 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description SHOO 2010-06-14 23:39:56 UTC
This code doesn't work!

-------------------------------

struct A
{
	@safe this(this) { }
}

@safe void main()
{
	A a;
	auto b = a; // Error: safe function 'main' cannot call system function '__cpctor'
}