File tree Expand file tree Collapse file tree 2 files changed +44
-2
lines changed Expand file tree Collapse file tree 2 files changed +44
-2
lines changed Original file line number Diff line number Diff line change @@ -311,8 +311,14 @@ class SILGenVTable : public SILVTableVisitor<SILGenVTable> {
311
311
}
312
312
313
313
void addPlaceholder (MissingMemberDecl *m) {
314
- assert (m->getNumberOfVTableEntries () == 0
315
- && " Should not be emitting class with missing members" );
314
+ #ifndef NDEBUG
315
+ auto *classDecl = cast<ClassDecl>(m->getDeclContext ());
316
+ bool isResilient =
317
+ classDecl->isResilient (SGM.M .getSwiftModule (),
318
+ ResilienceExpansion::Maximal);
319
+ assert (isResilient || m->getNumberOfVTableEntries () == 0 &&
320
+ " Should not be emitting fragile class with missing members" );
321
+ #endif
316
322
}
317
323
};
318
324
Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+
3
+ // For convenience, this file includes the three different "files" used in this
4
+ // test. It selects one with -DCoreDishwasher, -DDishwasherKit, or neither.
5
+
6
+ // RUN: %target-swift-frontend -emit-module %s -DCoreDishwasher -module-name CoreDishwasher -o %t/CoreDishwasher -emit-module-path %t/CoreDishwasher.swiftmodule -I %t
7
+ // RUN: %target-swift-frontend -emit-module %s -DDishwasherKit -module-name DishwasherKit -o %t/DishwasherKit -emit-module-path %t/DishwasherKit.swiftmodule -enable-library-evolution -I %t
8
+ // RUN: %target-swift-frontend -emit-silgen -I %t %s
9
+
10
+ #if CoreDishwasher
11
+
12
+ public struct SpimsterWicket {
13
+ public init ( ) { }
14
+ }
15
+
16
+ #elseif DishwasherKit
17
+
18
+ @_implementationOnly import CoreDishwasher
19
+
20
+ open class Dishwasher {
21
+ public init ( ) { }
22
+
23
+ var wicket = SpimsterWicket ( )
24
+
25
+ open var modelName : String { " Dishwasher " }
26
+ }
27
+
28
+ #else
29
+
30
+ import DishwasherKit
31
+
32
+ open class FancyDishwasher : Dishwasher {
33
+ open override var modelName : String { " Fancy \( super. modelName) " }
34
+ }
35
+
36
+ #endif
You can’t perform that action at this time.
0 commit comments