Skip to content

Commit 1374147

Browse files
authored
Merge pull request #21813 from xedin/rdar-46939892
[TypeChecker] NFC: Add a test-case for rdar://problem/46939892
2 parents 41ac9ca + 1f5462b commit 1374147

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// RUN: %target-typecheck-verify-swift
2+
3+
struct S {
4+
let a: Int
5+
let b: Int
6+
let c: Int
7+
let d: Int
8+
9+
init(_ a: Int, _ b: Int, _ c: Int, _ d: Int) {
10+
self.a = a
11+
self.b = b
12+
self.c = c
13+
self.d = d
14+
}
15+
}
16+
17+
func foo(_ lhs: S, _ rhs: S) -> Int {
18+
return abs(lhs.a - rhs.a) + abs(lhs.b - rhs.b) + abs(lhs.c - rhs.c) + abs(lhs.d - rhs.d)
19+
}

0 commit comments

Comments
 (0)