Commit Graph

454 Commits

Author SHA1 Message Date
Chris Smowton
d2e626cbee Add declaring type to test to distinguish ambiguously-named methods 2022-05-10 19:51:10 +01:00
Chris Smowton
25674247a2 Accept test changes relating to generic constructors 2022-05-10 19:51:10 +01:00
Chris Smowton
faa7ccfb01 Add test of selective generic extraction 2022-05-10 19:51:10 +01:00
Chris Smowton
bb3049a686 Extract generic method prototypes
These feature substituted types according to their declaring generic specialisation, with wildcards that reach top-level being converted to their upper or lower bound depending on usage context.

This commit also includes an incidental fix such that constructors declare their return-type as unit, consistent with the Java extractor.
2022-05-10 19:51:10 +01:00
Tamas Vajk
fa5c3f9159 Remove and replace @anonymousclassdeclstmt with @localtypedeclstmt 2022-05-10 19:51:10 +01:00
Tamas Vajk
0978e522d0 Fix expected files 2022-05-10 19:51:10 +01:00
Tamas Vajk
7b58d01eff Specify lambda method for big arity lambdas 2022-05-10 19:51:10 +01:00
Tamas Vajk
dec165c5b2 Remove Lambda class as supertype 2022-05-10 19:51:09 +01:00
Tamas Vajk
3cd2583ec8 Handle large arity lambdas, and add missing type access for some constructor calls (needed for anonymous classes) 2022-05-10 19:51:09 +01:00
Tamas Vajk
f4c87cb79d Extract function expressions 2022-05-10 19:51:09 +01:00
Ian Lynagh
b32ac935f6 Revert "Merge pull request #160 from github/smowton/feature/type-substitution-prototypes"
This reverts commit 1dd83a3f0fab407fe94a09fc517c516ed24b1d0c, reversing
changes made to 22aebf8128bfe20bb89e5ecc11e0e8cdd65bf317.
2022-05-10 19:51:09 +01:00
Chris Smowton
4e36b2489c Add test of selective generic extraction 2022-05-10 19:51:09 +01:00
Chris Smowton
2f8b8fadc3 Extract generic method prototypes
These feature substituted types according to their declaring generic specialisation, with wildcards that reach top-level being converted to their upper or lower bound depending on usage context.

This commit also includes an incidental fix such that constructors declare their return-type as unit, consistent with the Java extractor.
2022-05-10 19:51:09 +01:00
Ian Lynagh
35ad8f372e Kotlin: Add a test for Kotlin and Java calling each other
Currently kotlin->java causes DB inconsistencies.
2022-05-10 19:51:09 +01:00
Ian Lynagh
1719b921cf Kotlin: Accept test changes 2022-05-10 19:51:09 +01:00
Ian Lynagh
c35f871c46 Kotlin: Add tests for file classes 2022-05-10 19:51:09 +01:00
Ian Lynagh
43f50888a7 Kotlin: Add a trivial test 2022-05-10 19:51:09 +01:00
Ian Lynagh
c63918d431 Kotlin: Add an empty test 2022-05-10 19:51:09 +01:00
Tamas Vajk
6dbf278269 Add extension tests 2022-05-10 19:51:08 +01:00
Tamas Vajk
058ff0a60b Remove empty file 2022-05-10 19:51:08 +01:00
Tamas Vajk
05f22576d1 Fix extraction state resetting 2022-05-10 19:51:08 +01:00
Tamas Vajk
16ba27c476 Extract local functions 2022-05-10 19:51:08 +01:00
Ian Lynagh
f0949a4936 Kotlin: Add a test
This caused a stack overflow on a branch, due to the recursino between
the class and the extension function.
2022-05-10 19:51:08 +01:00
Tamas Vajk
161463ecae Fix catch clause location 2022-05-10 19:51:08 +01:00
Tamas Vajk
21af31f3ab CFG changes for non-null operator + some tests 2022-05-10 19:51:08 +01:00
Chris Smowton
7d62f1d2de Update test expectations 2022-05-10 19:51:08 +01:00
Chris Smowton
8accd35ce8 Substitute in generic type arguments when extracting the supertypes of an instantiated type 2022-05-10 19:51:08 +01:00
Tamas Vajk
abc0da3e60 Extract extension method receivers as parameters 2022-05-10 19:51:08 +01:00
Tamás Vajk
04daa7f28f Revert "Kotlin: Fix extraction of dispatch and extension receivers" 2022-05-10 19:51:08 +01:00
Ian Lynagh
cd84a6a5b6 Kotlin: Avoid external locations appearing in type_equivalences test 2022-05-10 19:51:08 +01:00
Tamas Vajk
a4275865da Fix location of variable access in LHS of assignment 2022-05-10 19:51:07 +01:00
Ian Lynagh
40e4c93615 Kotlin: TODO() now works 2022-05-10 19:51:07 +01:00
Ian Lynagh
669fe616dd Kotlin: Renumber lines in expressions test 2022-05-10 19:51:07 +01:00
Ian Lynagh
50400bf7af Kotlin: Add TODO() to test; doesn't work yet 2022-05-10 19:51:07 +01:00
Ian Lynagh
2b483597f8 Kotlin: Ranges already work
We might want to extract a sugared form of them in the future, but for
now this works.
2022-05-10 19:51:07 +01:00
Ian Lynagh
1abaecf158 Kotlin: String templates are already supported 2022-05-10 19:51:07 +01:00
Ian Lynagh
4c8a87bfb1 Kotlin: Accept test changes 2022-05-10 19:51:07 +01:00
Ian Lynagh
6c1439c180 Kotlin: Add a test for type equivalences 2022-05-10 19:51:07 +01:00
Ian Lynagh
606b36e21f Kotlin: Accept test changes 2022-05-10 19:51:07 +01:00
Ian Lynagh
76d7ac9898 Kotlin: Accept test changes 2022-05-10 19:51:07 +01:00
Ian Lynagh
cc478eb6ee Kotlin: Add comments on enum test 2022-05-10 19:51:07 +01:00
Ian Lynagh
1c5f6d70bc Kotlin: Accept changes 2022-05-10 19:51:07 +01:00
Tamas Vajk
874afa7fd7 Fix missing extension receiver extraction 2022-05-10 19:51:06 +01:00
Tamas Vajk
23c5caadc8 Fix String?.plus extraction 2022-05-10 19:51:06 +01:00
Tamas Vajk
ea4e919af5 Extract missing functions directly in kotlin package 2022-05-10 19:51:06 +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
64e1367e59 Make standard library locations consistent between Java and Kotlin 2022-05-10 19:51:06 +01:00
Ian Lynagh
547b60d68f Kotlin: Add paramTypes test 2022-05-10 19:51:06 +01:00