mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[PrintAsObjC] Include a message when making +new unavailable
Another follow-up to 49c65facc9. We've seen a few people run into
this and not know what changed.
rdar://problem/35942058
This commit is contained in:
@@ -679,7 +679,8 @@ private:
|
||||
|
||||
if (makeNewUnavailable) {
|
||||
assert(!makeNewExplicitlyAvailable);
|
||||
os << "+ (nonnull instancetype)new SWIFT_UNAVAILABLE;\n";
|
||||
os << "+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("
|
||||
"\"-init is unavailable\");\n";
|
||||
} else if (makeNewExplicitlyAvailable) {
|
||||
os << "+ (nonnull instancetype)new;\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user