File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
validation-test/Serialization/AllowErrors Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -4168,6 +4168,13 @@ class Serializer::TypeSerializer : public TypeVisitor<TypeSerializer> {
4168
4168
}
4169
4169
4170
4170
void visitUnresolvedType (const UnresolvedType *) {
4171
+ // If for some reason we have an unresolved type while compiling with
4172
+ // errors, just serialize an ErrorType and continue.
4173
+ if (S.getASTContext ().LangOpts .AllowModuleWithCompilerErrors ) {
4174
+ visitErrorType (
4175
+ cast<ErrorType>(ErrorType::get (S.getASTContext ()).getPointer ()));
4176
+ return ;
4177
+ }
4171
4178
llvm_unreachable (" should not serialize an UnresolvedType" );
4172
4179
}
4173
4180
Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+
3
+ // RUN: %target-swift-frontend -module-name errors -emit-module -o %t/errors.swiftmodule -experimental-allow-module-with-compiler-errors %s
4
+
5
+ protocol SomeProto { }
6
+
7
+ extension SomeProto {
8
+ func someFunc( arg:
9
+
10
+ enum SomeEnum {
11
+ case a
12
+ }
You can’t perform that action at this time.
0 commit comments