[Genie] Allow classes to implement an interface without needing to inherit
@astavale
Submitted by Al Thomas Link to original bug (#776836)
Description
I think this is an error in parser. The following Genie code compiles fine:
init pass class Bar:Foo def simple() pass interface Foo def abstract simple()
In that example the interface Foo is specified using the syntax also used for inheritance, with the colon.
The following code:
init pass class Bar implements Foo def simple() pass interface Foo def abstract simple()
produces the error:
test.gs:3.11-3.20: error: syntax error, expected tab indent' but got
implements' with previous identifier
class Bar implements Foo
Adding a parent type makes it compile:
init pass class Bar:Object implements Foo def simple() pass interface Foo def abstract simple()
but it is faster to instantiate an object if it does not subtype GLib's Object and more explicit an interface is being used when the 'implements' keyword is present. It looks as though some changes to parse_class_declaration() in the Genie parser will resolve this.