File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
validation-test/Serialization/AllowErrors Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -1440,7 +1440,8 @@ void Serializer::writeASTBlockEntity(
1440
1440
data.push_back (addDeclRef (req));
1441
1441
data.push_back (addDeclRef (witness.getDecl ()));
1442
1442
assert (witness.getDecl () || req->getAttrs ().hasAttribute <OptionalAttr>()
1443
- || req->getAttrs ().isUnavailable (req->getASTContext ()));
1443
+ || req->getAttrs ().isUnavailable (req->getASTContext ())
1444
+ || allowCompilerErrors ());
1444
1445
1445
1446
// If there is no witness, we're done.
1446
1447
if (!witness.getDecl ()) return ;
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
+ public protocol SomeProto {
6
+ init ( from: SomeProto )
7
+ }
8
+
9
+ struct A { }
10
+ struct B : SomeProto {
11
+ let a : A
12
+ }
13
+
14
+ let thing = B ( a: A ( ) )
You can’t perform that action at this time.
0 commit comments