Thread overview | |||||||||
---|---|---|---|---|---|---|---|---|---|
|
February 05, 2003 DMD 0.52 release | ||||
---|---|---|---|---|
| ||||
www.digitalmars.com/d/changelog.html |
February 05, 2003 Re: DMD 0.52 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | Hmm.. are you sure you fixed using a template inside a with clause? template VecTemplate(tfloat) { struct Vector { tfloat d; } } int main(char[][] args) { with (instance VecTemplate(int)) // crash DMD { } return 0; } "Walter" <walter@digitalmars.com> wrote in message news:b1qqta$2tf2$1@digitaldaemon.com... > www.digitalmars.com/d/changelog.html > > > |
February 05, 2003 Re: DMD 0.52 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean L. Palmer | I fixed your previous example of it. I'll add this one to the bug list. -Walter |
February 06, 2003 Re: DMD 0.52 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | Actually this is a distilled example of my original bug, which still crashed after upgrading to DMD 0.52. I went back to the original code (which hadn't changed since I posted the report) and uncommented the "I dare you" line, and compiled. POOF! You may have fixed a different bug than what I was (and still am) seeing. Sean "Walter" <walter@digitalmars.com> wrote in message news:b1rqrg$g09$1@digitaldaemon.com... > I fixed your previous example of it. I'll add this one to the bug list. -Walter |
February 06, 2003 Re: DMD 0.52 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean L. Palmer | Hmm, I wonder what happened. The test case is in my regression tests. "Sean L. Palmer" <seanpalmer@directvinternet.com> wrote in message news:b1t83j$19ri$1@digitaldaemon.com... > Actually this is a distilled example of my original bug, which still crashed > after upgrading to DMD 0.52. I went back to the original code (which hadn't > changed since I posted the report) and uncommented the "I dare you" line, and compiled. POOF! > > You may have fixed a different bug than what I was (and still am) seeing. |
February 08, 2003 Re: DMD 0.52 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | more ways to crash the compiler; note some bits are commented out it crashes if they are not too (trying to create some test code for another problem) /* template base( T ) { void errfunc() { throw new Exception("no init"); } typedef T safeptr = cast(T)&errfunc; } */ template func0( T ) { instance base( fp ) safe; alias safe.safeptr fp; } instance func0( int ) I_V_fp; //I_V_fp.fp tc; int main( char[][] args ) { return 0; //tc(); } "Walter" <walter@digitalmars.com> wrote in message news:b1qqta$2tf2$1@digitaldaemon.com... > www.digitalmars.com/d/changelog.html > > > |
February 08, 2003 Re: DMD 0.52 release | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | another odd error message .. Expression TOK26 tet3.d(5): Integer constant expression expected instead of &errfunc template base( T ) { void errfunc() { throw new Exception("no init"); } typedef T safeptr = cast(T)&errfunc; } alias int (*mfp)(int); // alias void (*mfp)(); // works (as you would expect) instance base( mfp ) I_V_fp; int main( char[][] args ) { return 0; //tc(); } ---------------------------------------------- I know typedef T safeptr = cast(T)&errfunc; is a bit bad if the T is a func pointer to a pascal or stdcall method that takes params but there's no way to write T foo = { throw ... }; typedef safe = foo; or typedef T safe = { throw ... }; or &{} Mike. "Walter" <walter@digitalmars.com> wrote in message news:b1qqta$2tf2$1@digitaldaemon.com... > www.digitalmars.com/d/changelog.html > > > |
Copyright © 1999-2021 by the D Language Foundation