Commit 9c20198
authored
[AutoDiff] Disallow differentiation of opaque-result-typed functions. (swiftlang#32714)
Reject `@differentiable` and `@derivative` attribute for original
functions with opaque result types.
It is not possible to support derivative registration nor the
differentiation transform for such functions.
Resolves SR-12656.1 parent c07b3b0 commit 9c20198
File tree
5 files changed
+45
-4
lines changed- include/swift/AST
- lib/Sema
- test/AutoDiff
- Sema
- compiler_crashers_fixed
5 files changed
+45
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3151 | 3151 | | |
3152 | 3152 | | |
3153 | 3153 | | |
| 3154 | + | |
| 3155 | + | |
3154 | 3156 | | |
3155 | 3157 | | |
3156 | 3158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4240 | 4240 | | |
4241 | 4241 | | |
4242 | 4242 | | |
| 4243 | + | |
| 4244 | + | |
| 4245 | + | |
| 4246 | + | |
| 4247 | + | |
| 4248 | + | |
| 4249 | + | |
| 4250 | + | |
| 4251 | + | |
4243 | 4252 | | |
4244 | 4253 | | |
4245 | 4254 | | |
| |||
4532 | 4541 | | |
4533 | 4542 | | |
4534 | 4543 | | |
| 4544 | + | |
| 4545 | + | |
| 4546 | + | |
| 4547 | + | |
| 4548 | + | |
| 4549 | + | |
| 4550 | + | |
| 4551 | + | |
| 4552 | + | |
| 4553 | + | |
4535 | 4554 | | |
4536 | 4555 | | |
4537 | 4556 | | |
| |||
5083 | 5102 | | |
5084 | 5103 | | |
5085 | 5104 | | |
5086 | | - | |
5087 | 5105 | | |
5088 | 5106 | | |
| 5107 | + | |
| 5108 | + | |
| 5109 | + | |
| 5110 | + | |
| 5111 | + | |
| 5112 | + | |
| 5113 | + | |
5089 | 5114 | | |
5090 | 5115 | | |
5091 | 5116 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
1124 | 1124 | | |
1125 | 1125 | | |
1126 | 1126 | | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
697 | 697 | | |
698 | 698 | | |
699 | 699 | | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
0 commit comments