> as far as I can tell, it means exactly what it says, and I don't know how it could be friendlier.<br><div><br></div><div>the error message '<span style="font-size:13px;background-color:rgb(255,255,255);color:rgb(68,68,68);font-family:Menlo">declaration fun is already defined' </span>is surprising because '<span style="font-size:13px;font-family:Menlo;background-color:rgb(255,255,255);color:rgb(0,150,149)">void</span><span style="font-size:13px;font-family:Menlo;background-color:rgb(255,255,255);color:rgb(68,68,68)"> </span><span style="font-size:13px;font-family:Menlo;background-color:rgb(255,255,255);color:rgb(68,68,68)">fun</span><span style="font-size:13px;font-family:Menlo;background-color:rgb(255,255,255);color:rgb(68,68,68)">(</span><span style="font-size:13px;font-family:Menlo;background-color:rgb(255,255,255);color:rgb(0,150,149)">int</span><span style="font-size:13px;font-family:Menlo;background-color:rgb(255,255,255);color:rgb(68,68,68)"> </span><span style="font-size:13px;font-family:Menlo;background-color:rgb(255,255,255);color:rgb(68,68,68)">x</span><span style="font-size:13px;font-family:Menlo;background-color:rgb(255,255,255);color:rgb(68,68,68)">)</span><span style="font-size:13px;font-family:Menlo;background-color:rgb(255,255,255);color:rgb(68,68,68)">;' and '</span><span style="font-size:13px;font-family:Menlo;background-color:rgb(255,255,255);color:rgb(0,150,149)">void</span><span style="font-size:13px;font-family:Menlo;background-color:rgb(255,255,255);color:rgb(68,68,68)"> </span><span style="font-size:13px;font-family:Menlo;background-color:rgb(255,255,255);color:rgb(68,68,68)">fun</span><span style="font-size:13px;font-family:Menlo;background-color:rgb(255,255,255);color:rgb(68,68,68)">(</span><span style="font-size:13px;font-family:Menlo;background-color:rgb(255,255,255);color:rgb(68,68,68)">)</span><span style="font-size:13px;font-family:Menlo;background-color:rgb(255,255,255);color:rgb(68,68,68)">;' are typically 2 different function declarations, having different signatures. So this this sounds misleading/surprising. </span></div>
<div><div><br></div><div>> if you have a good suggestion as to improve the error message, please create an enhancement request for it</div><div><br></div><div>how about: </div><div><br></div><div><span style="color:rgb(80,0,80);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">'cannot overload a function in a nested scope'</span></div>
<div><br><div class="gmail_quote">On Thu, May 16, 2013 at 12:35 AM, Jonathan M Davis <span dir="ltr"><<a href="mailto:jmdavisProg@gmx.com" target="_blank">jmdavisProg@gmx.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Thursday, May 16, 2013 00:28:15 Timothee Cour wrote:<br>
> at the very least (or until it gets fixed) dmd should emit a more friendly<br>
> error message:<br>
> 'cannot overload a function in a nested scope'<br>
> otherwise this is hard to understand.<br>
<br>
</div>I don't know what else it would say. It means exactly what it says. It's<br>
telling you exactly what it can't do. Sure, it isn't telling you _why_ it's<br>
illegal, but error messages don't usually say that sort of thing anyway. So,<br>
if you have a good suggestion as to improve the error message, please create<br>
an enhancement request for it, but as far as I can tell, it means exactly what<br>
it says, and I don't know how it could be friendlier.<br>
<span class="HOEnZb"><font color="#888888"><br>
- Jonathan M Davis<br>
</font></span></blockquote></div><br></div></div>