File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -2018,8 +2018,12 @@ module ts {
2018
2018
localizedDiagnosticMessages = host . getLocalizedDiagnosticMessages ( ) ;
2019
2019
}
2020
2020
2021
+ function getCanonicalFileName ( filename : string ) {
2022
+ return useCaseSensitivefilenames ? filename : filename . toLowerCase ( ) ;
2023
+ }
2024
+
2021
2025
function getSourceFile ( filename : string ) : SourceFile {
2022
- return lookUp ( sourceFilesByName , filename ) ;
2026
+ return lookUp ( sourceFilesByName , getCanonicalFileName ( filename ) ) ;
2023
2027
}
2024
2028
2025
2029
function getFullTypeCheckChecker ( ) {
@@ -2105,7 +2109,7 @@ module ts {
2105
2109
var filename = oldSourceFiles [ i ] . filename ;
2106
2110
if ( ! hostCache . contains ( filename ) || changesInCompilationSettingsAffectSyntax ) {
2107
2111
documentRegistry . releaseDocument ( filename , oldSettings ) ;
2108
- delete sourceFilesByName [ filename ] ;
2112
+ delete sourceFilesByName [ getCanonicalFileName ( filename ) ] ;
2109
2113
}
2110
2114
}
2111
2115
}
@@ -2148,7 +2152,7 @@ module ts {
2148
2152
}
2149
2153
2150
2154
// Remember the new sourceFile
2151
- sourceFilesByName [ filename ] = sourceFile ;
2155
+ sourceFilesByName [ getCanonicalFileName ( filename ) ] = sourceFile ;
2152
2156
}
2153
2157
2154
2158
// Now create a new compiler
You can’t perform that action at this time.
0 commit comments