<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
i agree, it should be at least a warning for shadowing non-private
fields of the super class.<br>
<br>
<br>
sa schrieb:
<blockquote cite="mid:f9q9lo$2lqs$1@digitalmars.com" type="cite">
  <pre wrap="">== Quote from name (<a class="moz-txt-link-abbreviated" href="mailto:someanon@yahoo.com)'s">someanon@yahoo.com)'s</a> article
  </pre>
  <blockquote type="cite">
    <pre wrap=""><a class="moz-txt-link-freetext" href="http://d.puremagic.com/issues/show_bug.cgi?id=1419">http://d.puremagic.com/issues/show_bug.cgi?id=1419</a>
Description:  [reply]           Opened: 2007-08-13 13:24
dupdefbug.d:
================================
class A {
  int attr;
}
class B : A {
  int attr;
}
================================
$ dmd.exe -c dupdefbug.d
no error reported.
It should report B.attr is dup of A.attr.
------- Comment #1 From Walter Bright 2007-08-13 13:34 [reply] -------
Why should it be an error? Fields are not accessed virtually, so there is no
hijacking problem. The current behavior is as designed.
If you feel it should be changed, please start a thread in digitalmars.D and
present the case.
==================================================================
I think 90% of the time this happens it is a bug, not by the programmer's
intention.
If it's designed to be so in D, I propose to change it; or at least reported
by the compiler.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
This is particularly true in a large system where multiple people working on it,
the programmer may simply forget what's defined in the super class; and when this
 cause a program error (most of the time to the programmer's surpise), it may took
several hours to find.

Since Walter want to discuss this issue on this NG, audience pleaes air your voice.
  </pre>
</blockquote>
</body>
</html>