Skip to content

Commit 7c79ad6

Browse files
committed
---
yaml --- r: 344923 b: refs/heads/master c: 2b90622 h: refs/heads/master i: 344921: ba2081e 344919: 260357e
1 parent 12a6e7b commit 7c79ad6

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: ce8afa0e934cf4b881cf7d86efbbb0fcdb7af3f2
2+
refs/heads/master: 2b90622f542ff8d5f3635fa224ade8208630d569
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/lib/Sema/TypeCheckProtocol.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3486,6 +3486,10 @@ void ConformanceChecker::checkConformance(MissingWitnessDiagnosisKind Kind) {
34863486
auto witness = Conformance->getWitness(requirement, nullptr).getDecl();
34873487
if (!witness) return;
34883488

3489+
// Make sure that we finalize the witness, so we can emit this
3490+
// witness table.
3491+
TC.DeclsToFinalize.insert(witness);
3492+
34893493
// Objective-C checking for @objc requirements.
34903494
if (requirement->isObjC() &&
34913495
requirement->getFullName() == witness->getFullName() &&
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import Foundation
2+
3+
extension C {
4+
@objc func foo(_: String) { }
5+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// RUN: %target-swift-frontend -module-name test -emit-ir -primary-file %s %S/Inputs/require-finalize-witness-other.swift -sdk %sdk -o - | %FileCheck %s
2+
3+
// REQUIRES: objc_interop
4+
5+
import Foundation
6+
7+
@objc class C: NSObject { }
8+
9+
protocol P {
10+
func foo(_: String)
11+
}
12+
13+
// CHECK: define {{.*}} @"$S4test1CCAA1PA2aDP3fooyySSFTW"
14+
extension C: P { }

0 commit comments

Comments
 (0)