File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
validation-test/compiler_crashers_fixed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -292,9 +292,12 @@ void AttributeEarlyChecker::visitIBActionAttr(IBActionAttr *attr) {
292
292
293
293
void AttributeEarlyChecker::visitIBDesignableAttr (IBDesignableAttr *attr) {
294
294
if (auto *ED = dyn_cast<ExtensionDecl>(D)) {
295
- NominalTypeDecl *extendedType = ED->getExtendedType ()->getAnyNominal ();
296
- if (extendedType && !isa<ClassDecl>(extendedType))
297
- return diagnoseAndRemoveAttr (attr, diag::invalid_ibdesignable_extension);
295
+ if (auto extendedType = ED->getExtendedType ()) {
296
+ if (auto *nominalDecl = extendedType->getAnyNominal ()) {
297
+ if (!isa<ClassDecl>(nominalDecl))
298
+ return diagnoseAndRemoveAttr (attr, diag::invalid_ibdesignable_extension);
299
+ }
300
+ }
298
301
}
299
302
}
300
303
Original file line number Diff line number Diff line change 5
5
// See https://swift.org/LICENSE.txt for license information
6
6
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
7
7
8
- // RUN: not --crash %target-swift-frontend %s -emit-ir
8
+ // RUN: not %target-swift-frontend %s -emit-ir
9
9
do { @IBDesignable extension
You can’t perform that action at this time.
0 commit comments