OpenDream
OpenDream copied to clipboard
Compiler doesn't pick up var duplication caused by `parent_type`
/datum/beta
var/poop
/datum/alpha
var/poop
/datum/beta/parent_type = /datum/alpha
The above code causes a compile-time in BYOND (due to the duplicate var definition) but not in OD.
This is because setting the parent_type doesn't cause, like, some emitted event or something that re-scans the object definition for duplicates (now that its inheritance has been modified).
There's probably other weird behaviour in our parent_type impl beyond this.
Tested this with #1366. Still doesn't pick up the error, I think var definitions will have to be sorted by inheritance before being processed.