Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 93e8d5a

Browse files
smowtonigfoo
authored andcommitted
Add tests for mutually-recursive types
1 parent 8bb2365 commit 93e8d5a

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

java/ql/test/kotlin/library-tests/generic-type-bounds/test.expected

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@ classTVs
44
| test.kt:1:31:1:31 | R | test.kt:1:1:5:1 | Test | Object |
55
| test.kt:7:22:7:22 | P | test.kt:7:1:7:67 | MultipleBounds | List<String> |
66
| test.kt:7:22:7:22 | P | test.kt:7:1:7:67 | MultipleBounds | Set<String> |
7+
| test.kt:9:22:9:42 | T | test.kt:9:1:9:47 | RecursiveBound | RecursiveBound<T> |
8+
| test.kt:11:28:11:57 | T | test.kt:11:1:11:94 | MutualRecursiveBound | MutualRecursiveBound<T,S> |
9+
| test.kt:11:60:11:89 | S | test.kt:11:1:11:94 | MutualRecursiveBound | MutualRecursiveBound<T,S> |
710
functionTVs
811
| test.kt:3:8:3:17 | Q | test.kt:3:3:3:26 | f | Number |

java/ql/test/kotlin/library-tests/generic-type-bounds/test.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ class Test<T : Number, S : T, R> {
55
}
66

77
class MultipleBounds<P> where P : List<String>, P : Set<String> { }
8+
9+
class RecursiveBound<T : RecursiveBound<T>> { }
10+
11+
class MutualRecursiveBound<T : MutualRecursiveBound<T, S>, S : MutualRecursiveBound<T, S>> { }

0 commit comments

Comments
 (0)