Advertisement

Assert when casting undeclared variable

Started by February 06, 2009 10:34 AM
10 comments, last by jal_ 15 years, 9 months ago
Hey Just found a little bug in the compiler. If you try to explicitly type cast something that is undeclared, (e.g. "int foo = int(bar);" where "bar" isn't declared), the compiler first (correctly) says "bar" isn't declared, but then asserts at as_compiler.cpp:6891 ("asASSERT(ctx->type.dataType.IsReference());"); It's not really fatal (at least not for me) since it only happens with faulty scripts, but still. :)
Which compiler is that one?
GCC, MSVC, Intel, etc?

Besides being just a curiousity thing, you should post on the bug report system that particular compiler has.

Cheers
Dark Sylinc
Advertisement
Quote: Original post by Matias Goldberg
Which compiler is that one?
GCC, MSVC, Intel, etc?


This is the Angelcode forum, so I'm guessing it is the Angelcode compiler. [smile]
Ooops, sorry you're right.
It's easy to overlook that if you get to a post through the "Recent Post" section.

My apologies
No problem :)
I might add though that it was AS 1.13, so it might be fixed now. I guess I should update.
It doesn't seem to happen with revision 350 (the current WIP version of AngelScript).
Advertisement
Just upgraded to 2.15.1 and there it works, so forget about it. :)
Quote: Original post by Dentoid
No problem :)
I might add though that it was AS 1.13, so it might be fixed now. I guess I should update.


This was a typo right? There was no version 1.13. ;)

The bug you found was fixed in 2.15.0, so you're just 2 months late. :)

There is a bug in version 2.15.1 that you may want to apply a patch for. The solution for the bug is mentioned here: Script class factories don't work for more than 1 parameters. I've not yet checked in this bug fix in the SVN, but will hopefully be able to do so today.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Quote: Original post by WitchLord
This was a typo right? There was no version 1.13. ;)


Yeah, of course. Sorry. :)

Quote: Original post by WitchLord
The bug you found was fixed in 2.15.0, so you're just 2 months late. :)


Well if stuff didn't keep changing I might update more often! ;)

There is a bug in version 2.15.1 that you may want to apply a patch for. The solution for the bug is mentioned here: Script class factories don't work for more than 1 parameters. I've not yet checked in this bug fix in the SVN, but will hopefully be able to do so today.

I think I've actually manage to avoid using that somehow, so I should be safe. Thanks for the heads up though.
The only way things would stop changing is if I stop developing more features. ;)

Anyway, I've checked in the bug fix now.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

This topic is closed to new replies.

Advertisement