mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Change SILParser::parseSILIdentifierSwitch to use the template parameter.
In `parseSILIdentifierSwitch`, `Result` has the type of one of the template parameters. Without this patch we are requiring `T` to be a `ValueOwnershipKind` (or convertible to that), which makes the function not usable on other result types and defeats the point of having a templated argument.
This commit is contained in:
@@ -264,7 +264,7 @@ namespace {
|
||||
return true;
|
||||
}
|
||||
|
||||
Result = ValueOwnershipKind(*Iter);
|
||||
Result = T(*Iter);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user