Commit Graph

13956 Commits

Author SHA1 Message Date
Ian Lynagh
d977500047 Kotlin: Make it easier to diagnose build failures 2022-05-10 19:51:08 +01:00
Ian Lynagh
c525d2a633 Kotlin: Consistently use addClassLabel, and have it handle external classes 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
Ian Lynagh
de137415b8 Kotlin: Use an IrClass for the Java class in the priomitive type handling
This means we can add a label for it, and indicate that we use it,
properly.
2022-05-10 19:51:08 +01:00
Chris Smowton
7fa4da8b0c Add explanatory comments 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
Ian Lynagh
2dcd49c6a5 Kotlin: Build the appropriate single version, rather than always 1.5 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
0b3754c932 Kotlin: Fix handling Unit in various places 2022-05-10 19:51:07 +01:00
Ian Lynagh
ec827d2f0a Kotlin: Add ability to give more type contexts 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
7ca6da1d13 Kotlin/Java: children consistency query: extension receiver is now a gap 2022-05-10 19:51:07 +01:00
Ian Lynagh
75e22da096 Kotlin: Fix extraction of dispatch and extension receivers
It is possible for a call to have both, e.g. the `arg.ext()` call in:

class Class1 {
    val y = 4
}
class Class2 (val arg:Class1) {
    val x = 3
    fun someFun() {
        arg.ext();
    }
    fun Class1.ext() {
        val z = x + y
    }
}
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
6a16588484 Kotlin: Allow comments on enum entries 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
03199091cd Kotlin: Add SAFE_CAST support 2022-05-10 19:51:07 +01:00
Ian Lynagh
1c5f6d70bc Kotlin: Accept changes 2022-05-10 19:51:07 +01:00
Ian Lynagh
25ccf0569e Kotlin: ReturnStmt CFG isn't handled properly yet 2022-05-10 19:51:07 +01:00
Ian Lynagh
db7f5a04be Kotlin: BreakStmt CFG isn't handled properly yet 2022-05-10 19:51:07 +01:00
Ian Lynagh
712d70248a Kotlin: Add CFG for VarArgExpr 2022-05-10 19:51:07 +01:00
Ian Lynagh
8440bafc42 Kotlin: Add CFG for KtAnonymousClassDeclarationStmt 2022-05-10 19:51:07 +01:00
Ian Lynagh
5ae74949a0 Kotlin: Add CFG for ClassExpr 2022-05-10 19:51:07 +01:00
Ian Lynagh
2135a870d3 Kotlin: Fix CFG for StmtExpr 2022-05-10 19:51:06 +01:00
Ian Lynagh
2e5cf92f8a Kotlin: Fix CFG for string templates 2022-05-10 19:51:06 +01:00
Ian Lynagh
fcbe4331b4 Kotlin/Java: Add a (currently rather lax) cfgDeadEnds consistency query 2022-05-10 19:51:06 +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
6246b2142c Add enclosing stmt to arrayOf extraction 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
Ian Lynagh
d5b4931b7f Kotlin: Tweak superTypes test to give better locations 2022-05-10 19:51:06 +01:00
Ian Lynagh
50c2d10777 Kotlin: Improve the supertypes test
Note the line
        | file://<external>/superChain.kt:2:1:2:60 | SuperChain2<T5,String> | file://<external>/superChain.kt:1:1:1:33 | SuperChain1<T3,String> |
is currently wrong; the supertype of SuperChain2<T5,String> should be
SuperChain1<T5,String>.
2022-05-10 19:51:06 +01:00
Ian Lynagh
c05aa7bb68 Kotlin: Add superChain test 2022-05-10 19:51:06 +01:00