Files
swift-mirror/lib/Sema/ConstraintSystem.cpp
Slava Pestov 443ba236fc Sema: Fix a few problems with generic typealiases in protocols
- Unqualified lookup was incorrectly checking generic arguments even
  when resolving interface types, resulting in a bogus 'Self does
  not conform to P' error when referencing a generic typealias from
  inside a protocol.

- The generic argument check was also done incorrectly if the
  underlying type did not contain any type parameters, resulting
  in bogus ErrorTypes. Just remove the no-type-parameter
  "optimization" instead, since it was working around another
  crash.

- When opening up a generic typealias in the constraint solver, we
  did the wrong thing if the generic typealias was defined in a
  protocol, producing concrete substitutions for the parent type
  instead of a 'Self := ParentType' substitution.

Fixes <rdar://problem/32633645>.
2017-06-07 18:33:46 -07:00

66 KiB