Homec4science

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

Authored by epriestley <git@epriestley.com> on Oct 14 2015, 01:22.

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

Details

Committed
epriestley <git@epriestley.com>Oct 14 2015, 01:22
Pushed
aubortMar 17 2017, 12:03
Parents
rPHUdbf792a053fc: Prevent exponential explosion of text-mode rendering of deeply nested…
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHU6d1072d17f90: Fix an issue where we infer the wrong type of a vector which mixes scalar types (authored by epriestley <git@epriestley.com>).Oct 14 2015, 01:22