Commit 8b2d270
committed
DiagnoseInfiniteRecursion: re-implement the pass in swift and fix a bug
Fixes a false alarm in case of recursive calls with different type parameters.
For example:
```
protocol P {
associatedtype E: P
}
func noRecursionMismatchingTypeArgs1<T: P>(_ t: T.Type) {
if T.self == Int.self {
return
}
noRecursionMismatchingTypeArgs1(T.E.self)
}
```1 parent ac55dae commit 8b2d270
File tree
7 files changed
+622
-603
lines changed- SwiftCompilerSources/Sources/Optimizer
- FunctionPasses
- PassManager
- include/swift/SILOptimizer/PassManager
- lib/SILOptimizer/Mandatory
- test/SILOptimizer
7 files changed
+622
-603
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
0 commit comments