@@ -169,7 +169,7 @@ class CircularityChecker {
169
169
bool diagnoseInfiniteRecursion (CanType parentType, ValueDecl *member,
170
170
CanType memberType);
171
171
172
- void diagnoseInconstructible (EnumDecl *E);
172
+ void diagnoseNotConstructible (EnumDecl *E);
173
173
174
174
void addPathElementsTo (Path &path, CanType type);
175
175
void addPathElement (Path &path, ValueDecl *member, CanType memberType);
@@ -275,7 +275,7 @@ bool CircularityChecker::expandEnum(CanType type, EnumDecl *E,
275
275
unsigned depth) {
276
276
// Indirect enums are representational leaves.
277
277
if (E->isIndirect ()) {
278
- diagnoseInconstructible (E);
278
+ diagnoseNotConstructible (E);
279
279
return false ;
280
280
}
281
281
@@ -303,7 +303,7 @@ bool CircularityChecker::expandEnum(CanType type, EnumDecl *E,
303
303
if (addMember (type, elt, eltType, depth))
304
304
return true ;
305
305
}
306
- diagnoseInconstructible (E);
306
+ diagnoseNotConstructible (E);
307
307
308
308
return false ;
309
309
}
@@ -608,9 +608,9 @@ bool CircularityChecker::diagnoseInfiniteRecursion(CanType parentType,
608
608
return true ;
609
609
}
610
610
611
- // Show a warning if the enum is inconstructible . The outcome of this method
612
- // is irrelevant.
613
- void CircularityChecker::diagnoseInconstructible (EnumDecl *E) {
611
+ // / Show a warning if the enum is not constructible . The outcome of this method
612
+ // / is irrelevant.
613
+ void CircularityChecker::diagnoseNotConstructible (EnumDecl *E) {
614
614
615
615
auto containsType = [](TupleType *tuple, Type E) -> bool {
616
616
for (auto type: tuple->getElementTypes ()) {
@@ -619,7 +619,7 @@ void CircularityChecker::diagnoseInconstructible(EnumDecl *E) {
619
619
}
620
620
return false ;
621
621
};
622
- auto isInconstructible = [containsType, E]() -> bool {
622
+ auto isNotConstructible = [containsType, E]() -> bool {
623
623
auto elts = E->getAllElements ();
624
624
if (elts.empty ())
625
625
return false ;
@@ -644,6 +644,6 @@ void CircularityChecker::diagnoseInconstructible(EnumDecl *E) {
644
644
return true ;
645
645
};
646
646
647
- if (isInconstructible ())
648
- TC.diagnose (E, diag::type_not_constructible );
647
+ if (isNotConstructible ())
648
+ TC.diagnose (E, diag::enum_not_constructible );
649
649
}
0 commit comments