Skip to content

Fix getDeclarationModifierFlagsFromSymbolEx for synthetic properties - #63932

Open
Anders Hejlsberg (ahejlsberg) wants to merge 2 commits into
mainfrom
fix-63749
Open

Fix getDeclarationModifierFlagsFromSymbolEx for synthetic properties#63932
Anders Hejlsberg (ahejlsberg) wants to merge 2 commits into
mainfrom
fix-63749

Conversation

@ahejlsberg

Copy link
Copy Markdown
Member

Fixes #63749.

Copilot AI balanced review requested due to automatic review settings August 20, 2026 20:22
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Aug 20, 2026
@typescript-automation typescript-automation Bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Aug 20, 2026
@ahejlsberg

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) test it

@typescript-automation

typescript-automation Bot commented Aug 20, 2026

Copy link
Copy Markdown

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
test top400 ✅ Started ✅ Results
user test this ✅ Started ✅ Results
run dt ✅ Started ❌ Results
perf test this faster ✅ Started 👀 Results

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes synthetic intersection property accessibility so public constituents are not incorrectly treated as protected.

Changes:

  • Prioritizes aggregate accessibility flags for synthetic symbols.
  • Adds regression coverage and symbol/type baselines for #63749.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tsc/internal/checker/utilities.go Changes synthetic modifier resolution order.
tsc/testdata/tests/cases/compiler/syntheticProtectedProperties.ts Adds regression scenarios.
tsc/testdata/baselines/reference/compiler/syntheticProtectedProperties.types Records inferred types.
tsc/testdata/baselines/reference/compiler/syntheticProtectedProperties.symbols Records resolved symbols.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

}

