<div dir="ltr">Greetings<div><br></div><div>Consider the following code ...</div><div><br></div><div><div><div><font face="courier new, monospace">class Foo {<span class="" style="white-space:pre">                       </span>// 1</font></div>

<div><font face="courier new, monospace">  void foo() {<span class="" style="white-space:pre">                  </span>// 2</font></div><div><font face="courier new, monospace">    bar();<span class="" style="white-space:pre">                    </span>// 3</font></div>

<div><font face="courier new, monospace">    this.bar();<span class="" style="white-space:pre">                 </span>// 4</font></div><div><font face="courier new, monospace">  }<span class="" style="white-space:pre">                           </span>// 5</font></div>

<div><font face="courier new, monospace">}<span class="" style="white-space:pre">                               </span>// 6</font></div><div><font face="courier new, monospace">void bar(Foo f) {<span class="" style="white-space:pre">             </span>// 7</font></div>

<div><font face="courier new, monospace">  import std.stdio;<span class="" style="white-space:pre">             </span>// 8</font></div><div><font face="courier new, monospace">  writeln("This bar");<span class="" style="white-space:pre">              </span>// 9</font></div>

<div><font face="courier new, monospace">}<span class="" style="white-space:pre">                               </span>// 10</font></div><div><font face="courier new, monospace">void main() {<span class="" style="white-space:pre">                        </span>// 11</font></div>

<div><font face="courier new, monospace">  Foo test = new Foo;<span class="" style="white-space:pre">           </span>// 12</font></div><div><font face="courier new, monospace">  test.foo();<span class="" style="white-space:pre">                        </span>// 13</font></div>

<div><font face="courier new, monospace">}<span class="" style="white-space:pre">                               </span>// 14</font></div></div></div><div><br></div><div style>DMD is fine with line 4 because of UCFS. But it gives an error for line 3 because it does not get this pointer to bind as argument.</div>

<div style><br></div><div style>I want to know if it is a DMD bug or whether line 3 would be compilable at some point in future.</div><div style><br></div><div style>Regards</div><div style>- Puneet</div><div style><br></div>

</div>