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

Adds check for local variable in scope operator check #2227

Merged
merged 8 commits into from
Feb 24, 2025

Conversation

Ruzihm
Copy link
Contributor

@Ruzihm Ruzihm commented Feb 23, 2025

Adds check for local variable in scope operator check.

Example code from goon:

proc/generate_copyrighted_colors()
	src.copyrighted_colors = list()
	for (var/obj/item/clothing/head/type as anything in src.copyrighted_berets)
		var/icon/icon = icon(type::icon, type::icon_state) // <-- type now interpreted as a local var
		copyrighted_colors[global.get_average_color(icon)] = rand(10000, 999999)

@boring-cyborg boring-cyborg bot added the Compiler Involves the OpenDream compiler label Feb 23, 2025
Copy link
Collaborator

@amylizzle amylizzle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, but add a unit test

@Ruzihm Ruzihm marked this pull request as draft February 23, 2025 18:58
@github-actions github-actions bot added size/L and removed size/XS labels Feb 23, 2025
@Ruzihm Ruzihm marked this pull request as ready for review February 23, 2025 19:50
@Ruzihm Ruzihm marked this pull request as draft February 23, 2025 19:51
@github-actions github-actions bot added size/M and removed size/L labels Feb 23, 2025
@Ruzihm Ruzihm marked this pull request as ready for review February 23, 2025 19:55
@Ruzihm Ruzihm requested a review from amylizzle February 23, 2025 20:20
@Ruzihm Ruzihm requested a review from amylizzle February 23, 2025 20:54
@Ruzihm Ruzihm requested a review from wixoaGit February 24, 2025 02:50
@wixoaGit wixoaGit merged commit c86d43f into OpenDreamProject:master Feb 24, 2025
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/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants