File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -874,6 +874,7 @@ class StructuralTypeRequest :
874874public:
875875 // Caching.
876876 bool isCached () const { return true ; }
877+ void diagnoseCycle (DiagnosticEngine &diags) const ;
877878};
878879
879880// / Request the fragile function kind for the context.
Original file line number Diff line number Diff line change @@ -819,6 +819,17 @@ void UnderlyingTypeRequest::diagnoseCycle(DiagnosticEngine &diags) const {
819819 aliasDecl->getName ());
820820}
821821
822+ // ----------------------------------------------------------------------------//
823+ // StructuralTypeRequest computation.
824+ // ----------------------------------------------------------------------------//
825+
826+ void StructuralTypeRequest::diagnoseCycle (DiagnosticEngine &diags) const {
827+ auto aliasDecl = std::get<0 >(getStorage ());
828+ diags.diagnose (aliasDecl, diag::recursive_decl_reference,
829+ aliasDecl->getDescriptiveKind (),
830+ aliasDecl->getName ());
831+ }
832+
822833// ----------------------------------------------------------------------------//
823834// EnumRawValuesRequest computation.
824835// ----------------------------------------------------------------------------//
You can’t perform that action at this time.
0 commit comments