Skip to content

Fix arguments named name or v in extended classes - #27

Merged
Jamextreme140 merged 1 commit into
CodenameCrew:codename-devfrom
Villezen:fix-extends-shadowing
Nov 12, 2026
Merged

Jamextreme140 merged 1 commit into
CodenameCrew:codename-devfrom
Villezen:fix-extends-shadowing

Conversation

@Villezen

Copy link
Copy Markdown

Renames the “name” and “v” variables that get added to extended classes so they don’t hide arguments that have the same names in a script that extends anything

class TestHello
{
    public function new() {}

    public function greet(name:String)
    {
        trace("Hello, " + name);
    }
}
class NewTestHello extends TestHello {}

var test:NewTestHello = new NewTestHello();
test.greet("Kai Cenat");

Before: Hello, greet
After: Hello, Kai Cenat

@Jamextreme140 Jamextreme140 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I wasn't aware that this could be an issue. Thanks for the fix :3

@Jamextreme140
Jamextreme140 merged commit 4c5b9f3 into CodenameCrew:codename-dev Nov 12, 2026
1 check passed
@Villezen
Villezen deleted the fix-extends-shadowing branch November 17, 2026 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants