Skip to content

Commit 3b5bf78

Browse files
committed
---
yaml --- r: 323006 b: refs/heads/tensorflow-next c: 1c5aece h: refs/heads/master
1 parent 0e8fb53 commit 3b5bf78

File tree

3 files changed

+56
-2
lines changed

3 files changed

+56
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1461,4 +1461,4 @@ refs/heads/master-rebranch: 86e95c23aa0d37f24ec138b7853146c1cead2e40
14611461
refs/heads/rdar-53901732: 9bd06af3284e18a109cdbf9aa59d833b24eeca7b
14621462
refs/heads/revert-26776-subst-always-returns-a-type: 1b8e18fdd391903a348970a4c848995d4cdd789c
14631463
refs/heads/tensorflow-merge: 8b854f62f80d4476cb383d43c4aac2001dde3cec
1464-
refs/heads/tensorflow-next: 2c1f5c108e8b233d0f7c842a01645b6dfb3fbdc4
1464+
refs/heads/tensorflow-next: 1c5aece0c5caa776d7e1d0b702250bdf4b66e97f

branches/tensorflow-next/lib/Sema/TypeCheckDecl.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2958,7 +2958,9 @@ class DeclChecker : public DeclVisitor<DeclChecker> {
29582958
break;
29592959
}
29602960

2961-
if (!isInvalidSuperclass && Super->hasMissingVTableEntries()) {
2961+
if (!isInvalidSuperclass && Super->hasMissingVTableEntries() &&
2962+
!Super->isResilient(CD->getParentModule(),
2963+
ResilienceExpansion::Minimal)) {
29622964
auto *superFile = Super->getModuleScopeContext();
29632965
if (auto *serialized = dyn_cast<SerializedASTFile>(superFile)) {
29642966
if (serialized->getLanguageVersionBuiltWith() !=
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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-typecheck-verify-swift -I %t
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+
open class NoUserServiceablePartsInside {
29+
public init() {}
30+
internal init(wicket: SpimsterWicket) {}
31+
public convenience init(inconvenient: ()) {
32+
self.init()
33+
}
34+
}
35+
36+
#else
37+
38+
import DishwasherKit
39+
40+
class FancyDishwasher: Dishwasher {
41+
override var modelName: String { "Fancy \(super.modelName)" }
42+
}
43+
44+
class VoidedWarranty: NoUserServiceablePartsInside {
45+
override init() { super.init() }
46+
}
47+
48+
// FIXME: This diagnostic should be better, but it matches what we're already
49+
// doing for disallowed convenience inits.
50+
let notAllowed = VoidedWarranty(inconvenient: ()) // expected-error{{argument passed to call that takes no arguments}}
51+
52+
#endif

0 commit comments

Comments
 (0)