|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
D - dmd 0.50 release
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.
Nov 20 2002
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...
Nov 21 2002
Please disregard my earlier comment. I'll begin reading threads completely before responding to them. Andrew Nov 21 2002
"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 Nov 21 2002
"Burton Radons" <loth users.sourceforge.net> ha scritto nel messaggio news:arfr2l$7h4$1 digitaldaemon.com... Nov 22 2002
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;
}
}
Nov 25 2002
|