Updated to Haxe 3.1.0, getting "Field update is inlined and cannot be overridden" compile errors

32 views
Skip to first unread message

Balthazar Auger

unread,
Mar 4, 2014, 11:58:35 PM3/4/14
to aw...@googlegroups.com
Hi!

Today, since I like living dangerously, I went ahead and installed the latest haxe version (3.1.0), and suddenly my awe6 projects start throwing compiler errors like this one:

src/scenes/Game.hx:60: lines 60-96 : Field update is inlined and cannot be overridden

Digging around, it seems that the original definition of update in Process.hx does indeed define the update method as inline, which according to the haxe reference, says inline functions "cannot be overridden in subclasses" source.

Of course manually removing the keyword from the definition of Process.update() "fixes" the error. My question is, how come this error wasn't being raised on previous versions? It looks like haxe was happily overriding inlines before. Did they get stricter with the restriction?

Also, obviously, what should we do about it? is there a new version of awe6 that we should wait for?

Thanks!

Rob Fell

unread,
Mar 5, 2014, 12:15:13 PM3/5/14
to aw...@googlegroups.com
Hello, I hope this is helpful and doesn't cause too much revision:

update(), dispose(), pause(), resume() were inlined intentionally to prevent overriding (at the time of authoring no "final" existed).
_updater(), _disposer(), _pauser(), _resumer() were intended for overriding and are called from their respective final methods.

I do not know why interim versions of compiler did not object to the overriding of the inlined methods?

Separate to this, but related to 3.1.0, have you encountered any issues with skipping null parameters?  I would really like a sanity check on those!

Thanks!

Balthazar Auger

unread,
Mar 5, 2014, 11:20:43 PM3/5/14
to aw...@googlegroups.com
Hey

So luckily it was pretty trivial to fix my error here, the rest of the project seems to have made the migration to the new haxe version without any problems. Good news!

I guess the compiler letting me get away with overriding inline methods was at fault, but not anymore!


--
You received this message because you are subscribed to a topic in the Google Groups "awe6" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/awe6/pO8SstFqDd0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to awe6+uns...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Balthazar Auger
...just finished level three and needs to tighten up the graphics a little bit.
Reply all
Reply to author
Forward
0 new messages