Skip to content

add class variable hierarchy shadowing check, fixes #175#1098

Merged
Frotty merged 7 commits intomasterfrom
fix-#175
Oct 18, 2025
Merged

add class variable hierarchy shadowing check, fixes #175#1098
Frotty merged 7 commits intomasterfrom
fix-#175

Conversation

@Frotty
Copy link
Copy Markdown
Member

@Frotty Frotty commented Oct 18, 2025

No description provided.

@Frotty Frotty force-pushed the master branch 2 times, most recently from 3bbfe78 to fdcd03d Compare October 18, 2025 09:02
@Frotty Frotty merged commit 7588a14 into master Oct 18, 2025
4 checks passed
@Frotty Frotty deleted the fix-#175 branch March 5, 2026 22:03
Donach added a commit to Code-Fixxers/WurstScript that referenced this pull request Apr 1, 2026
1. FunctionSignature.matchAgainstArgs: Remove duplicate matchAgainstSupertype
   call that was added for debug logging but passed potentially-null mapping
   to the second call, causing NPE on generic static method calls.

2. FuncLink.create: Only add function's own type parameters as type variables
   in the mapping. Enclosing structure type params (class/module) are resolved
   through receiver type matching, not through argument inference.

3. FunctionSignature.fromNameLink: Only add function definition's own type
   parameters as type variables, not enclosing structure params. This prevents
   module type params from appearing as unbound inference variables.

4. FuncLink.withTypeArgBinding: Also check if any type params are being bound
   (even when types don't change structurally, e.g., T bound to itself within
   a generic module) to ensure the FuncLink is updated.

5. WurstValidator: Downgrade variable-hides-superclass-variable from error to
   warning, matching pre-wurstscript#1098 behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Donach added a commit to Code-Fixxers/WurstScript that referenced this pull request Apr 3, 2026
1. FunctionSignature.matchAgainstArgs: Remove duplicate matchAgainstSupertype
   call that was added for debug logging but passed potentially-null mapping
   to the second call, causing NPE on generic static method calls.

2. FuncLink.create: Only add function's own type parameters as type variables
   in the mapping. Enclosing structure type params (class/module) are resolved
   through receiver type matching, not through argument inference.

3. FunctionSignature.fromNameLink: Only add function definition's own type
   parameters as type variables, not enclosing structure params. This prevents
   module type params from appearing as unbound inference variables.

4. FuncLink.withTypeArgBinding: Also check if any type params are being bound
   (even when types don't change structurally, e.g., T bound to itself within
   a generic module) to ensure the FuncLink is updated.

5. WurstValidator: Downgrade variable-hides-superclass-variable from error to
   warning, matching pre-wurstscript#1098 behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant