Commit Graph

139 Commits

Author SHA1 Message Date
Chris Smowton
377bd8f2e9 Extract String?.plus as either an AddExpr or a call to an intrinsic
If it is used by the compiler to implement the infix plus operator, resugar it and extract a `+` as Java would. If it is literally called by the user (e.g. `(if (x) then "not null" else null).plus(something)`), then extract a call to the real method Intrinsics.stringPlus (a two-arg static method).
2022-05-10 19:51:16 +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
Tamas Vajk
afd71a00d0 Fix extraction of function references without dispatch receiver 2022-05-10 19:51:12 +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
ef9a213ae1 Cleanup: use extractTypeAccess wherever possible 2022-05-10 19:51:11 +01:00
Tamas Vajk
9d7794185e Fix temporary variable locations 2022-05-10 19:51:11 +01:00
Tamas Vajk
67d2c52e86 Extract field declarations 2022-05-10 19:51:11 +01:00
Tamas Vajk
6455c988f2 Extract class references 2022-05-10 19:51:11 +01:00
Chris Smowton
0c7075c749 Give getters and setters their jvm-lowered names 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
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
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
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
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
716b87d200 Extract not-null expression 2022-05-10 19:51:06 +01:00
Ian Lynagh
3e9d12aff0 Kotlin: Accept test changes 2022-05-10 19:51:05 +01:00
Ian Lynagh
37d6bc29dc Kotlin: Fix Byte tests 2022-05-10 19:51:05 +01:00
Ian Lynagh
2d8a2abe5c Kotlin: Recognise more numeric types 2022-05-10 19:51:05 +01:00
Ian Lynagh
76151b413f Kotlin: Add more Long tests 2022-05-10 19:51:05 +01:00
Ian Lynagh
6b5fe14e94 Kotlin: Add tesets for more integer types 2022-05-10 19:51:05 +01:00
Ian Lynagh
1b40f78b9c Kotlin: Recognise + etc for Double 2022-05-10 19:51:05 +01:00
Ian Lynagh
5b5a6042a9 Kotlin: Add tests for more Double operators 2022-05-10 19:51:05 +01:00
Tamas Vajk
2dfe50cbaa Change constructor and type name of anonymous classes to empty string 2022-05-10 19:51:05 +01:00
Tamas Vajk
b7faa33c60 Fix constructor call type access 2022-05-10 19:51:05 +01:00
Tamas Vajk
b7e0828f78 Extract anonymous object creation 2022-05-10 19:51:05 +01:00
Ian Lynagh
10004c77d1 Kotlin: some TODO stuff works now 2022-05-10 19:51:05 +01:00
Ian Lynagh
a3e70fdb5c Kotlin: Add support for ieee754equals 2022-05-10 19:51:05 +01:00
Ian Lynagh
78d2ef52c1 Kotlin: Towards better equality checking 2022-05-10 19:51:05 +01:00
Ian Lynagh
5da15ca03b Kotlin: Resugar != 2022-05-10 19:51:04 +01:00
Ian Lynagh
b4c3f57bab Kotlin: Get != working again 2022-05-10 19:51:04 +01:00
Ian Lynagh
744f3db68d Kotlin: Handle binops correctly 2022-05-10 19:51:04 +01:00