D - DMD 0.52 release
- Walter (1/1) Feb 05 2003 www.digitalmars.com/d/changelog.html
- Sean L. Palmer (17/18) Feb 05 2003 Hmm.. are you sure you fixed using a template inside a with clause?
- Walter (2/2) Feb 05 2003 I fixed your previous example of it. I'll add this one to the bug
- Sean L. Palmer (8/10) Feb 06 2003 Actually this is a distilled example of my original bug, which still cra...
- Walter (5/10) Feb 06 2003 Hmm, I wonder what happened. The test case is in my regression tests.
- Mike Wynn (23/24) Feb 08 2003 more ways to crash the compiler;
- Mike Wynn (27/28) Feb 08 2003 another odd error message ..
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
Feb 05 2003
I fixed your previous example of it. I'll add this one to the bug list. -Walter
Feb 05 2003
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
Feb 06 2003
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 stillcrashedafter upgrading to DMD 0.52. I went back to the original code (whichhadn'tchanged 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.
Feb 06 2003
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
Feb 08 2003
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
Feb 08 2003









"Walter" <walter digitalmars.com> 