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 :
874
874
public:
875
875
// Caching.
876
876
bool isCached () const { return true ; }
877
+ void diagnoseCycle (DiagnosticEngine &diags) const ;
877
878
};
878
879
879
880
// / 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 {
819
819
aliasDecl->getName ());
820
820
}
821
821
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
+
822
833
// ----------------------------------------------------------------------------//
823
834
// EnumRawValuesRequest computation.
824
835
// ----------------------------------------------------------------------------//
You can’t perform that action at this time.
0 commit comments