Repository navigation
fix(compiler): preserve templated scalar initializer types - #12510
Draft
Sylvester Kaczmarek (sylvesterkaczmarek) wants to merge 1 commit into
Draft
Sylvester Kaczmarek (sylvesterkaczmarek) wants to merge 1 commit into
Sylvester Kaczmarek (sylvesterkaczmarek) wants to merge 1 commit into
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #12506.
Keep scalar initializer lookup bound to the instantiated scalar, including aliases and inherited constructors. Resolve initializer parameters with the active template mapper instead of reusing an unresolved declaration-level parameter. Existing assignability rules are unchanged.
Add regressions for the reported assignment, exact scalar identity, multiple instantiations in either order, default arguments, scalar/constructor aliases, inherited initializers, and invalid argument types. Include a compiler changelog entry. No dependency or lockfile changes.
Validation
pnpm test --maxWorkers=4: 10,670 passed, 25 skipped across 500 passing files and one skipped file.pnpm build: 48 tasks successful, including engineering type checks and compiler external-signature generation.Test<string>.from(123)through a scalar alias with the expectedinvalid-argumentdiagnostic.Validated on macOS arm64 with the repository-pinned Node 26.5.1 and pnpm 11.10.0. Full validation ran in an identical-source isolated checkout to avoid unrelated home-directory module resolution. Source hashes match the submitted files. Hosted CI and maintainer review remain pending.