mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
When an error import would conflict with another method,
preserve the original method name. This heuristic is based on the Objective-C selector and therefore doesn't really handle factory methods that would conflict with initializers, but we can hope that those simply don't come up in the wild. It's not clear that this is the best thing to do --- it tends to promote the non-throwing API over what's probably a newer, throwing API --- but it's significantly easier, and it unblocks code without creating deployment problems. Swift SVN r28066
This commit is contained in:
@@ -1829,6 +1829,7 @@ void Serializer::writeForeignErrorConvention(const ForeignErrorConvention &fec){
|
||||
|
||||
auto kind = getRawStableForeignErrorConventionKind(fec.getKind());
|
||||
uint8_t isOwned = fec.isErrorOwned() == ForeignErrorConvention::IsOwned;
|
||||
uint8_t isReplaced = bool(fec.isErrorParameterReplacedWithVoid());
|
||||
TypeID errorParameterTypeID = addTypeRef(fec.getErrorParameterType());
|
||||
TypeID resultTypeID;
|
||||
switch (fec.getKind()) {
|
||||
@@ -1847,6 +1848,7 @@ void Serializer::writeForeignErrorConvention(const ForeignErrorConvention &fec){
|
||||
ForeignErrorConventionLayout::emitRecord(Out, ScratchRecord, abbrCode,
|
||||
static_cast<uint8_t>(kind),
|
||||
isOwned,
|
||||
isReplaced,
|
||||
fec.getErrorParameterIndex(),
|
||||
errorParameterTypeID,
|
||||
resultTypeID);
|
||||
|
||||
Reference in New Issue
Block a user