@@ -51,10 +51,9 @@ class CompilerBaselineRunner extends RunnerBase {
5151 let justName : string ;
5252
5353 let lastUnit : Harness . TestCaseParser . TestUnitData ;
54- let tcSettings : Harness . TestCaseParser . CompilerSettings ;
54+ let harnessSettings : Harness . TestCaseParser . CompilerSettings ;
5555
5656 let result : Harness . Compiler . CompilerResult ;
57- let program : ts . Program ;
5857 let options : ts . CompilerOptions ;
5958 // equivalent to the files that will be passed on the command line
6059 let toBeCompiled : Harness . Compiler . TestFile [ ] ;
@@ -66,7 +65,7 @@ class CompilerBaselineRunner extends RunnerBase {
6665 const content = Harness . IO . readFile ( fileName ) ;
6766 const testCaseContent = Harness . TestCaseParser . makeUnitsFromTest ( content , fileName ) ;
6867 const units = testCaseContent . testUnitData ;
69- tcSettings = testCaseContent . settings ;
68+ harnessSettings = testCaseContent . settings ;
7069 lastUnit = units [ units . length - 1 ] ;
7170 const rootDir = lastUnit . originalFilePath . indexOf ( "conformance" ) === - 1 ? "tests/cases/compiler/" : lastUnit . originalFilePath . substring ( 0 , lastUnit . originalFilePath . lastIndexOf ( "/" ) ) + "/" ;
7271 // We need to assemble the list of input files for the compiler and other related files on the 'filesystem' (ie in a multi-file test)
@@ -88,12 +87,11 @@ class CompilerBaselineRunner extends RunnerBase {
8887 } ) ;
8988 }
9089
91- const output = Harness . Compiler . HarnessCompiler . compileFiles (
92- toBeCompiled , otherFiles , tcSettings , /* options */ undefined , /* currentDirectory */ undefined ) ;
90+ const output = Harness . Compiler . compileFiles (
91+ toBeCompiled , otherFiles , harnessSettings , /* options */ undefined , /* currentDirectory */ undefined ) ;
9392
9493 options = output . options ;
9594 result = output . result ;
96- program = output . program ;
9795 } ) ;
9896
9997 after ( ( ) => {
@@ -102,7 +100,6 @@ class CompilerBaselineRunner extends RunnerBase {
102100 justName = undefined ;
103101 lastUnit = undefined ;
104102 result = undefined ;
105- program = undefined ;
106103 options = undefined ;
107104 toBeCompiled = undefined ;
108105 otherFiles = undefined ;
@@ -175,8 +172,8 @@ class CompilerBaselineRunner extends RunnerBase {
175172 }
176173
177174 const declFileCompilationResult =
178- Harness . Compiler . HarnessCompiler . compileDeclarationFiles (
179- toBeCompiled , otherFiles , result , tcSettings , options , /*currentDirectory*/ undefined ) ;
175+ Harness . Compiler . compileDeclarationFiles (
176+ toBeCompiled , otherFiles , result , harnessSettings , options , /*currentDirectory*/ undefined ) ;
180177
181178 if ( declFileCompilationResult && declFileCompilationResult . declResult . errors . length ) {
182179 jsCode += "\r\n\r\n//// [DtsFileErrors]\r\n" ;
@@ -247,6 +244,7 @@ class CompilerBaselineRunner extends RunnerBase {
247244 // These types are equivalent, but depend on what order the compiler observed
248245 // certain parts of the program.
249246
247+ const program = result . program ;
250248 const allFiles = toBeCompiled . concat ( otherFiles ) . filter ( file => ! ! program . getSourceFile ( file . unitName ) ) ;
251249
252250 const fullWalker = new TypeWriterWalker ( program , /*fullTypeCheck*/ true ) ;
0 commit comments