Skip to content

Commit bb362b0

Browse files
authored
Merge pull request #84534 from hamishknight/add-test
[test] Add another CGFloat-to-Double regression test
2 parents 9683569 + a60d92d commit bb362b0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

validation-test/Sema/implicit_cgfloat_double_conversion_correctness.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,11 @@ func test_ambigity_with_generic_funcs(a: CGFloat, b: CGFloat) -> [CGFloat] {
5252
let result = [round(abs(a - b) * 100) / 100.0]
5353
return result
5454
}
55+
56+
func testMultipleClosureInference(_ d: Double, i: Int) {
57+
struct S<T> {
58+
init(_ get: () -> T, _ set: (T) -> Void) {}
59+
}
60+
func foo<T>(_: S<T>, _: T) {}
61+
foo(S({ CGFloat(i) }, { _ in }), d)
62+
}

0 commit comments

Comments
 (0)