use of com.google.javascript.jscomp.newtypes.JSTypes in project closure-compiler by google.
the class GlobalTypeInfoCollector method defineObjectAndFunctionIfMissing.
private void defineObjectAndFunctionIfMissing() {
JSTypes commonTypes = getCommonTypes();
if (commonTypes.getObjectType() == null) {
commonTypes.setObjectType(dummyRawTypeForMissingExterns("Object"));
}
if (commonTypes.getLiteralObjNominalType() == null) {
RawNominalType objLitRawType = dummyRawTypeForMissingExterns(JSTypes.OBJLIT_CLASS_NAME);
objLitRawType.addSuperClass(commonTypes.getObjectType());
commonTypes.setLiteralObjNominalType(objLitRawType);
}
if (commonTypes.getFunctionType() == null) {
commonTypes.setFunctionType(dummyRawTypeForMissingExterns("Function"));
}
}
Aggregations