func getDeclarationModifierFlagsFromSymbolEx(s *ast.Symbol, isWrite bool) ast.ModifierFlags {
if s.CheckFlags&ast.CheckFlagsSynthetic != 0 {
@typescript-automation

Copy link
Copy Markdown

Hey Anders Hejlsberg (@ahejlsberg), it looks like the DT test run failed. Please check the log for more details.

You can check the log here.

@typescript-automation

Copy link
Copy Markdown

Anders Hejlsberg (@ahejlsberg)
The results of the perf run you requested are in!

Here they are:

tsc

Comparison Report - baseline..pr
Metric baseline pr Delta Best Worst p-value
Compiler-Unions - native
Errors 41 41 ~ ~ ~ p=1.000 n=12
Symbols 115,480 115,480 ~ ~ ~ p=1.000 n=12
Types 96,945 96,945 ~ ~ ~ p=1.000 n=12
Memory Used 149,139k (± 0.60%) 148,278k (± 0.52%) ~ 146,723k 151,195k p=0.143 n=12
Memory Allocs 2,270,897 (± 0.01%) 2,270,969 (± 0.01%) ~ 2,270,639 2,271,423 p=0.434 n=12
Config Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Parse Time 0.041s (± 3.87%) 0.041s (± 5.01%) ~ 0.037s 0.046s p=0.539 n=12
Bind Time 0.012s (±13.03%) 0.013s (±10.35%) ~ 0.010s 0.016s p=0.113 n=12
Check Time 0.490s (± 1.17%) 0.493s (± 1.32%) ~ 0.479s 0.510s p=0.468 n=12
Emit Time 0.274s (± 2.13%) 0.271s (± 1.75%) ~ 0.262s 0.287s p=0.353 n=12
Total Time 0.823s (± 1.19%) 0.825s (± 1.20%) ~ 0.806s 0.850s p=0.744 n=12
angular-1 - native
Errors 3 3 ~ ~ ~ p=1.000 n=12
Symbols 847,270 (± 0.08%) 847,269 (± 0.07%) ~ 845,729 848,825 p=1.000 n=12
Types 249,860 (± 0.00%) 249,859 (± 0.00%) ~ 249,856 249,861 p=0.736 n=12
Memory Used 793,629k (± 0.05%) 793,590k (± 0.06%) ~ 792,149k 795,364k p=0.713 n=12
Memory Allocs 12,955,311 (± 0.04%) 12,952,484 (± 0.02%) ~ 12,949,195 12,959,690 p=0.378 n=12
Config Time 0.016s (± 1.13%) 0.016s (± 1.75%) ~ 0.016s 0.017s p=0.590 n=12
Parse Time 0.277s (± 3.27%) 0.271s (± 2.52%) ~ 0.253s 0.288s p=0.097 n=12
Bind Time 0.066s (±17.34%) 0.067s (±15.59%) ~ 0.058s 0.114s p=0.784 n=12
Check Time 0s 0s ~ ~ ~ p=1.000 n=12
Emit Time 1.639s (± 0.77%) 1.642s (± 1.20%) ~ 1.611s 1.718s p=0.854 n=12
Total Time 2.013s (± 0.84%) 2.014s (± 1.60%) ~ 1.969s 2.152s p=0.401 n=12
mui-docs - native
Errors 11,278 (± 0.04%) 11,278 (± 0.04%) ~ 11,255 11,282 p=0.951 n=12
Symbols 4,541,549 4,541,549 ~ ~ ~ p=1.000 n=12
Types 1,639,133 1,639,133 ~ ~ ~ p=1.000 n=12
Memory Used 5,548,396k (± 0.02%) 5,548,496k (± 0.02%) ~ 5,545,899k 5,550,817k p=0.932 n=12
Memory Allocs 53,148,040 (± 0.03%) 53,140,343 (± 0.03%) ~ 53,109,962 53,191,655 p=0.219 n=12
Config Time 0.016s (± 1.55%) 0.016s ~ ~ ~ p=0.478 n=12
Parse Time 0.541s (± 1.84%) 0.553s (± 2.85%) ~ 0.494s 0.583s p=0.091 n=12
Bind Time 0.002s 0.002s ~ ~ ~ p=1.000 n=12
Check Time 14.790s (± 0.89%) 14.823s (± 0.87%) ~ 14.599s 15.287s p=0.932 n=12
Emit Time 0.570s (±13.77%) 0.527s (±10.56%) ~ 0.431s 0.651s p=0.580 n=12
Total Time 16.686s (± 0.89%) 16.671s (± 0.90%) ~ 16.312s 17.043s p=0.977 n=12
strada-build-src - native
Errors 0 0 ~ ~ ~ p=1.000 n=12
Symbols 1,394,339 1,394,339 ~ ~ ~ p=1.000 n=12
Types 443,465 443,465 ~ ~ ~ p=1.000 n=12
Memory Used 1,652,353k (± 0.38%) 1,646,749k (± 0.31%) ~ 1,634,864k 1,657,879k p=0.160 n=12
Memory Allocs 97,098,524 (± 0.04%) 97,054,099 (± 0.04%) ~ 96,945,069 97,141,403 p=0.089 n=12
Config Time 0.004s (±22.35%) 0.004s (±14.99%) ~ 0.002s 0.006s p=0.289 n=12
Parse Time 0.194s (± 2.44%) 0.196s (± 1.79%) ~ 0.188s 0.206s p=0.296 n=12
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Check Time 1.780s (± 0.38%) 1.778s (± 0.48%) ~ 1.758s 1.801s p=0.486 n=12
Emit Time 0.293s (± 5.38%) 0.286s (± 5.02%) ~ 0.244s 0.312s p=0.561 n=12
Total Time 24.625s (± 0.67%) 24.570s (± 0.73%) ~ 24.097s 25.261s p=0.579 n=12
strada-compiler - native
Errors 0 0 ~ ~ ~ p=1.000 n=12
Symbols 337,586 337,586 ~ ~ ~ p=1.000 n=12
Types 198,869 198,869 ~ ~ ~ p=1.000 n=12
Memory Used 319,552k (± 0.04%) 319,549k (± 0.03%) ~ 319,384k 319,882k p=0.843 n=12
Memory Allocs 4,674,040 (± 0.01%) 4,673,952 (± 0.01%) ~ 4,673,257 4,674,813 p=0.799 n=12
Config Time 0.001s 0.001s ~ ~ ~ p=1.000 n=12
Parse Time 0.118s (± 3.80%) 0.120s (± 3.28%) ~ 0.113s 0.131s p=0.433 n=12
Bind Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Check Time 1.039s (± 0.53%) 1.033s (± 0.48%) ~ 1.024s 1.049s p=0.123 n=12
Emit Time 0.140s (±11.61%) 0.148s (± 9.69%) ~ 0.106s 0.170s p=0.619 n=12
Total Time 1.350s (± 0.70%) 1.354s (± 0.84%) ~ 1.319s 1.383s p=0.681 n=12
ts-pre-modules - native
Errors 87 87 ~ ~ ~ p=1.000 n=12
Symbols 305,317 305,317 ~ ~ ~ p=1.000 n=12
Types 181,984 181,984 ~ ~ ~ p=1.000 n=12
Memory Used 277,306k (± 0.03%) 277,251k (± 0.02%) ~ 277,098k 277,415k p=0.160 n=12
Memory Allocs 1,643,337 (± 0.02%) 1,643,116 (± 0.01%) ~ 1,642,607 1,643,797 p=0.248 n=12
Config Time 0.000s (±146.91%) 0.000s ~ ~ ~ p=0.478 n=12
Parse Time 0.101s (± 3.46%) 0.100s (± 4.36%) ~ 0.090s 0.110s p=0.765 n=12
Bind Time 0.040s (± 9.15%) 0.038s (±13.05%) ~ 0.028s 0.051s p=0.468 n=12
Check Time 0.825s (± 0.46%) 0.827s (± 0.65%) ~ 0.810s 0.839s p=0.368 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 0.981s (± 0.68%) 0.980s (± 0.71%) ~ 0.966s 1.007s p=0.401 n=12
vscode - native
Errors 0 0 ~ ~ ~ p=1.000 n=12
Symbols 7,876,305 7,876,302 -3 (- 0.00%) ~ ~ p=0.000 n=12
Types 2,715,228 2,715,228 ~ ~ ~ p=1.000 n=12
Memory Used 5,311,564k (± 0.02%) 5,310,663k (± 0.01%) ~ 5,308,854k 5,312,026k p=0.128 n=12
Memory Allocs 40,958,234 (± 0.01%) 40,954,941 (± 0.01%) ~ 40,946,871 40,962,637 p=0.198 n=12
Config Time 0.062s (± 0.43%) 0.062s (± 0.73%) ~ 0.061s 0.064s p=0.752 n=12
Parse Time 1.598s (± 1.35%) 1.586s (± 2.69%) ~ 1.444s 1.662s p=0.966 n=12
Bind Time 0.333s (± 0.51%) 0.387s (±20.25%) ~ 0.331s 0.690s p=0.633 n=12
Check Time 9.973s (± 0.45%) 9.916s (± 1.38%) ~ 9.440s 10.096s p=0.854 n=12
Emit Time 3.064s (± 3.49%) 3.292s (±12.35%) ~ 2.969s 4.714s p=0.713 n=12
Total Time 15.108s (± 0.41%) 15.325s (± 2.08%) ~ 15.036s 16.470s p=0.311 n=12
webpack - native
Errors 2 2 ~ ~ ~ p=1.000 n=12
Symbols 1,380 1,380 ~ ~ ~ p=1.000 n=12
Types 340 340 ~ ~ ~ p=1.000 n=12
Memory Used 200,224k (± 0.06%) 200,257k (± 0.05%) ~ 200,008k 200,523k p=0.671 n=12
Memory Allocs 850,409 (± 0.14%) 849,835 (± 0.13%) ~ 848,003 854,138 p=0.378 n=12
Config Time 0.009s (± 7.03%) 0.009s (± 7.33%) ~ 0.008s 0.010s p=1.000 n=12
Parse Time 0.235s (± 1.68%) 0.233s (± 2.38%) ~ 0.217s 0.244s p=0.659 n=12
Bind Time 0s 0s ~ ~ ~ p=1.000 n=12
Check Time 0s 0s ~ ~ ~ p=1.000 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 0.245s (± 1.76%) 0.242s (± 2.35%) ~ 0.227s 0.254s p=0.619 n=12
xstate-main - native
Errors 0 0 ~ ~ ~ p=1.000 n=12
Symbols 1,019,981 1,019,981 ~ ~ ~ p=1.000 n=12
Types 376,182 376,182 ~ ~ ~ p=1.000 n=12
Memory Used 603,450k (± 0.02%) 603,415k (± 0.02%) ~ 603,213k 603,732k p=0.378 n=12
Memory Allocs 4,750,715 (± 0.04%) 4,750,531 (± 0.05%) ~ 4,744,298 4,755,293 p=0.932 n=12
Config Time 0.003s (± 6.23%) 0.003s ~ ~ ~ p=1.000 n=12
Parse Time 0.143s (± 3.53%) 0.147s (± 2.97%) ~ 0.136s 0.159s p=0.339 n=12
Bind Time 0.049s (±19.01%) 0.042s (±17.83%) ~ 0.030s 0.065s p=0.257 n=12
Check Time 1.022s (± 0.91%) 1.030s (± 1.48%) ~ 0.986s 1.064s p=0.326 n=12
Emit Time 0.000s 0.000s ~ ~ ~ p=1.000 n=12
Total Time 1.229s (± 1.14%) 1.230s (± 1.26%) ~ 1.184s 1.262s p=0.965 n=12
System info unknown
Hosts
  • native
Scenarios
  • Compiler-Unions - native
  • angular-1 - native
  • mui-docs - native
  • strada-build-src - native
  • strada-compiler - native
  • ts-pre-modules - native
  • vscode - native
  • webpack - native
  • xstate-main - native
Benchmark Name Iterations
Current pr 12
Baseline baseline 12

Developer Information:

Download Benchmarks

@typescript-automation

Copy link
Copy Markdown

Anders Hejlsberg (@ahejlsberg) Here are the results of running the user tests with tsc comparing main and refs/pull/63932/merge:

There were infrastructure failures potentially unrelated to your change:

  • 2 instances of "Package install failed"
  • 1 instance of "Git clone failed"

Otherwise...

Everything looks good!

@typescript-automation

Copy link
Copy Markdown

Anders Hejlsberg (@ahejlsberg) Here are the results of running the top 400 repos with tsc comparing main and refs/pull/63932/merge:

Everything looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: Team For Milestone Bug PRs that fix a bug with a specific milestone

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

[7.0] Can't access field if it is protected in one constituent of an intersection (type order dependent)

2 participants