test: add regression coverage for await in computed member names of namespace classes (#63712) - #64255
Closed
Vaibhav Srivastava (vaibhavsrv) wants to merge 1 commit into
Conversation
Copilot started reviewing on behalf of
Vaibhav Srivastava (vaibhavsrv)
September 13, 2026 07:02
View session
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Add the required baselines and resolve the duplicate test coverage.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds conformance regression coverage for TS1308 when await appears in computed member names of namespace classes.
Changes:
- Tests exported and unexported namespace classes.
- Targets consistent diagnostic reporting.
File summaries
| File | Summary |
|---|---|
tsc/testdata/tests/cases/conformance/async/namespaceAwaitComputedName.ts |
Adds the regression cases; required reference baselines are missing, and the cases duplicate existing coverage. |
Review details
Suppressed comments (1)
tsc/testdata/tests/cases/conformance/async/namespaceAwaitComputedName.ts:8
- These exact unexported and exported namespace-class cases are already covered by
tsc/testdata/tests/cases/compiler/awaitInNamespaceExportedClassComputedProperty.ts(including TS1308 entries in its checked-in.errors.txtbaseline). Adding the same inputs here provides no new coverage; please extend the existing regression test or remove this duplicate unless this suite is intended to exercise a distinct configuration.
namespace N {
class A { [await x]() {} }
export class B { [await x]() {} }
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite (auto)
Note
Copilot is running an experiment and ran this review at Lite.
Comment on lines
+7
to
+8
| class A { [await x]() {} } | ||
| export class B { [await x]() {} } |
Author
|
Closing PR as issue #63712 already has existing test coverage in awaitInNamespaceExportedClassComputedProperty.ts. |
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.
Resolves #63712
Summary of Changes
Adds a regression test case to verify that diagnostic
TS1308: 'await' expressions are only allowed within async functions and at the top levels of modulesis reported consistently for both exported and unexported classes within namespace declarations.Test Coverage
tsc/testdata/tests/cases/conformance/async/namespaceAwaitComputedName.tsclass A { [await x]() {} }andexport class B { [await x]() {} }within a namespace scope.