D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7486 - dmd 2.057 lose const qualifier with ref
Summary: dmd 2.057 lose const qualifier with ref
Status: RESOLVED DUPLICATE of issue 5493
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-12 07:30 UTC by deadalnix
Modified: 2012-02-12 09:17 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description deadalnix 2012-02-12 07:30:56 UTC
Sample code (this compile).

module dsfml.graphics.view;

struct Fail {
	void foobar() const {
		cppFoobar(this);
	}
}

void cppFoobar(ref Fail fail) {}

void main() {
	Fail f;
	f.foobar();
}

This program should trigger an error because of constness issue. It doesn't . tested with dmd 2.057 and gdc (4.7 - 2.057) as well.
Comment 1 timon.gehr 2012-02-12 08:02:07 UTC
Fixed in DMD 2.058head.
Comment 2 yebblies 2012-02-12 09:17:10 UTC

*** This issue has been marked as a duplicate of issue 5493 ***