Skip to content

Error on a proc override that shares a path with an existing type#2681

Open
mumencoder wants to merge 1 commit into
OpenDreamProject:masterfrom
mumencoder:fix/2648-type-proc-conflict-pr
Open

Error on a proc override that shares a path with an existing type#2681
mumencoder wants to merge 1 commit into
OpenDreamProject:masterfrom
mumencoder:fix/2648-type-proc-conflict-pr

Conversation

@mumencoder

Copy link
Copy Markdown
Contributor

BYOND makes no distinction between the path of a type and the path of a proc override, since an override is written without a "proc" keyword. Declaring /datum/test/beep and then defining /datum/test/beep() is a duplicate definition there, while OpenDream happily accepted both.

Verified against BYOND 516.1685 that this only applies to the override form and only when the type comes first: "/datum/test/proc/beep()" next to a "/datum/test/beep" type compiles either way, and so does an override followed by the type declaration.

Tests/Procs/final_proc2.dm had this exact conflict and does not compile in BYOND, so its procs named "final" are moved above the point where /datum/test/final becomes a type.

Fixes #2648

BYOND makes no distinction between the path of a type and the path of a
proc override, since an override is written without a "proc" keyword.
Declaring /datum/test/beep and then defining /datum/test/beep() is a
duplicate definition there, while OpenDream happily accepted both.

Verified against BYOND 516.1685 that this only applies to the override
form and only when the type comes first: "/datum/test/proc/beep()" next
to a "/datum/test/beep" type compiles either way, and so does an
override followed by the type declaration.

Tests/Procs/final_proc2.dm had this exact conflict and does not compile
in BYOND, so its procs named "final" are moved above the point where
/datum/test/final becomes a type.

Fixes OpenDreamProject#2648
@boring-cyborg boring-cyborg Bot added the Compiler Involves the OpenDream compiler label Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Compiler Involves the OpenDream compiler size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type and proc defs should conflict

2 participants