Advertisement

Parser bugs in AngelScript 2.14 and 2.14 WIP

Started by October 31, 2008 11:43 AM
0 comments, last by WitchLord 16 years, 1 month 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]
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