Skip to content

Commit 16a8b3c

Browse files
committed
Merge branch 'selfReferencingFileError' of https://github.com/chrisbubernak/TypeScript into selfReferencingFileError
Conflicts: src/compiler/parser.ts
2 parents ae17c35 + 75e04f2 commit 16a8b3c

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/compiler/parser.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3829,17 +3829,17 @@ module ts {
38293829
}
38303830
else {
38313831
var basePath = getDirectoryPath(file.filename);
3832-
var referenceFilename = normalizePath(combinePaths(basePath, matchResult[3]));
3833-
if (file.filename === referenceFilename) {
3834-
errorAtPos(range.pos, range.end - range.pos, Diagnostics.A_file_cannot_have_a_reference_to_itself);
3835-
}
3836-
else {
3837-
referencedFiles.push({
3838-
pos: range.pos,
3839-
end: range.end,
3840-
filename: matchResult[3]
3841-
});
3842-
}
3832+
var referenceFilename = normalizePath(combinePaths(basePath, matchResult[3]));
3833+
if (file.filename === referenceFilename) {
3834+
errorAtPos(range.pos, range.end - range.pos, Diagnostics.A_file_cannot_have_a_reference_to_itself);
3835+
}
3836+
else {
3837+
referencedFiles.push({
3838+
pos: range.pos,
3839+
end: range.end,
3840+
filename: matchResult[3]
3841+
});
3842+
}
38433843
}
38443844
}
38453845
}

0 commit comments

Comments
 (0)