<div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 24 Aug 2024 at 13:36, Walter Bright via Digitalmars-d <<a href="mailto:digitalmars-d@puremagic.com" target="_blank">digitalmars-d@puremagic.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The reason the inner class feature exists is to support translation from Java <br>
code which used inner classes. (It doesn't exist in C++.)<br>
<br>
Ok, so there is only one outer. This illustrates how confusing this example is <br>
(at least to me!)<br>
<br>
<br>
 > it is typed as the base type, and not as the derived type which was assigned <br>
on creation.<br>
<br>
It is indeed typed as the static type, not the dynamic type.<br>
<br>
I encourage you to submit it to bugzilla.<br>
<br>
I suggest just adding the Outer2 qualification, and move on. Or use an alternate <br>
method such as interfaces or aggregation.<br></blockquote><div><br></div><div>I logged a bug... and then after I did, I realised that I had already logged one before; so you've got 2 now! That should be twice the motivation to fix it ;)<br></div><div><br></div><div>I have moved on... but the reason I bring it up is because it's a cool advertised feature, and for the first time in my life, I had a situation where it seemed immensely useful!<br></div></div></div>