ciscoheat/dataclass

Problem with interfaces and final fields

Closed this issue · 2 comments

Something in the build macro seems to go wrong when using final instead of var declarations.
The following...

interface ITest extends DataClass {
	final info(default, set):String;
}

class Test implements ITest {
	public final info:String = 'Test';
}

class Test2 implements ITest {
	public final info:String = 'Test2';
}

...gives a "Missing ;" compile time error.
Works fine when using var declarations.

If a semicolon was missing from the code, it wouldn't even compile. :)

final cannot have access identifiers, remove them from the interface field and it will work:

interface ITest extends DataClass {
	final info : String;
}

Ah! Thanx!