Page MenuHomePhabricator

ZObjectFactory::createChild does redundant but incomplete list type check
Open, MediumPublic

Description

Description

ZObjectFactory::createChild when creating the instance of Type List, it checks that the first item is of the correct type. However:

  • This is supposed to be checked already, when ZObjectFactory::create does function-schemata validation
  • This check is incomplete, because there are resolver types missing (e.g. Z18)
  • The check could make sense if we were looking whether everything resolves to a Z4, which is the only thing that the function-schemata cannot do, but this is not being done here

So we need to figure out whether we want to:

  • Have an actual type check, and do it properly, or
  • Just have a structural validation check so we should remove this block altogether

Completion checklist