Thread overview | |||||
---|---|---|---|---|---|
|
July 23, 2004 converting to same type? | ||||
---|---|---|---|---|
| ||||
I can't come up with a piece of code yet (I have 38 files in the project), but I'm getting this message: sample.d(231): cannot implicitly convert O to O Just in case, O is only defined once. ----------------------- Carlos Santander Bernal |
July 23, 2004 Re: converting to same type? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carlos Santander B. | Carlos Santander B. wrote: > I can't come up with a piece of code yet (I have 38 files in the project), > but I'm getting this message: > > sample.d(231): cannot implicitly convert O to O > > Just in case, O is only defined once. > > ----------------------- > Carlos Santander Bernal I don't have a solution, but I've had a similar problem: http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/271 I guess my troublesome struct is actually named twice, but it's defined the same. Here's my error: a.d(17): function Blt (R *) does not match argument types (R *) a.d(17): cannot implicitly convert R * to R * The code posted in my bug report. (I just checked in DMD 0.96 and the odd behavior still seems to be there.) -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/ |
July 24, 2004 Re: converting to same type? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carlos Santander B. | Carlos Santander B. wrote: > I can't come up with a piece of code yet (I have 38 files in the project), > but I'm getting this message: > > sample.d(231): cannot implicitly convert O to O > > Just in case, O is only defined once. > > ----------------------- > Carlos Santander Bernal I just realized that one of my old bug reports produces essentially the same error message. It's called 'mysterious "cannot implicitly convert int to bit"'. http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D.bugs/626 import std.string; class StdString { private import std.string; alias std.string.toString toString; } void main() { int i = 123; StdString g = new StdString(); printf("%.*s\n", g.toString(i)); /* line 13 */ } Error Message: impl_convert.d(13): cannot implicitly convert int to bit If anyone can tell me what this might mean, please do. It still appears in DMD 0.96. -- Justin (a/k/a jcc7) http://jcc_7.tripod.com/d/ |
Copyright © 1999-2021 by the D Language Foundation