Thread overview | |||||
---|---|---|---|---|---|
|
April 13, 2006 [Bug 105] New: abiguity for opCall | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/bugzilla/show_bug.cgi?id=105 Summary: abiguity for opCall Product: D Version: 0.150 Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: benoit@tionex.de 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 } snippets/opCall.d(9): function snippets.opCall.C1.mixin T!(1); .opCall conflicts with snippets.opCall.C1.mixin T!(2); .opCall at snippets/opCall.d(9) -- |
April 18, 2006 Re: [Bug 105] New: abiguity for opCall | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail Attachments: | d-bugmail@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 |
April 28, 2006 [Bug 105] abiguity for opCall | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/bugzilla/show_bug.cgi?id=105 bugzilla@digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #2 from bugzilla@digitalmars.com 2006-04-28 02:56 ------- Fixed 0.155 -- |
Copyright © 1999-2021 by the D Language Foundation