mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add type to package inputs to UnqualifiedLookupRequest
This allows us use an OptionSet parameter for the request (as currently we can't directly use it as a parameter due to not having an == definition for it). It also allows us to regain default arguments for the source loc and flag parameters.
This commit is contained in:
@@ -115,9 +115,10 @@ bool ASTScript::execute() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
auto req = UnqualifiedLookupRequest{ctx.getIdentifier("View"), swiftUI,
|
||||
SourceLoc(), UnqualifiedLookupFlags()};
|
||||
auto viewLookup = evaluateOrDefault(ctx.evaluator, req, {});
|
||||
auto descriptor = UnqualifiedLookupDescriptor(ctx.getIdentifier("View"),
|
||||
swiftUI);
|
||||
auto viewLookup = evaluateOrDefault(ctx.evaluator,
|
||||
UnqualifiedLookupRequest{descriptor}, {});
|
||||
auto viewProtocol =
|
||||
dyn_cast_or_null<ProtocolDecl>(viewLookup.getSingleTypeResult());
|
||||
if (!viewProtocol) {
|
||||
|
||||
Reference in New Issue
Block a user