mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Runtime] Evaluate layout constraints at runtime.
This commit is contained in:
@@ -758,6 +758,18 @@ bool swift::_checkGenericRequirements(
|
||||
continue;
|
||||
}
|
||||
|
||||
case GenericRequirementKind::Layout: {
|
||||
switch (req.getLayout()) {
|
||||
case GenericRequirementLayoutKind::Class:
|
||||
// Check whether the subject type is a class.
|
||||
if (!subjectType->isAnyClass()) return true;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Unknown layout.
|
||||
return true;
|
||||
}
|
||||
|
||||
// FIXME: Handle all of the other cases.
|
||||
default:
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user