Commit Graph

4185 Commits

Author SHA1 Message Date
Chris Smowton
0a4f97b151 Accept changes to standard library types
These are inner classes of the generic class java.lang.invoke.ClassSpecializer, whose generic parameters are no longer inappropriately attributed to its children.
2022-05-10 19:51:12 +01:00
Chris Smowton
997f818643 Accept java-and-kotlin result improvements
This happened because setting the type context for the return-type part of a function's label meant that the label now matches Java <-> Kotlin, and therefore it gets a Kotlin-source source location.
2022-05-10 19:51:12 +01:00
Tamas Vajk
aa0ddeb29a Fix external type locations in tests 2022-05-10 19:51:12 +01:00
Tamas Vajk
afd71a00d0 Fix extraction of function references without dispatch receiver 2022-05-10 19:51:12 +01:00
Tamas Vajk
ef2795c88b Add ktLocalFunction relation and tests for local and anonymous classes 2022-05-10 19:51:11 +01:00
Tamas Vajk
e0bf7d8246 Extract local class declarations 2022-05-10 19:51:11 +01:00
Tamas Vajk
1e64887903 Extract field receiver in field read/write 2022-05-10 19:51:11 +01:00
Tamas Vajk
10ae157682 Extract function references 2022-05-10 19:51:11 +01:00
Tamas Vajk
6950f868fb Fix type access extraction in field declarations 2022-05-10 19:51:11 +01:00
Tamas Vajk
e5003e4032 Adjust PrintAST query to handle kotlin constructs 2022-05-10 19:51:11 +01:00
Tamas Vajk
73cd497427 Add todo comment to move property from parameter initialization to constructor 2022-05-10 19:51:11 +01:00
Tamas Vajk
313912a131 Fix test expected files 2022-05-10 19:51:11 +01:00
Chris Smowton
2730d07b4c Extract static method qualifier type accesses 2022-05-10 19:51:11 +01:00
Chris Smowton
ef9a213ae1 Cleanup: use extractTypeAccess wherever possible 2022-05-10 19:51:11 +01:00
Chris Smowton
70841a5896 Add test for companion object 2022-05-10 19:51:11 +01:00
Tamas Vajk
9d7794185e Fix temporary variable locations 2022-05-10 19:51:11 +01:00
Chris Smowton
5c77131637 Add tests for generic methods 2022-05-10 19:51:11 +01:00
Tamas Vajk
67d2c52e86 Extract field declarations 2022-05-10 19:51:11 +01:00
Chris Smowton
acad36cab4 Implement raw type extraction 2022-05-10 19:51:11 +01:00
Tamas Vajk
6455c988f2 Extract class references 2022-05-10 19:51:11 +01:00
Ian Lynagh
05028e612c Kotlin: Accept test changes 2022-05-10 19:51:11 +01:00
Ian Lynagh
fb90c70e2e Kotlin: Extract visibility for properties 2022-05-10 19:51:11 +01:00
Ian Lynagh
348ae357ed Kotlin: Extract method visibility 2022-05-10 19:51:11 +01:00
Ian Lynagh
5342b13cb6 Kotlin: Add class modifiers 2022-05-10 19:51:11 +01:00
Ian Lynagh
7c03ed99dc Java/Kotlin: Add File.is{,Java,Kotlin}SourceFile() 2022-05-10 19:51:10 +01:00
Chris Smowton
70708d69bf Don't extract or call fake-override methods 2022-05-10 19:51:10 +01:00
Chris Smowton
0c7075c749 Give getters and setters their jvm-lowered names 2022-05-10 19:51:10 +01:00
Chris Smowton
248011e828 Improve generics test to indicate callee decltypes 2022-05-10 19:51:10 +01:00
Chris Smowton
26abb4d0e3 Correctly record methods' and constructors' source-declarations 2022-05-10 19:51:10 +01:00
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