Skip to content

Commit 3806d56

Browse files
committed
Add now-fixed test case for SR-6746 / rdar://problem/36483751.
1 parent a29d5d3 commit 3806d56

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// RUN: not %target-swift-frontend %s -typecheck
2+
struct Foo: Strideable {
3+
// typealias Stride = Int
4+
let x: Int
5+
6+
func distance(to other: Foo) -> Foo.Stride { return abs(other.x - x) }
7+
func advanced(by n: Foo.Stride) -> Foo { return Foo(x: x + n) }
8+
}

0 commit comments

Comments
 (0)