OpenDream icon indicating copy to clipboard operation
OpenDream copied to clipboard

Compiler doesn't pick up var duplication caused by `parent_type`

Open Altoids1 opened this issue 3 years ago • 1 comments

/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.

Altoids1 avatar Sep 23 '22 11:09 Altoids1

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.

wixoaGit avatar Jul 11 '23 04:07 wixoaGit