[Bug 105] New: abiguity for opCall

Thomas Kuehne thomas-dloop at kuehne.cn
Mon Apr 17 23:32:36 PDT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

d-bugmail at puremagic.com schrieb am 2006-04-13:
> While a function works fine, opCall does not:
>
> import std.stdio;
>
> template T( int i ){
>     public void foo(){
>         writefln( "%d", i );
>     }
>     public void opCall(){ // line 9
>         writefln( "%d", i );
>     }
> }
>
> class C{
> }
>
> class C1 : C {
>     mixin T!( 1 ) t1;
>     mixin T!( 2 ) t2;
> }
>
> void main(){
>     C1 c1 = new C1;
>     c1.t1.foo();
>     c1.t1(); // this causes the error
> }

Added to DStress as
http://dstress.kuehne.cn/run/m/mixin_20_A.d
http://dstress.kuehne.cn/run/m/mixin_20_B.d

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFERI4p3w+/yD4P9tIRAp+RAKDENdrJNKU7v0r6FFNL62zZCIbh0wCeIpEi
z+cw8ZQk2F0Tp0Ujhq83OYY=
=4q/n
-----END PGP SIGNATURE-----



More information about the Digitalmars-d-bugs mailing list