Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emit location of original var def for duplicate var errors #2126

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

ike709
Copy link
Collaborator

@ike709 ike709 commented Dec 7, 2024

Example:

Error OD0014 at code/modules/banners/__banner.dm:15:2: Duplicate definition of var "name_prefix"
Error OD0014 at code/game/objects/items/__item.dm:10:2: Previous definition of var "name_prefix"

Previously we only printed the first line. Printing both gives us parity with BYOND and is useful for fixing the error.

@boring-cyborg boring-cyborg bot added the Compiler Involves the OpenDream compiler label Dec 7, 2024
DMCompiler/DM/DMCodeTree.Vars.cs Outdated Show resolved Hide resolved
@github-actions github-actions bot added size/S and removed size/XS labels Dec 8, 2024
@ike709 ike709 requested a review from wixoaGit December 8, 2024 01:06
DMCompiler/DM/DMCodeTree.Vars.cs Dismissed Show dismissed Hide dismissed
@wixoaGit wixoaGit merged commit 621460e into OpenDreamProject:master Dec 9, 2024
7 checks passed
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/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants