www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Bug in DMD 2.064 RC1. Issue tracking system not very intuitive.

reply "Tor Einar =?UTF-8?B?VMO4bm5lc3NlbiI=?= <tor.einar.tonnessen gmail.com> writes:
Hello,

I wanted to report what I consider a bug in the DMD 2.064 RC1 
compiler.
I tried to use the issue-tracking-system but found it very 
unintuitive (at least for a first time user). I apologize if this 
is a bug already reported.

Consider the following example:

class A {
}

void func(A a) {
	writeln("In func");
	a.func();
}

...

auto a = A;
func(a);


The compiler should not accept this code, because there's no 
method func in class A.

But the code gets compiled (at least on my setup (ubuntu 13.10 - 
amd64) and the method call a.func() get translated to func(a), I 
guess, because the net result is that func(A a) is called 
recursively and the message "In func" is displayed over and over 
again.

Tor Einar
Nov 11 2013
next sibling parent reply "Dicebot" <public dicebot.lv> writes:
On Monday, 11 November 2013 at 15:17:04 UTC, Tor Einar Tønnessen 
wrote:
 ...
It is a feature, not a bug :) Called UFCS (Uniform Function Call Syntax) : http://dlang.org/function.html#pseudo-member
Nov 11 2013
parent "Tor Einar =?UTF-8?B?VMO4bm5lc3NlbiI=?= <tor.einar.tonnessen gmail.com> writes:
On Monday, 11 November 2013 at 15:18:59 UTC, Dicebot wrote:
 On Monday, 11 November 2013 at 15:17:04 UTC, Tor Einar 
 Tønnessen wrote:
 ...
It is a feature, not a bug :) Called UFCS (Uniform Function Call Syntax) : http://dlang.org/function.html#pseudo-member
Okay, I see. Thanks for your answer. Tor Einar
Nov 11 2013
prev sibling parent reply "bearophile" <bearophileHUGS lycos.com> writes:
Tor Einar Tønnessen:

 I tried to use the issue-tracking-system but found it very 
 unintuitive (at least for a first time user).
What problem have you had with the usage of the Bugzilla? Bye, bearophile
Nov 11 2013
parent reply "Tor Einar =?UTF-8?B?VMO4bm5lc3NlbiI=?= <tor.einar.tonnessen gmail.com> writes:
On Monday, 11 November 2013 at 15:24:12 UTC, bearophile wrote:
 Tor Einar Tønnessen:

 I tried to use the issue-tracking-system but found it very 
 unintuitive (at least for a first time user).
What problem have you had with the usage of the Bugzilla? Bye, bearophile
As I said - for me , at least, it was so counterintuitive that it was not possible for me to file a bug. I think you should consider me a typical representative for the new user, both to the D-language itself and to the tools you use. Maybe I used a wrong system? I used "https://d.puremagic.com/issues/request.cgi....." Tor Einar
Nov 11 2013
parent "Wyatt" <wyatt.epp gmail.com> writes:
On Monday, 11 November 2013 at 16:47:25 UTC, Tor Einar Tønnessen 
wrote:
 Maybe I used a wrong system? I used 
 "https://d.puremagic.com/issues/request.cgi....."
Right site, wrong area. :) Up in the top bar, there's a link called "New" (second from the left) that takes you here: https://d.puremagic.com/issues/enter_bug.cgi On the bug tracker home page (https://d.puremagic.com/issues/), there's also a big green button titled "File an Issue" that goes to the same. -Wyatt
Nov 11 2013