Skip to content

Conversation

@mylesmegyesi
Copy link
Contributor

Fixes#12075

@DanielRosenwasserDanielRosenwasser merged commit 4701eb7 into microsoft:masterNov 23, 2016
@DanielRosenwasser
Copy link
Member

Thanks for the fix!

@mylesmegyesimylesmegyesi deleted the 12075-incorrectErrorMessageForUseOfTypeAsNamespace branch November 23, 2016 16:35
@mhegazymhegazy mentioned this pull request Nov 23, 2016

function checkAndReportErrorForUsingTypeAsNamespace(errorLocation: Node, name: string, meaning: SymbolFlags): boolean{
if (meaning === SymbolFlags.Namespace){
const symbol = resolveSymbol(resolveName(errorLocation, name, SymbolFlags.Type & ~SymbolFlags.Value, /*nameNotFoundMessage*/undefined, /*nameArg*/ undefined));
Copy link
Member

Choose a reason for hiding this comment

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

SymbolFlags.Type & ~SymbolFlags.Value excludes classes and enums. Was that intentional? cc @DanielRosenwasser

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess it should have been & ~SymbolFlags.Namespace instead

Copy link
Member

Choose a reason for hiding this comment

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

I could be missing something, but I don't think SymbolFlags.Type includes SymbolFlags.Namespace.

@microsoftmicrosoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for freeto 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.

5 participants

@mylesmegyesi@DanielRosenwasser@mhegazy@amcasey@msftclas