[Issue 5171] Prevent compiling of class when @disable is used on an overriding function

2020-03-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5171

Basile-z  changed:

   What|Removed |Added

 CC|b2.t...@gmx.com |

--


[Issue 5171] Prevent compiling of class when @disable is used on an overriding function

2017-02-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5171

b2.t...@gmx.com changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 CC||b2.t...@gmx.com
 Resolution|--- |DUPLICATE

--- Comment #5 from b2.t...@gmx.com ---


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

--


[Issue 5171] Prevent compiling of class when @disable is used on an overriding function

2010-11-09 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=5171


Jesse Phillips  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |
Summary|@disable doesn't work on|Prevent compiling of class
   |opEquals functions  |when @disable is used on an
   ||overriding function
   Severity|normal  |enhancement


--- Comment #4 from Jesse Phillips  2010-11-09 
11:10:36 PST ---
class A {
   void hello() {
   }
}
class B : A {
   @disable override void hello() {
   }
}

void main() {
   auto a = new A();
   A b = new B();

   b.hello();
}

The compiler should not compile the class saying something to the effect of:
Can not disable method hello in base class A from B.
Or another suggestion "Cannot @disable overriding function hello in B"

Note that I think the code below should still compile:

class A {
   @disable void hello() {
   }
}
class B : A {
   override void hello() {
   }
}

void main() {
   auto a = new A();
   B b = new B();

   b.hello();
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---