Skip to content

Conversation

@ProfDiesel
Copy link

Compilation fix for Haxe 5.

@player-03 player-03 changed the title Haxe5 Support final properties in entity templates Mar 23, 2025
@player-03
Copy link
Owner

I'm worried that this would be misleading. Entity templates are just syntax sugar, and can't prevent a component from being overwritten. Even if we declare the property as (get, never) and don't include a setter, the user can still modify the component by calling add().

If it's just meant as a suggestion or reminder not to modify the component, that's fair, but I'd want to go about that in a less-misleading way.

If you got an error when you typed final and wanted to fix the error, we could do a quick access.remove(AFinal). But again, final is misleading, so perhaps it should remain an error.

@player-03 player-03 closed this in 464cc6f Jun 8, 2025
@player-03
Copy link
Owner

I've added an error message to the Haxe 4 version, for consistency. If you'd like to make the case that we should support final components, get back to me and I can reopen this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants