[Issue 5171] @disable doesn't work on opEquals functions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Nov 5 11:01:33 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5171
Steven Schveighoffer <schveiguy at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |schveiguy at yahoo.com
Resolution| |INVALID
--- Comment #1 from Steven Schveighoffer <schveiguy at yahoo.com> 2010-11-05 11:00:33 PDT ---
This isn't actually possible. What I would suggest is the compiler failing to
compile your class instead, because you can't disable a base function.
If for example, you have a function like this:
bool foo(Object o1, Object o2) {...}
Then would it be safe to assume that you could pass both a and b to foo? If
so, then isn't it possible for foo to call o1 == o2? And how could the
compiler possibly statically disable this?
I'm going to mark it as invalid, and if you think you'd rather have the
behavior where @disable doesn't compile on overridden functions, then you can
reopen with that description.
--
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