if (asyncSource == null) {
AnalysisEngine.getInstance().getLogger().logError(
"Could not create a source for dart:async");
return VoidTypeImpl.getInstance();
}
LibraryElement asyncElement = context.computeLibraryElement(asyncSource);
if (asyncElement == null) {
AnalysisEngine.getInstance().getLogger().logError(
"Could not build the element model for dart:async");
return VoidTypeImpl.getInstance();
}
ClassElement futureElement = asyncElement.getType("Future");
if (futureElement == null) {
AnalysisEngine.getInstance().getLogger().logError(
"Could not find type Future in dart:async");
return VoidTypeImpl.getInstance();
}