Thread overview | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
November 20, 2002 dmd 0.50 release | ||||
---|---|---|---|---|
| ||||
www.digitalmars.com/d/changelog.html |
November 20, 2002 Re: dmd 0.50 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | The code: void main () { bit x; x = "bar" == "bar"; } Triggers the new implicit bit cast error. It's type-dependent - comparing int won't trigger it. |
November 21, 2002 Re: dmd 0.50 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Burton Radons | Thats because an explicit cast is required to convert from string "bar" to bit. Try: void main () { bit x; x = (bit)"bar" == (bit)"bar"; } By the way: can you take a look at cartoon.d? It's got the same problems in D v0.50. Here's the error: cartoon.d(692): function checked (bit value) does not match argument types (int) I'm not sure how to typecast a function's return type; "Burton Radons" <loth@users.sourceforge.net> wrote in message news:arfr2l$7h4$1@digitaldaemon.com... > The code: > > void main () > { > bit x; > > x = (bit)"bar" == "bar"; > } > > Triggers the new implicit bit cast error. It's type-dependent - comparing int won't trigger it. > |
November 21, 2002 Re: dmd 0.50 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrew Edwards | Please disregard my earlier comment. I'll begin reading threads completely before responding to them. Andrew |
November 21, 2002 Re: dmd 0.50 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrew Edwards | "Andrew Edwards" <crxace13@nospam.comcast.net> wrote in message news:arjg8p$1cv9$1@digitaldaemon.com... > By the way: can you take a look at cartoon.d? It's got the same problems in > D v0.50. > > Here's the error: > cartoon.d(692): function checked (bit value) does not match argument types > (int) > > I'm not sure how to typecast a function's return type; It sounds like you're trying to pass an int to a function that takes a bit. Try cast(bit) before the int expression. |
November 22, 2002 Re: dmd 0.50 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Burton Radons | "Burton Radons" <loth@users.sourceforge.net> ha scritto nel messaggio news:arfr2l$7h4$1@digitaldaemon.com... > The code: > > void main () > { > bit x; > > x = "bar" == "bar"; > } > > Triggers the new implicit bit cast error. It's type-dependent - comparing int won't trigger it. Do you mean: x = ("bar" == "bar"); or (x = "bar") == "bar"; What is the right operator precendence? Ciao |
November 26, 2002 Re: dmd 0.50 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | The following generates the error Internal error: ..\ztc\cgobj.c 3084 If I put the template in the same file where it is used the error does not occur. //File: eventtemplates.d---------------- template EvtType(T1,T2) { struct Trigger { alias void delegate(Object sender,T1,T2) eventFunc; void Add(eventFunc f) { } } } //File: winbase.d---------------- import eventtemplates; instance EvtType(int,int) MouseEvent; class Window { public { MouseEvent.Trigger mouseDown; } } |
Copyright © 1999-2021 by the D Language Foundation