[Issue 3581] "private" attribute breaks "override"
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri May 6 23:41:47 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=3581
--- Comment #15 from Rainer Schuetze <r.sagitario at gmx.de> 2011-05-06 23:37:50 PDT ---
(In reply to comment #13)
> See proposed patch and problems with patch:
>
> https://github.com/donc/dmd/commit/9f7b2f8cfe5d7482f2de7f9678c176d54abe237f#commitcomment-321724
Copying my comment on github for better visibility:
As I happen to have the patch installed, I stumbled over this problem today
when running the unittests. The problem is that the "override" sets the
attribute for the complete mixin, including auto-implemented constructors.
Here's a patch that moves the override attribute to each generated function if
it is not a constructor:
diff --git a/std/typecons.d b/std/typecons.d
index e0868b0..979b1d1 100644
--- a/std/typecons.d
+++ b/std/typecons.d
@@ -1593,7 +1593,7 @@ class AutoImplement(Base, alias how, alias what =
isAbstractFunction) : Base
private alias AutoImplement_Helper!(
"autoImplement_helper_", "Base", Base, how, what )
autoImplement_helper_;
- override mixin(autoImplement_helper_.code);
+ mixin(autoImplement_helper_.code);
}
/*
@@ -2081,6 +2081,8 @@ private static:
enum storageClass = make_storageClass();
//
+ if(isAbstractFunction!func)
+ code ~= "override ";
code ~= Format!("extern(%s) %s %s(%s) %s %s\n",
functionLinkage!(func),
returnType,
--
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