feat(compiler): do not evaluate metadata expressions that can use references (#18001)

This commit is contained in:
Chuck Jazdzewski
2017-07-13 17:16:56 -06:00
committed by Igor Minar
parent 72143e80da
commit ddb766e456
10 changed files with 264 additions and 42 deletions

View File

@ -191,6 +191,17 @@ export class StaticSymbolResolver {
}
}
/* @internal */
ignoreErrorsFor<T>(cb: () => T) {
const recorder = this.errorRecorder;
this.errorRecorder = () => {};
try {
return cb();
} finally {
this.errorRecorder = recorder;
}
}
private _resolveSymbolMembers(staticSymbol: StaticSymbol): ResolvedStaticSymbol|null {
const members = staticSymbol.members;
const baseResolvedSymbol =
@ -446,6 +457,7 @@ export class StaticSymbolResolver {
return moduleMetadata;
}
getSymbolByModule(module: string, symbolName: string, containingFile?: string): StaticSymbol {
const filePath = this.resolveModule(module, containingFile);
if (!filePath) {