Tamas Vajk
b0ee557a51
Fix expected test files
2022-05-12 22:37:06 +01:00
Tamas Vajk
857a74cf14
Adjust class label generation to handle classes in field initializers
2022-05-12 22:37:06 +01:00
Tamas Vajk
394ec56d9d
Add test case for local class declaration in field initializer
2022-05-12 22:37:06 +01:00
Tamas Vajk
4efb87a7dd
Extract enum entry initializers
2022-05-10 19:51:30 +01:00
Tamas Vajk
c6a75957e9
Fix expected files, fix type access extraction of file level static declarations
2022-05-10 19:51:29 +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
3813e6fc10
Fix expected files
2022-05-10 19:51:26 +01:00
Tony Torralba
f8ad93a530
Add test case for local variable in anonymous init
...
Also fix another instance of the same issue in extractLocalTypeDeclStmt
2022-05-10 19:51:25 +01:00
Tony Torralba
1926bef050
Don't extract static init when the class already contains an anonymous init
2022-05-10 19:51:25 +01:00
Tony Torralba
1f812f856c
Extract static initializers of inner classes
2022-05-10 19:51:25 +01:00
Chris Smowton
96908d153d
Accept and amend check for anonymous types with type parameters
2022-05-10 19:51:24 +01:00
Chris Smowton
c0f3988aaa
Tolerate nullable references to anonymous classes
...
This also adds a test case illustrating when this can arise
2022-05-10 19:51:24 +01:00
Chris Smowton
2ea1a6c1f0
Adjust test expectations
...
These all just refer to re-adding empty blocks for classes whose constructors have no initializer statements for simplicity's sake.
2022-05-10 19:51:24 +01:00
Tony Torralba
64531dd717
Fix AST representation of WhenExpr and WhenBranch
2022-05-10 19:51:22 +01:00
Tamas Vajk
2d0bb43efe
Do not extract local function containers as anonymous classes
2022-05-10 19:51:22 +01:00
Tamas Vajk
a70ade224f
Fix (generic) type access extraction for lambdas
2022-05-10 19:51:21 +01:00
Tamas Vajk
4e18974889
Fix type access expression extraction for function/property references
2022-05-10 19:51:20 +01:00
Chris Smowton
f513fdce7b
Accept test changes
2022-05-10 19:51:20 +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
4adf5829e4
Fix expected files
2022-05-10 19:51:16 +01:00
Ian Lynagh
579c590ea6
Kotlin: Accept test changes following "casting" operator changes
2022-05-10 19:51:13 +01:00
Ian Lynagh
368c330ecf
Kotlin: Accept test changes following file-class fixes
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