www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - converting to same type?

reply "Carlos Santander B." <carlos8294 msn.com> writes:
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
Jul 22 2004
next sibling parent J C Calvarese <jcc7 cox.net> writes:
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: 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/
Jul 22 2004
prev sibling parent J C Calvarese <jcc7 cox.net> writes:
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"'. 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/
Jul 24 2004