Skip to content

Commit 93e344b

Browse files
committed
Skip self ref
1 parent 4cb902d commit 93e344b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/compiler/program.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3944,6 +3944,9 @@ export function createProgram(_rootNamesOrOptions: readonly string[] | CreatePro
39443944
if (libFileName) {
39453945
// we ignore any 'no-default-lib' reference set on this file.
39463946
for (const p of pathsForLibFile(libFileName)) {
3947+
if (file.fileName === p) {
3948+
continue;
3949+
}
39473950
processRootFile(p, /*isDefaultLib*/ true, /*ignoreNoDefaultLib*/ true, { kind: FileIncludeKind.LibReferenceDirective, file: file.path, index });
39483951
}
39493952
}

0 commit comments

Comments
 (0)