-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Distributed] Survive generics with Sendable requirement in executeDistributedTarget #41854
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1234,11 +1234,16 @@ llvm::Optional<TypeLookupError> swift::_checkGenericRequirements( | |
llvm::ArrayRef<GenericRequirementDescriptor> requirements, | ||
llvm::SmallVectorImpl<const void *> &extraArguments, | ||
SubstGenericParameterFn substGenericParam, | ||
SubstDependentWitnessTableFn substWitnessTable) { | ||
SubstDependentWitnessTableFn substWitnessTable, bool skipUnknownKinds) { | ||
for (const auto &req : requirements) { | ||
// Make sure we understand the requirement we're dealing with. | ||
if (!req.hasKnownKind()) | ||
return TypeLookupError("unknown kind"); | ||
if (!req.hasKnownKind()) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so the kind here ends up being some weird 24 for the Sendable requirement... But the same issue would happen with any other @_marker protocol I suppose... |
||
if (skipUnknownKinds) { | ||
continue; | ||
} else { | ||
return TypeLookupError("unknown kind"); | ||
} | ||
} | ||
|
||
// Resolve the subject generic parameter. | ||
auto result = swift_getTypeByMangledName( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the future, should we consider a runtime representation that indicates the requirement came from a marker protocol? Having any representation at runtime sounds like it goes against the purpose of a marker protocol, but I guess that was unavoidable in this case?