Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(469)

Unified Diff: lib/merge.ts

Issue 2434903002: Fix crash generating facades for loasd. Fix bug in how we handle TypePredicates. Add test for TypeP… (Closed)
Patch Set: Fix crash generating facades for loasd. Fix bug in how we handle TypePredicates. Add test for TypeP… Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/facade_converter.ts ('k') | package.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/merge.ts
diff --git a/lib/merge.ts b/lib/merge.ts
index 0a99b6676de595eb9ea7152d50211a0d95cbe49c..b04086c55d518aa52fe3649770cf1eff890623b3 100644
--- a/lib/merge.ts
+++ b/lib/merge.ts
@@ -136,7 +136,7 @@ export class MergedParameter {
private name: Set<string> = new Set();
private type: MergedType;
private optional: boolean = false;
- private textRange: ts.TextRange;
+ private textRange: ts.Node;
}
/**
@@ -174,7 +174,7 @@ export class MergedTypeParameter {
private name: string;
private constraint: MergedType;
- private textRange: ts.TextRange;
+ private textRange: ts.Node;
}
/**
@@ -212,7 +212,8 @@ export class MergedTypeParameters {
}
let ret = [] as ts.NodeArray<ts.TypeParameterDeclaration>;
- base.copyLocation(this.textRange, ret);
+ base.copyNodeArrayLocation(this.textRange, ret);
+
this.mergedParameters.forEach((mergedParameter) => {
ret.push(mergedParameter.toTypeParameterDeclaration());
});
@@ -329,7 +330,7 @@ export function normalizeSourceFile(f: ts.SourceFile, fc: FacadeConverter) {
base.copyLocation(declaration, clazz);
clazz.name = declaration.name as ts.Identifier;
clazz.members = <ts.NodeArray<ts.ClassElement>>[];
- base.copyLocation(declaration, clazz.members);
+ base.copyNodeArrayLocation(declaration, clazz.members);
replaceNode(n, clazz);
classes.set(name, clazz);
}
« no previous file with comments | « lib/facade_converter.ts ('k') | package.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698