www.digitalmars.com         C & C++   DMDScript  

D - Assert in the compiler, what does it mean ?

reply "Mike Wynn" <mike.wynn l8night.co.uk> writes:
I've just had ...
Assertion failure: 'type' on line 1493 in file 'expression.c'
any one know what this means ?
(D compiler  ALPHA v0.42)


Mike.
Sep 27 2002
parent reply Russ Lewis <spamhole-2001-07-16 deming-os.org> writes:
Generally, any time you see "assertion failure", it means that the
compiler is confused.  It probably means a bug.  Can you post the code
that caused the error (or, better yet, a tiny little source file that
does nothing but show the error)?

Mike Wynn wrote:

 I've just had ...
 Assertion failure: 'type' on line 1493 in file 'expression.c'
 any one know what this means ?
 (D compiler  ALPHA v0.42)

 Mike.
-- The Villagers are Online! villagersonline.com .[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ] .[ (a version.of(English).(precise.more)) is(possible) ] ?[ you want.to(help(develop(it))) ]
Sep 27 2002
next sibling parent "Mike Wynn" <mike.wynn l8night.co.uk> writes:
I've no idea where the error occured, the posted error message was all the D
compiler told me!
(kind of hopeing someone had seen this assert before).

posting source ... not really its within 648K of D source (full port to D of
win32 API headers winuser, winbase, commctrl)
the problem occured once I wrote wrapper class to win32 TreeView and might
be in there or inside my port of commcrtl.h (I do have my suspisions where
it lies .... )

I guess I'll have to start commenting code out until it builds.

Mike.

"Russ Lewis" <spamhole-2001-07-16 deming-os.org> wrote in message
news:3D94F10D.6911D9E5 deming-os.org...
 Generally, any time you see "assertion failure", it means that the
 compiler is confused.  It probably means a bug.  Can you post the code
 that caused the error (or, better yet, a tiny little source file that
 does nothing but show the error)?

 Mike Wynn wrote:

 I've just had ...
 Assertion failure: 'type' on line 1493 in file 'expression.c'
 any one know what this means ?
 (D compiler  ALPHA v0.42)

 Mike.
-- The Villagers are Online! villagersonline.com .[ (the fox.(quick,brown)) jumped.over(the dog.lazy) ] .[ (a version.of(English).(precise.more)) is(possible) ] ?[ you want.to(help(develop(it))) ]
Sep 27 2002
prev sibling parent reply "Mike Wynn" <mike.wynn l8night.co.uk> writes:
Found the cause ....
its related to aliasing member functions ...

struct foo { }
alias foo * HMYFOO;

const HMYFOO FOO_ROOT  = ((HMYFOO)0xFFFF0000);

class fooTree
{
 HMYFOO getMyFooA( char[] str, HMYFOO item ) { return item; }
 HMYFOO getMyFooW( wchar[] str, HMYFOO item ){ return item; }

 version( UNICODE ) {
  alias getMyFooW getMyFoo;
 } else {
  alias getMyFooA getMyFoo;
 }
// direct call OK
// HMYFOO getMyFoo( char[] str, HMYFOO item ) { return item; }
}

void doStuffWith( fooTree tree )
{
 HMYFOO fooHandle;

 fooHandle = tree.getMyFoo( "bar", FOO_ROOT );
}

void
main()
{
 fooTree tree = new fooTree();
 doStuffWith( tree );
}

"Russ Lewis" <spamhole-2001-07-16 deming-os.org> wrote in message
news:3D94F10D.6911D9E5 deming-os.org...
 Generally, any time you see "assertion failure", it means that the
 compiler is confused.  It probably means a bug.  Can you post the code
 that caused the error (or, better yet, a tiny little source file that
 does nothing but show the error)?

 Mike Wynn wrote:

 I've just had ...
 Assertion failure: 'type' on line 1493 in file 'expression.c'
 any one know what this means ?
 (D compiler  ALPHA v0.42)

 Mike.
Sep 27 2002
parent "Walter" <walter digitalmars.com> writes:
Thanks, I'll take it from here. -Walter
Sep 27 2002