mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Sema: Hook up layout constraints to the solver
There were various problems with layout constraints either being ignored or handled incorrectly. Now that I've exercised this support with an upcoming patch, there are some fixes here. Also, introduce a new ExistentialLayout::getLayoutConstriant() which returns a value for existentials which are class-constrained but don't have a superclass or any class-constrained protocols; an example would be AnyObject, or AnyObject & P for some non-class protocol P. NFC for now, since these layout-constrained existentials cannot be constructed yet.
This commit is contained in:
@@ -3261,7 +3261,8 @@ bool swift::isExtensionApplied(DeclContext &DC, Type BaseTy,
|
||||
createMemberConstraint(Req, ConstraintKind::ConformsTo);
|
||||
break;
|
||||
case RequirementKind::Layout:
|
||||
createMemberConstraint(Req, ConstraintKind::Layout);
|
||||
// FIXME FIXME FIXME
|
||||
createMemberConstraint(Req, ConstraintKind::ConformsTo);
|
||||
break;
|
||||
case RequirementKind::Superclass:
|
||||
createMemberConstraint(Req, ConstraintKind::Subtype);
|
||||
|
||||
Reference in New Issue
Block a user