<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=windows-1252" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18876">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face="Courier New">I did not get an error when building and
running with DMD 2.042:</FONT></DIV>
<DIV><FONT size=2 face="Courier New"></FONT> </DIV>
<DIV><FONT size=2 face="Courier New">import std.stdio;</FONT></DIV>
<DIV> </DIV><FONT size=2 face="Courier New">
<DIV><BR>class A {<BR> int x, y;</DIV>
<DIV> </DIV>
<DIV> void copy (in A a) {<BR> x =
a.x;<BR> y = a.y;<BR> }</DIV>
<DIV> </DIV>
<DIV> void dump (string s) {<BR> writefln( "%s.A = { %s,
%s }", s, x, y);<BR> }<BR>}</DIV>
<DIV> </DIV>
<DIV>class B : A {<BR> int z;</DIV>
<DIV> </DIV>
<DIV> void copy (in B b) {<BR> super.copy(
b);<BR> z = b.z;<BR> }</DIV>
<DIV> </DIV>
<DIV> void dump (string s) {<BR> super.dump(
s);<BR> writefln( "%s.B = { %s }", s, z);<BR>
}<BR>}</DIV>
<DIV> </DIV>
<DIV><BR>void main () {<BR> B foo = new B;<BR> B bar = new B;</DIV>
<DIV> </DIV>
<DIV> foo.x = 3;<BR> foo.y = 5;<BR> foo.z = 17;</DIV>
<DIV> </DIV>
<DIV> bar.x = 7;<BR> bar.y = 11;<BR> bar.z = 13;</DIV>
<DIV> </DIV>
<DIV> foo.dump( "foo");<BR> bar.dump( "bar");</DIV>
<DIV> </DIV>
<DIV> bar.copy( foo);<BR> bar.dump( "bar#2");<BR>}</DIV>
<DIV> </DIV>
<DIV>Which prints:</DIV>
<DIV><BR>foo.A = { 3, 5 }<BR>foo.B = { 17 }<BR>bar.A = { 7, 11 }<BR>bar.B = { 13
}<BR>bar#2.A = { 3, 5 }<BR>bar#2.B = { 17 }<BR></FONT></DIV></BODY></HTML>