FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

check if import collides with exported local name by vladima · Pull Request #7583 · microsoft/TypeScript · GitHub

check if import collides with exported local name - #7583

Merged
Vladimir Matveev (vladima) merged 1 commit into
masterfrom
colliding-local-import
Mar 18, 2016
Merged

check if import collides with exported local name#7583
Vladimir Matveev (vladima) merged 1 commit into
masterfrom
colliding-local-import

Conversation

Copy link
Copy Markdown
Contributor

fixes #7195

Comment thread src/compiler/checker.ts
// and symbol.flags will contains combined representation for all merged declaration.
// Based on symbol.flags we can compute a set of excluded meanings (meaning that resolved alias should not have,
// otherwise it will conflict with some local declaration). Note that in addition to normal flags we include matching SymbolFlags.Export*
// in order to prevent collisions with declarations that were exported from the current module (they still contribute to local names).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This means that previously we would correctly catch unexported functions, right? Like:

import {f} from "f1"
function f() { }

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

yes and we still do this

Copy link
Copy Markdown
Member

👍

1 similar comment

Copy link
Copy Markdown
Contributor

👍

Vladimir Matveev (vladima) added a commit that referenced this pull request Mar 18, 2016
check if import collides with exported local name
Vladimir Matveev (vladima) merged commit 32178ac into master Mar 18, 2016
Vladimir Matveev (vladima) deleted the colliding-local-import branch March 18, 2016 19:21
Vladimir Matveev (vladima) added a commit that referenced this pull request Mar 19, 2016
Microsoft (microsoft) locked and limited conversation to collaborators Jun 19, 2018
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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

import and export function name confliction should be an error

4 participants


Back | FazBrowse Home | New Git URL