Skip to content

Properly compute SymbolFlags.Optional for intersected properties - #50958

Merged
Anders Hejlsberg (ahejlsberg) merged 8 commits into
mainfrom
fix50954
Sep 29, 2022
Merged

Properly compute SymbolFlags.Optional for intersected properties#50958
Anders Hejlsberg (ahejlsberg) merged 8 commits into
mainfrom
fix50954

Conversation

@ahejlsberg

@ahejlsberg Anders Hejlsberg (ahejlsberg) commented Sep 27, 2022

Copy link
Copy Markdown
Member

With this PR, we ignore properties originating in non-property declarations (such as exported members of modules or the members of globalThis) for purposes of computing SymbolFlags.Optional for intersected properties. Non-property declarations can't specify optionality and therefore shouldn't affect the outcome.

Fixes #50954.

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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4.9 regression with in operator: object is incorrectly narrowed to never

5 participants