Bug in DMD 2.064 RC1. Issue tracking system not very intuitive.
Tor Einar Tønnessen" <tor.einar.tonnessen at gmail.com>
Tor Einar Tønnessen" <tor.einar.tonnessen at gmail.com>
Mon Nov 11 07:17:03 PST 2013
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
More information about the Digitalmars-d
mailing list