Commit Graph

30 Commits

Author SHA1 Message Date
Tamas Vajk
de003fd122 Add test for return type of <clinit> methods 2022-05-12 22:37:06 +01:00
Tamas Vajk
613d81d231 Extract static modifier and missing type access qualifier for static calls 2022-05-10 19:51:26 +01:00
Tamas Vajk
0726b6410f Change location of methods inside parameterized types 2022-05-10 19:51:26 +01:00
Tamas Vajk
3813e6fc10 Fix expected files 2022-05-10 19:51:26 +01:00
Tamas Vajk
2d0bb43efe Do not extract local function containers as anonymous classes 2022-05-10 19:51:22 +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
Tamas Vajk
b6e5e1977d Extract more visibility modifiers 2022-05-10 19:51:13 +01:00
Ian Lynagh
348ae357ed Kotlin: Extract method visibility 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
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
Tamas Vajk
16ba27c476 Extract local functions 2022-05-10 19:51:08 +01:00
Chris Smowton
35e6b06fe3 Revert "Fix failing tests"
This reverts commit 940db3d0828422bc26d7167c138199aa51ab4e89.
2022-05-10 19:51:05 +01:00
Tamas Vajk
ab6b500475 Fix failing tests 2022-05-10 19:51:05 +01:00
Chris Smowton
ccf21b7183 Implement Java signature extraction 2022-05-10 19:51:04 +01:00
Chris Smowton
070c0a03f4 Add .fromSource() qualifier to tests 2022-05-10 19:50:58 +01:00
Chris Smowton
124dcb0e5f Update test expectations 2022-05-10 19:50:58 +01:00
Tamas Vajk
b542769fe9 Fix constructor extraction and extract type arguments of constructor calls 2022-05-10 18:46:00 +01:00
Tamas Vajk
76fd386055 Extract content of <obinit> methods 2022-05-10 18:46:00 +01:00
Tamas Vajk
b87c8e2529 Extract generated <obinit> method, and calls to it 2022-05-10 18:46:00 +01:00
Tamas Vajk
84e9fd8dbd Extract external types with members, so that tests don't produce DB constraint violations
The constructor of `Any` was missing. Also, previously members of external types were not extracted to not end up with DB constraint violations, but these I can't reproduce currently in tests.
2022-05-10 18:46:00 +01:00
Tamas Vajk
3bfc93daab Add ExtensionMethod class 2022-05-10 18:45:58 +01:00
Tamas Vajk
7d8b6bac06 Fix this and qualified this parameter extraction 2022-05-10 18:45:58 +01:00
Tamas Vajk
63c22ca5df Fix failing tests after changing external type declaration extraction 2022-05-10 18:45:58 +01:00
Ian Lynagh
90eccc634b Kotlin: Refactor locations
Amongst other tidyups, we now generate correct "unknown location"s
2022-05-10 18:45:56 +01:00
Ian Lynagh
f0e2de1fa9 Kotlin: Add file classes
Kotlin invents a class for each file that has a top-level
functionp/property, so that Java can use them.
2022-05-10 18:45:54 +01:00
Ian Lynagh
ed2c6e68ea Kotlin: Function calls 2022-05-10 18:45:54 +01:00
Ian Lynagh
f5e2826b9f Kotlin: Accept test changes 2022-05-10 18:45:53 +01:00
Ian Lynagh
00cff5593f Kotlin: Fix the tests
The handling of Unit is very kludgy at the moment. Will need rethinking.
2022-05-10 18:45:52 +01:00
Ian Lynagh
49a4e479da Kotlin: Extract methods 2022-05-10 18:45:51 +01:00