Skip to content

Conversation

@witemple-msft
Copy link
Member

Closes #9655
Closes #9656

This PR adds a corresponding case for when the base of a member expression is a templated alias that only has defaultable params. This works similarly to how we handle other templated decls with only defaultable params: unless the checker options are resolving template declarations, we fully check the alias and late-bind it. This gives us a good symbol that the members can resolve through.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 10, 2026

Open in StackBlitz

npm i https://pkg.pr.new/microsoft/typespec/@typespec/compiler@9670

commit: 4707b64

@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

All changed packages have been documented.

  • @typespec/compiler
Show changes

@typespec/compiler - fix ✏️

Fixed an issue where referencing a member of a templated alias with defaultable parameters would fail to instantiate the alias, leaking template parameters.

@azure-sdk
Copy link
Collaborator

azure-sdk commented Feb 10, 2026

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@witemple-msft witemple-msft added this pull request to the merge queue Feb 11, 2026
Merged via the queue into microsoft:main with commit c59d46c Feb 11, 2026
29 checks passed
@witemple-msft witemple-msft deleted the witemple-msft/alias-member-default-instance branch February 11, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compiler:core Issues for @typespec/compiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Weird interface constraint not working with default used No error reported when trying to reference templated alias without arguments

3 participants