We were attempting to clean up stray type variables before creating a
new constraint system and moving forward with narrowing down the
typecheck failure, but we were failing to remove type variables for
interpolated strings.
Fix that, as well as removing them from TypeExpr's, and add an assert
that on exit from the pre-order visitor we don't have any type
variables (except for literals that aren't interpolated strings, which
I'm going to dig into further).
Fixes rdar://problem/27830834 and SR-2716.
Fully-qualified references to associated types in parameter lists of
constructors could result in infinite recursion and crash the compiler
when the typealias for the associated type is not defined.
Use the same approach used in normal function parameter lists of setting
IsBeingTypeChecked on the enclosing type to avoid going into an infinite
recursion here.
Resolves rdar://problem/27680407.
Add minimized test for rdar://problem/27830834.
In a build with asserts enabled assert with:
(TypeVariables[impl.getGraphIndex()] == typeVar && "Type variable mismatch")
Add minimized tests for:
rdar://problem/27464577
rdar://problem/27575060
rdar://problem/27680407
rdar://problem/27787341
rdar://problem/27815848
As these (and other tests added here) are fixed, we can move them into a
new type_checker_crashers_fixed directory.