Skip to content

Support @config overrides for extension functions - #1259

Merged
Frotty merged 2 commits into
masterfrom
codex/configurable-extension-config
Aug 28, 2026
Merged

Support @config overrides for extension functions#1259
Frotty merged 2 commits into
masterfrom
codex/configurable-extension-config

Conversation

@Frotty

@Frotty Frotty commented Aug 28, 2026

Copy link
Copy Markdown
Member

Summary

  • support @config replacements for package extension functions
  • match configured functions by exact callable ABI, including receiver, overloads, varargs, return types, and alpha-equivalent generic parameters
  • apply configured extension definitions centrally during member lookup while preserving overload and receiver metadata
  • keep class and module methods outside package configuration replacement

Acceptance criteria

  • configured extension calls use the configured body globally, including dependency-package calls
  • overloads resolve independently and unmatched overloads keep their original implementation
  • mismatched receiver, parameter, return, vararg, and generic signatures are rejected
  • cascade and extension-operator calls use the configured definition
  • import initlater config dependencies compile without an initialization cycle
  • translation remains a normal direct call with no runtime dispatch machinery

Validation

  • ./gradlew test --tests tests.wurstscript.tests.ConfigPackageTests — passed after rebasing onto origin/master; includes Jass and Lua execution
  • ./gradlew test — passed after rebasing onto origin/master in 3m 55s
  • git diff --check — passed

Known gaps

  • Wurst code function references cannot target extension functions because their implicit receiver counts as a parameter; that pre-existing language restriction is unchanged.

@Frotty

Frotty commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7cbf091f3c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Frotty

Frotty commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: cc984016b2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Frotty
Frotty merged commit 9b275a4 into master Aug 28, 2026
6 checks passed
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