<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 12 Jun 2013, at 13:33, Bart wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Monaco; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: monospace; ">On 6/12/13, Jonas Maebe <<a href="mailto:jonas.maebe@elis.ugent.be">jonas.maebe@elis.ugent.be</a>> wrote:<br><br><blockquote type="cite">So that it would still have the same behaviour if you changed the variable<br></blockquote><blockquote type="cite">declaration to<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">var<br></blockquote><blockquote type="cite"> FooChild: TFoo;<br></blockquote><br>If I change FooChild to TFoo (and instantiate with TFoo.Create) the<br></span></span></blockquote><div><br></div><div>Now change the variable type to TFoo but keep instantiating it using TFooChild.Create (like I originally suggested). Having that work is the whole point of polymorphism and why virtual/override exist.</div><div><br></div><div><br></div><div>Jonas</div></div></body></html>