mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add optional message to unavailablefromasync
Adding the ability to add an optional message to the unavailable from async attribute. This can be used to indicate other possible API to use, or help explain why it's unavailable.
This commit is contained in:
@@ -2754,6 +2754,16 @@ class Serializer::DeclSerializer : public DeclVisitor<DeclSerializer> {
|
||||
TypeSequenceDeclAttrLayout::emitRecord(S.Out, S.ScratchRecord, abbrCode);
|
||||
return;
|
||||
}
|
||||
|
||||
case DAK_UnavailableFromAsync: {
|
||||
auto abbrCode =
|
||||
S.DeclTypeAbbrCodes[UnavailableFromAsyncDeclAttrLayout::Code];
|
||||
auto *theAttr = cast<UnavailableFromAsyncAttr>(DA);
|
||||
UnavailableFromAsyncDeclAttrLayout::emitRecord(
|
||||
S.Out, S.ScratchRecord, abbrCode, theAttr->isImplicit(),
|
||||
theAttr->Message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user