File tree Expand file tree Collapse file tree 4 files changed +29
-45
lines changed Expand file tree Collapse file tree 4 files changed +29
-45
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,6 @@ set(SWIFT_BENCH_MODULES
113
113
single-source/ObserverUnappliedMethod
114
114
single-source/OpaqueConsumingUsers
115
115
single-source/OpenClose
116
- single-source/PartialApplyDynamicType
117
116
single-source/Phonebook
118
117
single-source/PointerArithmetics
119
118
single-source/PolymorphicCalls
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -103,7 +103,6 @@ import ObserverPartiallyAppliedMethod
103
103
import ObserverUnappliedMethod
104
104
import OpaqueConsumingUsers
105
105
import OpenClose
106
- import PartialApplyDynamicType
107
106
import Phonebook
108
107
import PointerArithmetics
109
108
import PolymorphicCalls
@@ -267,7 +266,6 @@ registerBenchmark(ObserverPartiallyAppliedMethod)
267
266
registerBenchmark ( ObserverUnappliedMethod)
268
267
registerBenchmark ( OpaqueConsumingUsers)
269
268
registerBenchmark ( OpenClose)
270
- registerBenchmark ( PartialApplyDynamicType)
271
269
registerBenchmark ( Phonebook)
272
270
registerBenchmark ( PointerArithmetics)
273
271
registerBenchmark ( PolymorphicCalls)
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swift-frontend -O -emit-ir %s
2
+
3
+ // Test that this does not crash
4
+
5
+ protocol P {
6
+ func f( _ i: Int ) -> Int
7
+ }
8
+
9
+ func g< T: P > ( _ t: T ) -> ( ( T ) -> ( Int ) -> Int ) {
10
+ let f = { type ( of: t) . f ( $0) }
11
+ return f
12
+ }
13
+
14
+ class C : P {
15
+ func f( _ i: Int ) -> Int {
16
+ return i + 1
17
+ }
18
+ }
19
+
20
+ let c = C ( )
21
+
22
+ public func test_PartialApplyDynamicType( ) -> Int {
23
+ var result = 0
24
+ for _ in 1 ... 100000 {
25
+ result += g ( c) ( c) ( 1 )
26
+ }
27
+ return result
28
+ }
29
+
You can’t perform that action at this time.
0 commit comments