Skip to content

Commit ff9cd41

Browse files
committed
[AutoDiff] Add SR-12642 negative test.
Add SR-12642 negative test: crash regarding `Differentiable` derived conformances and redeclared properties.
1 parent 1f5818a commit ff9cd41

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// RUN: not --crash %target-swift-frontend -typecheck %s
2+
3+
// SR-12642: Crash regarding `Differentiable` derived conformances and redeclared properties.
4+
5+
import _Differentiation
6+
7+
@propertyWrapper
8+
struct Wrapper<Value> {
9+
var wrappedValue: Value
10+
}
11+
12+
struct Generic<T> {}
13+
extension Generic: Differentiable where T: Differentiable {}
14+
15+
struct WrappedProperties: Differentiable {
16+
@Wrapper var int: Generic<Int>
17+
@Wrapper var int: Generic<Int>
18+
}

0 commit comments

Comments
 (0)