Skip to content

Commit 35aea8b

Browse files
Remove crashing diagnostic code that wasn't helping us (microsoft#36913)
1 parent d33fb87 commit 35aea8b

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/services/importTracker.ts

-4
Original file line numberDiff line numberDiff line change
@@ -518,10 +518,6 @@ namespace ts.FindAllReferences {
518518
}
519519

520520
const sym = useLhsSymbol ? checker.getSymbolAtLocation(getNameOfAccessExpression(cast(node.left, isAccessExpression))) : symbol;
521-
// Better detection for GH#20803
522-
if (sym && !(checker.getMergedSymbol(sym.parent!).flags & SymbolFlags.Module)) {
523-
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!)}`);
524-
}
525521
return sym && exportInfo(sym, kind);
526522
}
527523
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/// <reference path="fourslash.ts" />
2+
3+
// @allowNonTsExtensions: true
4+
// @Filename: Foo.js
5+
//// /**/module.exports = {
6+
////
7+
//// }
8+
9+
goTo.marker();
10+
verify.occurrencesAtPositionCount(1);

0 commit comments

Comments
 (0)