Skip to content

Commit 74e035e

Browse files
committed
[test] Add a test for SR-156. (#2262)
1 parent 3e15ccf commit 74e035e

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
struct CoolStruct {
2+
let coolFactor: Double
3+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// RUN: rm -rf %t && mkdir %t
2+
// RUN: %target-build-swift -emit-library %s %S/Inputs/protocol-conformance-member-helper.swift -o %t/libTest.dylib -module-name Test
3+
// RUN: nm %t/libTest.dylib | FileCheck %s
4+
5+
// CHECK: _TFV4Test10CoolStructg10coolFactorSd
6+
7+
// SR-156: Make sure we synthesize getters for members used as protocol
8+
// witnesses. Check that we link correctly; we don't care which file
9+
// synthesizes it.
10+
11+
protocol CoolStructProtocol {
12+
var coolFactor: Double { get }
13+
}
14+
extension CoolStruct : CoolStructProtocol {}

0 commit comments

Comments
 (0)