Overlap of free variables and other types should not be empty

Description

Problem

Intersections containing type variables and values like

are being simplified to

We cannot predict what a type variable overlaps with (well, technically we could use its type bounds, but let's be more conservative for now), so this intersection should be left unchanged.

Solution

Overlap is the culprit. Ensure there is always an overlap between type variables and other types.

Pull request: 82
Commit: c1cfba87

Environment

None
Completed

Assignee

Ambrose Bonnaire-Sergeant

Reporter

Ambrose Bonnaire-Sergeant

Labels

None

Approval

None

Patch

None

Fix versions

Priority

Major