🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Parser bugs in AngelScript 2.14 and 2.14 WIP

Started by
0 comments, last by WitchLord 15 years, 8 months ago
In 2.14.0 and the latest update, putting const on the return type of a class method seems to send the parser into an infinite loop. Ex:

class Foo {
  const int foo(int a) { return a; }
}
Additionally, despite the fact that const seems to be illegal as the modifier for return values for methods, you can declare an interface with a const return type.

interface IFoo {
  const int foo(int a);
}
edit: and here's another fun one: I also seem to be able to crash AngelScript with this input:

class MyClass {
    MyClass(int a) {}
}

const MyClass foo(int (a) ,bar);
Assertion error on line 7083 in as_compiler.cpp. edit 2: and another one:

void main() {
  for (;i < 10;);
}
Assertion error on line 7056 in as_compiler.cpp. [Edited by - SiCrane on October 31, 2008 1:02:00 PM]
Advertisement
Thanks for the report. I'll have these fixed before I release version 2.14.1 this weekend (if all goes as planned).

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