Skip to main content
GameDev.net gamedev.net
🔒 Locked

Assert when casting undeclared variable

Started by Dentoid Feb 6, 2009 at 10:34 AM 10 replies 3.3k views
Original Post
Dentoid
Dentoid
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. :)
rip-off
rip-off
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]
Dentoid
Dentoid
No problem :)
I might add though that it was AS 1.13, so it might be fixed now. I guess I should update.
SiCrane
SiCrane
It doesn't seem to happen with revision 350 (the current WIP version of AngelScript).
Dentoid
Dentoid
Just upgraded to 2.15.1 and there it works, so forget about it. :)
WitchLord
WitchLord
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 - <a href="http://www.angelcode.com/tower" rel
Dentoid
Dentoid
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.[/quote]

I think I've actually manage to avoid using that somehow, so I should be safe. Thanks for the heads up though.
WitchLord
WitchLord
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 - <a href="http://www.angelcode.com/tower" rel
Dentoid
Dentoid
Quote:
Original post by WitchLord
The only way things would stop changing is if I stop developing more features. ;)


Damn youth of today just needs to have new stuff all the time. In my day, we built our scripting languages out of pine cones and wrote our glue code with birch sap, and we didn't complain!

Uhm, I mean, keep it up. ;)
jal_
jal_
Quote:
Original post by Dentoid
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! ;)


Haha. I'm sorry, but I have to suscribe! Each time the api changes a little I let the update sitting there for a good while. :)

I do love that angelscript is in active development, tho ;)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.