File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
validation-test/compiler_crashers_fixed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1995,8 +1995,10 @@ Type NominalTypeDecl::getDeclaredTypeInContext() const {
1995
1995
return DeclaredTyInContext;
1996
1996
1997
1997
auto *decl = const_cast <NominalTypeDecl *>(this );
1998
- decl->DeclaredTyInContext =
1999
- computeNominalType (decl, DeclTypeKind::DeclaredTypeInContext);
1998
+ auto Ty = computeNominalType (decl, DeclTypeKind::DeclaredTypeInContext);
1999
+ if (!Ty)
2000
+ Ty = ErrorType::get (getASTContext ());
2001
+ decl->DeclaredTyInContext = Ty;
2000
2002
return DeclaredTyInContext;
2001
2003
}
2002
2004
Original file line number Diff line number Diff line change 5
5
// See http://swift.org/LICENSE.txt for license information
6
6
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
7
7
8
- // RUN: not --crash %target-swift-frontend %s -parse
8
+ // RUN: not %target-swift-frontend %s -parse
9
9
let a { extension { enum k : String { { { } } case
You can’t perform that action at this time.
0 commit comments