Re: error in return statement

2009-02-13 Thread downs
zorran wrote: > possibly error in return statement: > > bool fn1(Object o1, Object o2 ) { > return o1.opEquals(o2); // opEquals return int > } > > > compiler writes: > "Error: cannot implicitly convert expression (o1.opEquals(o2)) of type int to > bool" > > But: > > bool fn2

Re: error in return statement

2009-02-10 Thread Jarrett Billingsley
On Tue, Feb 10, 2009 at 11:16 AM, zorran wrote: > possibly error in return statement: > > bool fn1(Object o1, Object o2 ) { >return o1.opEquals(o2); // opEquals return int > } > > > compiler writes: > "Error: cannot implicitly convert expression (o1.opEquals(o2)) of type int to

Re: error in return statement

2009-02-10 Thread Steven Schveighoffer
"zorran" wrote > possibly error in return statement: > > bool fn1(Object o1, Object o2 ) { > return o1.opEquals(o2); // opEquals return int > } > > > compiler writes: > "Error: cannot implicitly convert expression (o1.opEquals(o2)) of type int > to bool" > > But: > > bool fn2() { >