mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 02:33:53 -06:00
Remove crashing diagnostic code that wasn't helping us (#36913)
This commit is contained in:
parent
d33fb87da8
commit
35aea8bbfa
@ -518,10 +518,6 @@ namespace ts.FindAllReferences {
|
||||
}
|
||||
|
||||
const sym = useLhsSymbol ? checker.getSymbolAtLocation(getNameOfAccessExpression(cast(node.left, isAccessExpression))) : symbol;
|
||||
// Better detection for GH#20803
|
||||
if (sym && !(checker.getMergedSymbol(sym.parent!).flags & SymbolFlags.Module)) {
|
||||
Debug.fail(`Special property assignment kind does not have a module as its parent. Assignment is ${Debug.formatSymbol(sym)}, parent is ${Debug.formatSymbol(sym.parent!)}`);
|
||||
}
|
||||
return sym && exportInfo(sym, kind);
|
||||
}
|
||||
}
|
||||
|
||||
10
tests/cases/fourslash/emptyExportFindReferences.ts
Normal file
10
tests/cases/fourslash/emptyExportFindReferences.ts
Normal file
@ -0,0 +1,10 @@
|
||||
/// <reference path="fourslash.ts" />
|
||||
|
||||
// @allowNonTsExtensions: true
|
||||
// @Filename: Foo.js
|
||||
//// /**/module.exports = {
|
||||
////
|
||||
//// }
|
||||
|
||||
goTo.marker();
|
||||
verify.occurrencesAtPositionCount(1);
|
||||
Loading…
x
Reference in New Issue
Block a user