We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d1c3ff commit 7cb5b5cCopy full SHA for 7cb5b5c
validation-test/compiler_crashers_2_fixed/0140-sr6746.swift
@@ -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