Skip to content

Commit 9c6b0e6

Browse files
committed
Merge pull request #296 from jtbandes/fix-tests
Fix duplicate error and re-categorize test
2 parents a0f11ca + e437a0e commit 9c6b0e6

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

lib/Sema/TypeCheckDecl.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3194,12 +3194,11 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
31943194
void visitAssociatedTypeDecl(AssociatedTypeDecl *assocType) {
31953195
if (assocType->isBeingTypeChecked()) {
31963196

3197-
if (!assocType->hasType()) {
3197+
if (!assocType->isInvalid()) {
31983198
assocType->setInvalid();
31993199
assocType->overwriteType(ErrorType::get(TC.Context));
3200+
TC.diagnose(assocType->getLoc(), diag::circular_type_alias, assocType->getName());
32003201
}
3201-
3202-
TC.diagnose(assocType->getLoc(), diag::circular_type_alias, assocType->getName());
32033202
return;
32043203
}
32053204

validation-test/compiler_crashers/1741-swift-constraints-constraintsystem-simplifymemberconstraint.swift renamed to validation-test/compiler_crashers_fixed/1741-swift-constraints-constraintsystem-simplifymemberconstraint.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
1+
// RUN: not %target-swift-frontend %s -parse
22

33
// Distributed under the terms of the MIT license
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

0 commit comments

Comments
 (0)