Ian Lynagh
d8a99e6b7d
Kotlin: Regenerate expected test output
...
It's now in the order generated by the new CLI. This means that
changes in test output are easier to understand.
2023-09-12 11:13:58 +01:00
Tamas Vajk
91972d1d1f
Kotlin: Fix location (start position) of method calls
2022-10-31 21:08:15 +01:00
Tamas Vajk
841340b266
Kotlin: Resugar for loops
2022-10-28 14:55:50 +02:00
Tamas Vajk
15305fd9bb
Kotlin: Fix iterator extraction of IntArray, BooleanArray, ...
2022-08-25 11:05:17 +02:00
Tamas Vajk
7196fdd475
Kotlin: fix array iterator extraction to work outside of for loops
2022-08-25 09:23:34 +02:00
Tamas Vajk
af2614be84
Kotlin: Add array iterator tests
2022-08-25 09:17:50 +02:00
Ian Lynagh
77fec17a36
Kotlin: Autoformat QL
2022-05-10 19:51:25 +01:00
Chris Smowton
37543e7a86
Switch to expanding property initializers and init blocks in-place
...
Pros:
* <obinit> no longer emitted: one less function per class
* Parameters to the primary constructor, if any, are no longer referred to out of scope
* Simple primary constructor `val` and `var` declarations work as expected
Cons:
* If there are multiple secondary constructors, no primary constructor and long init blocks, there could be considerable duplicate extraction of those init blocks. Hopefully this case is very rare.
2022-05-10 19:51:20 +01:00
Chris Smowton
da159d7239
Add test showing assign expressions
2022-05-10 19:51:18 +01:00
Chris Smowton
7cb6e19e44
Extract array update operations
...
These are of the form arrExpr[indexExpr] op= rhs
2022-05-10 19:51:18 +01:00
Chris Smowton
2fb54de269
Extract ordinary array get and set operations as ArrayAccesses, not calls
2022-05-10 19:51:18 +01:00
Chris Smowton
96f3ea460f
Make varargs extraction more Java-like:
...
* Extract varargs as if they are ordinary positional arguments
* Adapt the QL that distinguishes varargs from ordinary arguments to account for Kotlin's varargs which can occur in the middle of the arg list
* Add a test checking dataflow through varargs which doesn't work yet due to array-get and array-set not being extracted as IndexExprs
* Extract the special case arrayOf(*x) as a clone call, which is (equivalent to) the Java lowering of that operation
2022-05-10 19:51:17 +01:00
Chris Smowton
ef9a213ae1
Cleanup: use extractTypeAccess wherever possible
2022-05-10 19:51:11 +01:00
Chris Smowton
70708d69bf
Don't extract or call fake-override methods
2022-05-10 19:51:10 +01:00
Tamas Vajk
0978e522d0
Fix expected files
2022-05-10 19:51:10 +01:00
Tamas Vajk
f4c87cb79d
Extract function expressions
2022-05-10 19:51:09 +01:00
Ian Lynagh
1719b921cf
Kotlin: Accept test changes
2022-05-10 19:51:09 +01:00
Tamas Vajk
3a2f7bec1c
Fix test expected files
2022-05-10 19:51:06 +01:00
Tamas Vajk
8de5e39309
Extract arrayOf-like calls
2022-05-10 19:51:06 +01:00
Tamas Vajk
8b81ee7e59
Add array creation tests
2022-05-10 19:51:06 +01:00
Chris Smowton
ccf21b7183
Implement Java signature extraction
2022-05-10 19:51:04 +01:00
Chris Smowton
bde4534050
Only report locations without a source offset in non-source files
...
Also adjust tests that would otherwise report types with locations outside the source tree (i.e., for the most part in the standard library)
2022-05-10 19:51:03 +01:00
Chris Smowton
44bf35e623
Add and update tests
2022-05-10 19:51:03 +01:00
Chris Smowton
1b7e33b6e3
Remove Kotlin element and component type from arrays
...
Now that these are no longer required, array extraction can extract kt-types consistently with other parameterised classes.
2022-05-10 19:51:03 +01:00
Chris Smowton
70294bd26b
Array types: distinguish (e.g.) Array<Int> from IntArray
2022-05-10 19:51:03 +01:00