typeRegistry.declareType("Foo",
typeRegistry.createAnonymousObjectType(null));
typeRegistry.resolveTypesInScope(scope);
assertTrue(functionType.getReturnType().isUnknownType());
assertNull("Unexpected errors: " + reporter.errors(),
reporter.errors());
assertNull("Unexpected warnings: " + reporter.warnings(),
reporter.warnings());
// After incrementing the generation, resolve works again.