mirror of
https://github.com/github/codeql.git
synced 2026-04-27 09:45:15 +02:00
Kotlin: Rewrite MutableList.removeAt(int) -> remove(int)
The Kotlin authors changed this to avoid a clash on List<Int>, but we must reverse the renaming so the Kotlin and Java views of the same class file extract alike.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import java.util.AbstractList;
|
||||
|
||||
public class MyList<T> extends AbstractList<T> {
|
||||
|
||||
public T get(int idx) { return null; }
|
||||
|
||||
public T remove(int idx) { return null; }
|
||||
|
||||
public int size() { return 0; }
|
||||
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
| get |
|
||||
| remove |
|
||||
| size |
|
||||
@@ -0,0 +1,2 @@
|
||||
|
||||
fun f(l: MyList<String>) = l.get(0)
|
||||
@@ -0,0 +1,5 @@
|
||||
import java
|
||||
|
||||
from Method m
|
||||
where m.getDeclaringType().getName().matches("MyList%")
|
||||
select m.toString()
|
||||
Reference in New Issue
Block a user