as3hx icon indicating copy to clipboard operation
as3hx copied to clipboard

Unexpected } when included function is last in class

Open jcward opened this issue 9 years ago • 0 comments

If an included function declaration is last in the class:

public class Foo {
  public function Foo():void { }
  include "shared_function.as";
}

It throws: Foo.as(4) : Unexpected }

If there is a function after it, it works fine:

public class Foo {
  public function Foo():void { }
  include "shared_function.as";
  public function bar() { ... }
}

Workaround: don't let an included function be last in the class.

jcward avatar Nov 12 '15 20:11 jcward