HomePhabricator

Fix an issue where we infer the wrong type of a vector which mixes scalar types

Description

Fix an issue where we infer the wrong type of a vector which mixes scalar types

Summary:
See General Chat. Broadly, we infer the type of lists that have multiple different types in them incorrectly, and try to do silly stuff like get_parent_class("string"), which won't ever work.

Instead, correctly decline to detect a common base class between nonsense like "string" and "array".

This fixes the issues elsewhere and produces a useful error:

Parameter 'linters' has invalid type. Expected type 'map<string, map<string, wild>>', got type 'map<string, wild>'.

Test Plan: Added and ran unit test. Reproduced original error, verified this fixed it.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D14271