mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Merge branch 'master' into bom
Conflicts: src/compiler/commandLineParser.ts src/compiler/emitter.ts
This commit is contained in:
@@ -740,13 +740,13 @@ module Harness {
|
||||
checker.checkProgram();
|
||||
|
||||
// only emit if there weren't parse errors
|
||||
var sourceMapData: ts.SourceMapData[];
|
||||
var emitResult: ts.EmitResult;
|
||||
if (!hadParseErrors) {
|
||||
sourceMapData = checker.emitFiles().sourceMaps;
|
||||
emitResult = checker.emitFiles();
|
||||
}
|
||||
|
||||
var errors: MinimalDiagnostic[] = [];
|
||||
program.getDiagnostics().concat(checker.getDiagnostics()).forEach(err => {
|
||||
program.getDiagnostics().concat(checker.getDiagnostics()).concat(emitResult ? emitResult.errors : []).forEach(err => {
|
||||
// TODO: new compiler formats errors after this point to add . and newlines so we'll just do it manually for now
|
||||
errors.push({ filename: err.file && err.file.filename, start: err.start, end: err.start + err.length, line: 0, character: 0, message: err.messageText });
|
||||
});
|
||||
@@ -754,7 +754,7 @@ module Harness {
|
||||
|
||||
var result = new CompilerResult(fileOutputs, errors, []);
|
||||
// Covert the source Map data into the baseline
|
||||
result.updateSourceMapRecord(program, sourceMapData);
|
||||
result.updateSourceMapRecord(program, emitResult ? emitResult.sourceMaps : undefined);
|
||||
onComplete(result);
|
||||
|
||||
// reset what newline means in case the last test changed it
|
||||
|
||||
Reference in New Issue
Block a user