Skip to content

Commit 492a352

Browse files
committed
Merge pull request #3224 from Microsoft/port-3117
Port PR 3117 into release 1.5
2 parents eaee9ec + fd5dfb6 commit 492a352

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/program.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ module ts {
238238
}
239239

240240
function getSourceFile(fileName: string) {
241-
fileName = host.getCanonicalFileName(fileName);
241+
fileName = host.getCanonicalFileName(normalizeSlashes(fileName));
242242
return hasProperty(filesByName, fileName) ? filesByName[fileName] : undefined;
243243
}
244244

@@ -350,7 +350,7 @@ module ts {
350350

351351
// Get source file from normalized fileName
352352
function findSourceFile(fileName: string, isDefaultLib: boolean, refFile?: SourceFile, refStart?: number, refLength?: number): SourceFile {
353-
let canonicalName = host.getCanonicalFileName(fileName);
353+
let canonicalName = host.getCanonicalFileName(normalizeSlashes(fileName));
354354
if (hasProperty(filesByName, canonicalName)) {
355355
// We've already looked for this file, use cached result
356356
return getSourceFileFromCache(fileName, canonicalName, /*useAbsolutePath*/ false);

0 commit comments

Comments
 (0)