Merge pull request #10646 from tamasvajk/kotlin-java-kotlin-function-mapping

Kotlin: Simplify `kotlinFunctionToJavaEquivalent`
This commit is contained in:
Ian Lynagh
2022-10-04 13:46:22 +01:00
committed by GitHub
17 changed files with 361 additions and 139 deletions

View File

@@ -0,0 +1,6 @@
import java
import semmle.code.java.Diagnostics
from Diagnostic d
where exists(d.getMessage().indexOf("Couldn't find a Java equivalent function to "))
select d

View File

@@ -17,9 +17,9 @@ app/src/main/kotlin/testProject/App.kt:
# 7| 0: [WhenBranch] ... -> ...
# 7| 0: [ValueNEExpr] ... (value not-equals) ...
# 7| 0: [IntegerLiteral] 3
# 7| 1: [MethodAccess] and(...)
# 7| -1: [IntegerLiteral] 3
# 7| 0: [VarAccess] seen1
# 7| 1: [AndBitwiseExpr] ... & ...
# 7| 0: [IntegerLiteral] 3
# 7| 1: [VarAccess] seen1
# 7| 1: [ExprStmt] <Expr>;
# 7| 0: [MethodAccess] throwMissingFieldException(...)
# 7| -1: [TypeAccess] PluginExceptionsKt
@@ -232,9 +232,9 @@ app/src/main/kotlin/testProject/App.kt:
# 7| 1: [ExprStmt] <Expr>;
# 7| 0: [AssignExpr] ...=...
# 7| 0: [VarAccess] tmp3_bitMask0
# 7| 1: [MethodAccess] or(...)
# 7| -1: [VarAccess] tmp3_bitMask0
# 7| 0: [IntegerLiteral] 1
# 7| 1: [OrBitwiseExpr] ... | ...
# 7| 0: [VarAccess] tmp3_bitMask0
# 7| 1: [IntegerLiteral] 1
# 7| 1: [BlockStmt] { ... }
# 7| 0: [ExprStmt] <Expr>;
# 7| 0: [AssignExpr] ...=...
@@ -246,9 +246,9 @@ app/src/main/kotlin/testProject/App.kt:
# 7| 1: [ExprStmt] <Expr>;
# 7| 0: [AssignExpr] ...=...
# 7| 0: [VarAccess] tmp3_bitMask0
# 7| 1: [MethodAccess] or(...)
# 7| -1: [VarAccess] tmp3_bitMask0
# 7| 0: [IntegerLiteral] 2
# 7| 1: [OrBitwiseExpr] ... | ...
# 7| 0: [VarAccess] tmp3_bitMask0
# 7| 1: [IntegerLiteral] 2
# 7| 1: [WhenBranch] ... -> ...
# 7| 0: [BooleanLiteral] true
# 7| 1: [WhileStmt] while (...)
@@ -285,9 +285,9 @@ app/src/main/kotlin/testProject/App.kt:
# 7| 1: [ExprStmt] <Expr>;
# 7| 0: [AssignExpr] ...=...
# 7| 0: [VarAccess] tmp3_bitMask0
# 7| 1: [MethodAccess] or(...)
# 7| -1: [VarAccess] tmp3_bitMask0
# 7| 0: [IntegerLiteral] 1
# 7| 1: [OrBitwiseExpr] ... | ...
# 7| 0: [VarAccess] tmp3_bitMask0
# 7| 1: [IntegerLiteral] 1
# 7| 2: [WhenBranch] ... -> ...
# 7| 0: [ValueEQExpr] ... (value equals) ...
# 7| 0: [VarAccess] tmp2_index
@@ -303,9 +303,9 @@ app/src/main/kotlin/testProject/App.kt:
# 7| 1: [ExprStmt] <Expr>;
# 7| 0: [AssignExpr] ...=...
# 7| 0: [VarAccess] tmp3_bitMask0
# 7| 1: [MethodAccess] or(...)
# 7| -1: [VarAccess] tmp3_bitMask0
# 7| 0: [IntegerLiteral] 2
# 7| 1: [OrBitwiseExpr] ... | ...
# 7| 0: [VarAccess] tmp3_bitMask0
# 7| 1: [IntegerLiteral] 2
# 7| 3: [WhenBranch] ... -> ...
# 7| 0: [BooleanLiteral] true
# 7| 1: [ThrowStmt] throw ...

View File

@@ -0,0 +1 @@
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Int.dec in java.lang.Integer |

View File

@@ -0,0 +1,2 @@
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Int.dec in java.lang.Integer |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Int.dec in java.lang.Integer |

View File

@@ -0,0 +1,27 @@
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.toInt in java.lang.Byte |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.toInt in java.lang.Byte |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.toInt in java.lang.Byte |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.toInt in java.lang.Byte |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.toInt in java.lang.Byte |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.toInt in java.lang.Byte |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.toInt in java.lang.Byte |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.toInt in java.lang.Byte |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.toInt in java.lang.Byte |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.toInt in java.lang.Byte |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.toInt in java.lang.Byte |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.toInt in java.lang.Byte |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Int.dec in java.lang.Integer |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Int.rangeTo in java.lang.Integer |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Int.rangeTo in java.lang.Integer |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Short.toInt in java.lang.Short |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Short.toInt in java.lang.Short |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Short.toInt in java.lang.Short |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Short.toInt in java.lang.Short |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Short.toInt in java.lang.Short |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Short.toInt in java.lang.Short |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Short.toInt in java.lang.Short |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Short.toInt in java.lang.Short |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Short.toInt in java.lang.Short |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Short.toInt in java.lang.Short |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Short.toInt in java.lang.Short |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Short.toInt in java.lang.Short |

View File

@@ -1944,38 +1944,38 @@ exprs.kt:
# 15| 1: [VarAccess] y
# 16| 5: [LocalVariableDeclStmt] var ...;
# 16| 1: [LocalVariableDeclExpr] i6
# 16| 0: [MethodAccess] shl(...)
# 16| -1: [VarAccess] x
# 16| 0: [VarAccess] y
# 16| 0: [LShiftExpr] ... << ...
# 16| 0: [VarAccess] x
# 16| 1: [VarAccess] y
# 17| 6: [LocalVariableDeclStmt] var ...;
# 17| 1: [LocalVariableDeclExpr] i7
# 17| 0: [MethodAccess] shr(...)
# 17| -1: [VarAccess] x
# 17| 0: [VarAccess] y
# 17| 0: [RShiftExpr] ... >> ...
# 17| 0: [VarAccess] x
# 17| 1: [VarAccess] y
# 18| 7: [LocalVariableDeclStmt] var ...;
# 18| 1: [LocalVariableDeclExpr] i8
# 18| 0: [MethodAccess] ushr(...)
# 18| -1: [VarAccess] x
# 18| 0: [VarAccess] y
# 18| 0: [URShiftExpr] ... >>> ...
# 18| 0: [VarAccess] x
# 18| 1: [VarAccess] y
# 19| 8: [LocalVariableDeclStmt] var ...;
# 19| 1: [LocalVariableDeclExpr] i9
# 19| 0: [MethodAccess] and(...)
# 19| -1: [VarAccess] x
# 19| 0: [VarAccess] y
# 19| 0: [AndBitwiseExpr] ... & ...
# 19| 0: [VarAccess] x
# 19| 1: [VarAccess] y
# 20| 9: [LocalVariableDeclStmt] var ...;
# 20| 1: [LocalVariableDeclExpr] i10
# 20| 0: [MethodAccess] or(...)
# 20| -1: [VarAccess] x
# 20| 0: [VarAccess] y
# 20| 0: [OrBitwiseExpr] ... | ...
# 20| 0: [VarAccess] x
# 20| 1: [VarAccess] y
# 21| 10: [LocalVariableDeclStmt] var ...;
# 21| 1: [LocalVariableDeclExpr] i11
# 21| 0: [MethodAccess] xor(...)
# 21| -1: [VarAccess] x
# 21| 0: [VarAccess] y
# 21| 0: [XorBitwiseExpr] ... ^ ...
# 21| 0: [VarAccess] x
# 21| 1: [VarAccess] y
# 22| 11: [LocalVariableDeclStmt] var ...;
# 22| 1: [LocalVariableDeclExpr] i12
# 22| 0: [MethodAccess] inv(...)
# 22| -1: [VarAccess] x
# 22| 0: [BitNotExpr] ~...
# 22| 0: [VarAccess] x
# 23| 12: [LocalVariableDeclStmt] var ...;
# 23| 1: [LocalVariableDeclExpr] i13
# 23| 0: [ValueEQExpr] ... (value equals) ...
@@ -2025,8 +2025,8 @@ exprs.kt:
# 31| 0: [VarAccess] x
# 32| 21: [LocalVariableDeclStmt] var ...;
# 32| 1: [LocalVariableDeclExpr] i22
# 32| 0: [MethodAccess] not(...)
# 32| -1: [MethodAccess] contains(...)
# 32| 0: [LogNotExpr] !...
# 32| 0: [MethodAccess] contains(...)
# 32| -1: [MethodAccess] rangeTo(...)
# 32| -1: [VarAccess] x
# 32| 0: [VarAccess] y
@@ -2206,38 +2206,38 @@ exprs.kt:
# 66| 1: [VarAccess] ly
# 67| 53: [LocalVariableDeclStmt] var ...;
# 67| 1: [LocalVariableDeclExpr] l6
# 67| 0: [MethodAccess] shl(...)
# 67| -1: [VarAccess] lx
# 67| 0: [VarAccess] y
# 67| 0: [LShiftExpr] ... << ...
# 67| 0: [VarAccess] lx
# 67| 1: [VarAccess] y
# 68| 54: [LocalVariableDeclStmt] var ...;
# 68| 1: [LocalVariableDeclExpr] l7
# 68| 0: [MethodAccess] shr(...)
# 68| -1: [VarAccess] lx
# 68| 0: [VarAccess] y
# 68| 0: [RShiftExpr] ... >> ...
# 68| 0: [VarAccess] lx
# 68| 1: [VarAccess] y
# 69| 55: [LocalVariableDeclStmt] var ...;
# 69| 1: [LocalVariableDeclExpr] l8
# 69| 0: [MethodAccess] ushr(...)
# 69| -1: [VarAccess] lx
# 69| 0: [VarAccess] y
# 69| 0: [URShiftExpr] ... >>> ...
# 69| 0: [VarAccess] lx
# 69| 1: [VarAccess] y
# 70| 56: [LocalVariableDeclStmt] var ...;
# 70| 1: [LocalVariableDeclExpr] l9
# 70| 0: [MethodAccess] and(...)
# 70| -1: [VarAccess] lx
# 70| 0: [VarAccess] ly
# 70| 0: [AndBitwiseExpr] ... & ...
# 70| 0: [VarAccess] lx
# 70| 1: [VarAccess] ly
# 71| 57: [LocalVariableDeclStmt] var ...;
# 71| 1: [LocalVariableDeclExpr] l10
# 71| 0: [MethodAccess] or(...)
# 71| -1: [VarAccess] lx
# 71| 0: [VarAccess] ly
# 71| 0: [OrBitwiseExpr] ... | ...
# 71| 0: [VarAccess] lx
# 71| 1: [VarAccess] ly
# 72| 58: [LocalVariableDeclStmt] var ...;
# 72| 1: [LocalVariableDeclExpr] l11
# 72| 0: [MethodAccess] xor(...)
# 72| -1: [VarAccess] lx
# 72| 0: [VarAccess] ly
# 72| 0: [XorBitwiseExpr] ... ^ ...
# 72| 0: [VarAccess] lx
# 72| 1: [VarAccess] ly
# 73| 59: [LocalVariableDeclStmt] var ...;
# 73| 1: [LocalVariableDeclExpr] l12
# 73| 0: [MethodAccess] inv(...)
# 73| -1: [VarAccess] lx
# 73| 0: [BitNotExpr] ~...
# 73| 0: [VarAccess] lx
# 74| 60: [LocalVariableDeclStmt] var ...;
# 74| 1: [LocalVariableDeclExpr] l13
# 74| 0: [ValueEQExpr] ... (value equals) ...
@@ -2422,8 +2422,8 @@ exprs.kt:
# 114| 1: [VarAccess] b2
# 115| 98: [LocalVariableDeclStmt] var ...;
# 115| 1: [LocalVariableDeclExpr] b5
# 115| 0: [MethodAccess] not(...)
# 115| -1: [VarAccess] b1
# 115| 0: [LogNotExpr] !...
# 115| 0: [VarAccess] b1
# 117| 99: [LocalVariableDeclStmt] var ...;
# 117| 1: [LocalVariableDeclExpr] c
# 117| 0: [CharacterLiteral] x

View File

@@ -2,6 +2,12 @@
| exprs.kt:13:14:13:18 | ... - ... | exprs.kt:13:14:13:14 | x | exprs.kt:13:18:13:18 | y |
| exprs.kt:14:14:14:18 | ... / ... | exprs.kt:14:14:14:14 | x | exprs.kt:14:18:14:18 | y |
| exprs.kt:15:14:15:18 | ... % ... | exprs.kt:15:14:15:14 | x | exprs.kt:15:18:15:18 | y |
| exprs.kt:16:14:16:20 | ... << ... | exprs.kt:16:14:16:14 | x | exprs.kt:16:20:16:20 | y |
| exprs.kt:17:14:17:20 | ... >> ... | exprs.kt:17:14:17:14 | x | exprs.kt:17:20:17:20 | y |
| exprs.kt:18:14:18:21 | ... >>> ... | exprs.kt:18:14:18:14 | x | exprs.kt:18:21:18:21 | y |
| exprs.kt:19:14:19:20 | ... & ... | exprs.kt:19:14:19:14 | x | exprs.kt:19:20:19:20 | y |
| exprs.kt:20:15:20:20 | ... \| ... | exprs.kt:20:15:20:15 | x | exprs.kt:20:20:20:20 | y |
| exprs.kt:21:15:21:21 | ... ^ ... | exprs.kt:21:15:21:15 | x | exprs.kt:21:21:21:21 | y |
| exprs.kt:23:15:23:20 | ... (value equals) ... | exprs.kt:23:15:23:15 | x | exprs.kt:23:20:23:20 | y |
| exprs.kt:24:15:24:20 | ... (value not-equals) ... | exprs.kt:24:15:24:15 | x | exprs.kt:24:20:24:20 | y |
| exprs.kt:25:15:25:19 | ... < ... | exprs.kt:25:15:25:15 | x | exprs.kt:25:19:25:19 | y |
@@ -38,6 +44,12 @@
| exprs.kt:64:14:64:20 | ... - ... | exprs.kt:64:14:64:15 | lx | exprs.kt:64:19:64:20 | ly |
| exprs.kt:65:14:65:20 | ... / ... | exprs.kt:65:14:65:15 | lx | exprs.kt:65:19:65:20 | ly |
| exprs.kt:66:14:66:20 | ... % ... | exprs.kt:66:14:66:15 | lx | exprs.kt:66:19:66:20 | ly |
| exprs.kt:67:14:67:21 | ... << ... | exprs.kt:67:14:67:15 | lx | exprs.kt:67:21:67:21 | y |
| exprs.kt:68:14:68:21 | ... >> ... | exprs.kt:68:14:68:15 | lx | exprs.kt:68:21:68:21 | y |
| exprs.kt:69:14:69:22 | ... >>> ... | exprs.kt:69:14:69:15 | lx | exprs.kt:69:22:69:22 | y |
| exprs.kt:70:14:70:22 | ... & ... | exprs.kt:70:14:70:15 | lx | exprs.kt:70:21:70:22 | ly |
| exprs.kt:71:15:71:22 | ... \| ... | exprs.kt:71:15:71:16 | lx | exprs.kt:71:21:71:22 | ly |
| exprs.kt:72:15:72:23 | ... ^ ... | exprs.kt:72:15:72:16 | lx | exprs.kt:72:22:72:23 | ly |
| exprs.kt:74:15:74:22 | ... (value equals) ... | exprs.kt:74:15:74:16 | lx | exprs.kt:74:21:74:22 | ly |
| exprs.kt:75:15:75:22 | ... (value not-equals) ... | exprs.kt:75:15:75:16 | lx | exprs.kt:75:21:75:22 | ly |
| exprs.kt:76:15:76:21 | ... < ... | exprs.kt:76:15:76:16 | lx | exprs.kt:76:20:76:21 | ly |

View File

@@ -924,31 +924,31 @@
| exprs.kt:15:18:15:18 | y | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:16:5:16:20 | i6 | exprs.kt:4:1:136:1 | topLevelMethod | LocalVariableDeclExpr |
| exprs.kt:16:14:16:14 | x | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:16:14:16:20 | shl(...) | exprs.kt:4:1:136:1 | topLevelMethod | MethodAccess |
| exprs.kt:16:14:16:20 | ... << ... | exprs.kt:4:1:136:1 | topLevelMethod | LShiftExpr |
| exprs.kt:16:20:16:20 | y | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:17:5:17:20 | i7 | exprs.kt:4:1:136:1 | topLevelMethod | LocalVariableDeclExpr |
| exprs.kt:17:14:17:14 | x | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:17:14:17:20 | shr(...) | exprs.kt:4:1:136:1 | topLevelMethod | MethodAccess |
| exprs.kt:17:14:17:20 | ... >> ... | exprs.kt:4:1:136:1 | topLevelMethod | RShiftExpr |
| exprs.kt:17:20:17:20 | y | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:18:5:18:21 | i8 | exprs.kt:4:1:136:1 | topLevelMethod | LocalVariableDeclExpr |
| exprs.kt:18:14:18:14 | x | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:18:14:18:21 | ushr(...) | exprs.kt:4:1:136:1 | topLevelMethod | MethodAccess |
| exprs.kt:18:14:18:21 | ... >>> ... | exprs.kt:4:1:136:1 | topLevelMethod | URShiftExpr |
| exprs.kt:18:21:18:21 | y | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:19:5:19:20 | i9 | exprs.kt:4:1:136:1 | topLevelMethod | LocalVariableDeclExpr |
| exprs.kt:19:14:19:14 | x | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:19:14:19:20 | and(...) | exprs.kt:4:1:136:1 | topLevelMethod | MethodAccess |
| exprs.kt:19:14:19:20 | ... & ... | exprs.kt:4:1:136:1 | topLevelMethod | AndBitwiseExpr |
| exprs.kt:19:20:19:20 | y | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:20:5:20:20 | i10 | exprs.kt:4:1:136:1 | topLevelMethod | LocalVariableDeclExpr |
| exprs.kt:20:15:20:15 | x | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:20:15:20:20 | or(...) | exprs.kt:4:1:136:1 | topLevelMethod | MethodAccess |
| exprs.kt:20:15:20:20 | ... \| ... | exprs.kt:4:1:136:1 | topLevelMethod | OrBitwiseExpr |
| exprs.kt:20:20:20:20 | y | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:21:5:21:21 | i11 | exprs.kt:4:1:136:1 | topLevelMethod | LocalVariableDeclExpr |
| exprs.kt:21:15:21:15 | x | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:21:15:21:21 | xor(...) | exprs.kt:4:1:136:1 | topLevelMethod | MethodAccess |
| exprs.kt:21:15:21:21 | ... ^ ... | exprs.kt:4:1:136:1 | topLevelMethod | XorBitwiseExpr |
| exprs.kt:21:21:21:21 | y | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:22:5:22:21 | i12 | exprs.kt:4:1:136:1 | topLevelMethod | LocalVariableDeclExpr |
| exprs.kt:22:15:22:15 | x | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:22:17:22:21 | inv(...) | exprs.kt:4:1:136:1 | topLevelMethod | MethodAccess |
| exprs.kt:22:17:22:21 | ~... | exprs.kt:4:1:136:1 | topLevelMethod | BitNotExpr |
| exprs.kt:23:5:23:20 | i13 | exprs.kt:4:1:136:1 | topLevelMethod | LocalVariableDeclExpr |
| exprs.kt:23:15:23:15 | x | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:23:15:23:20 | ... (value equals) ... | exprs.kt:4:1:136:1 | topLevelMethod | ValueEQExpr |
@@ -989,8 +989,8 @@
| exprs.kt:31:25:31:25 | y | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:32:5:32:26 | i22 | exprs.kt:4:1:136:1 | topLevelMethod | LocalVariableDeclExpr |
| exprs.kt:32:15:32:15 | x | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:32:15:32:26 | !... | exprs.kt:4:1:136:1 | topLevelMethod | LogNotExpr |
| exprs.kt:32:15:32:26 | contains(...) | exprs.kt:4:1:136:1 | topLevelMethod | MethodAccess |
| exprs.kt:32:15:32:26 | not(...) | exprs.kt:4:1:136:1 | topLevelMethod | MethodAccess |
| exprs.kt:32:21:32:21 | x | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:32:21:32:26 | rangeTo(...) | exprs.kt:4:1:136:1 | topLevelMethod | MethodAccess |
| exprs.kt:32:26:32:26 | y | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
@@ -1138,31 +1138,31 @@
| exprs.kt:66:19:66:20 | ly | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:67:5:67:21 | l6 | exprs.kt:4:1:136:1 | topLevelMethod | LocalVariableDeclExpr |
| exprs.kt:67:14:67:15 | lx | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:67:14:67:21 | shl(...) | exprs.kt:4:1:136:1 | topLevelMethod | MethodAccess |
| exprs.kt:67:14:67:21 | ... << ... | exprs.kt:4:1:136:1 | topLevelMethod | LShiftExpr |
| exprs.kt:67:21:67:21 | y | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:68:5:68:21 | l7 | exprs.kt:4:1:136:1 | topLevelMethod | LocalVariableDeclExpr |
| exprs.kt:68:14:68:15 | lx | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:68:14:68:21 | shr(...) | exprs.kt:4:1:136:1 | topLevelMethod | MethodAccess |
| exprs.kt:68:14:68:21 | ... >> ... | exprs.kt:4:1:136:1 | topLevelMethod | RShiftExpr |
| exprs.kt:68:21:68:21 | y | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:69:5:69:22 | l8 | exprs.kt:4:1:136:1 | topLevelMethod | LocalVariableDeclExpr |
| exprs.kt:69:14:69:15 | lx | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:69:14:69:22 | ushr(...) | exprs.kt:4:1:136:1 | topLevelMethod | MethodAccess |
| exprs.kt:69:14:69:22 | ... >>> ... | exprs.kt:4:1:136:1 | topLevelMethod | URShiftExpr |
| exprs.kt:69:22:69:22 | y | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:70:5:70:22 | l9 | exprs.kt:4:1:136:1 | topLevelMethod | LocalVariableDeclExpr |
| exprs.kt:70:14:70:15 | lx | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:70:14:70:22 | and(...) | exprs.kt:4:1:136:1 | topLevelMethod | MethodAccess |
| exprs.kt:70:14:70:22 | ... & ... | exprs.kt:4:1:136:1 | topLevelMethod | AndBitwiseExpr |
| exprs.kt:70:21:70:22 | ly | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:71:5:71:22 | l10 | exprs.kt:4:1:136:1 | topLevelMethod | LocalVariableDeclExpr |
| exprs.kt:71:15:71:16 | lx | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:71:15:71:22 | or(...) | exprs.kt:4:1:136:1 | topLevelMethod | MethodAccess |
| exprs.kt:71:15:71:22 | ... \| ... | exprs.kt:4:1:136:1 | topLevelMethod | OrBitwiseExpr |
| exprs.kt:71:21:71:22 | ly | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:72:5:72:23 | l11 | exprs.kt:4:1:136:1 | topLevelMethod | LocalVariableDeclExpr |
| exprs.kt:72:15:72:16 | lx | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:72:15:72:23 | xor(...) | exprs.kt:4:1:136:1 | topLevelMethod | MethodAccess |
| exprs.kt:72:15:72:23 | ... ^ ... | exprs.kt:4:1:136:1 | topLevelMethod | XorBitwiseExpr |
| exprs.kt:72:22:72:23 | ly | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:73:5:73:22 | l12 | exprs.kt:4:1:136:1 | topLevelMethod | LocalVariableDeclExpr |
| exprs.kt:73:15:73:16 | lx | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:73:18:73:22 | inv(...) | exprs.kt:4:1:136:1 | topLevelMethod | MethodAccess |
| exprs.kt:73:18:73:22 | ~... | exprs.kt:4:1:136:1 | topLevelMethod | BitNotExpr |
| exprs.kt:74:5:74:22 | l13 | exprs.kt:4:1:136:1 | topLevelMethod | LocalVariableDeclExpr |
| exprs.kt:74:15:74:16 | lx | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:74:15:74:22 | ... (value equals) ... | exprs.kt:4:1:136:1 | topLevelMethod | ValueEQExpr |
@@ -1308,7 +1308,7 @@
| exprs.kt:114:14:114:21 | ... \|\| ... | exprs.kt:4:1:136:1 | topLevelMethod | OrLogicalExpr |
| exprs.kt:114:20:114:21 | b2 | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:115:5:115:16 | b5 | exprs.kt:4:1:136:1 | topLevelMethod | LocalVariableDeclExpr |
| exprs.kt:115:14:115:16 | not(...) | exprs.kt:4:1:136:1 | topLevelMethod | MethodAccess |
| exprs.kt:115:14:115:16 | !... | exprs.kt:4:1:136:1 | topLevelMethod | LogNotExpr |
| exprs.kt:115:15:115:16 | b1 | exprs.kt:4:1:136:1 | topLevelMethod | VarAccess |
| exprs.kt:117:5:117:15 | c | exprs.kt:4:1:136:1 | topLevelMethod | LocalVariableDeclExpr |
| exprs.kt:117:13:117:15 | x | exprs.kt:4:1:136:1 | topLevelMethod | CharacterLiteral |

View File

@@ -1,3 +1,7 @@
| exprs.kt:22:17:22:21 | ~... | exprs.kt:22:15:22:15 | x |
| exprs.kt:32:15:32:26 | !... | exprs.kt:32:15:32:26 | contains(...) |
| exprs.kt:73:18:73:22 | ~... | exprs.kt:73:15:73:16 | lx |
| exprs.kt:115:14:115:16 | !... | exprs.kt:115:15:115:16 | b1 |
| exprs.kt:196:19:196:20 | ...!! | exprs.kt:196:18:196:18 | x |
| exprs.kt:205:20:205:21 | ...!! | exprs.kt:205:19:205:19 | s |
| exprs.kt:206:20:206:21 | ...!! | exprs.kt:206:19:206:19 | s |

View File

@@ -0,0 +1,6 @@
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.toByte in java.lang.Byte |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.toDouble in java.lang.Byte |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.toFloat in java.lang.Byte |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.toInt in java.lang.Byte |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.toLong in java.lang.Byte |
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Byte.toShort in java.lang.Byte |

View File

@@ -0,0 +1 @@
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Number.toChar in java.lang.Number |

View File

@@ -76,3 +76,103 @@ test.kt:
# 13| 0: [SubExpr] ... - ...
# 13| 0: [VarAccess] i
# 13| 1: [IntegerLiteral] 10
# 15| 8: [Method] special
# 15| 3: [TypeAccess] Unit
#-----| 4: (Parameters)
# 15| 0: [Parameter] n
# 15| 0: [TypeAccess] Number
# 15| 1: [Parameter] m
# 15| 0: [TypeAccess] Map<String,String>
# 15| 0: [TypeAccess] String
# 15| 1: [TypeAccess] String
# 15| 2: [Parameter] s
# 15| 0: [TypeAccess] String
# 15| 3: [Parameter] l
# 15| 0: [TypeAccess] List<Integer>
# 15| 0: [TypeAccess] Integer
# 15| 5: [BlockStmt] { ... }
# 16| 0: [ExprStmt] <Expr>;
# 16| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
# 16| 0: [TypeAccess] Unit
# 16| 1: [MethodAccess] charAt(...)
# 16| -1: [VarAccess] s
# 16| 0: [IntegerLiteral] 1
# 17| 1: [ExprStmt] <Expr>;
# 17| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
# 17| 0: [TypeAccess] Unit
# 17| 1: [MethodAccess] charAt(...)
# 17| -1: [VarAccess] s
# 17| 0: [IntegerLiteral] 1
# 18| 2: [ExprStmt] <Expr>;
# 18| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
# 18| 0: [TypeAccess] Unit
# 18| 1: [MethodAccess] doubleValue(...)
# 18| -1: [VarAccess] n
# 19| 3: [ExprStmt] <Expr>;
# 19| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
# 19| 0: [TypeAccess] Unit
# 19| 1: [MethodAccess] byteValue(...)
# 19| -1: [VarAccess] n
# 20| 4: [ExprStmt] <Expr>;
# 20| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
# 20| 0: [TypeAccess] Unit
# 20| 1: [MethodAccess] toChar(...)
# 20| -1: [VarAccess] n
# 21| 5: [ExprStmt] <Expr>;
# 21| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
# 21| 0: [TypeAccess] Unit
# 21| 1: [MethodAccess] floatValue(...)
# 21| -1: [VarAccess] n
# 22| 6: [ExprStmt] <Expr>;
# 22| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
# 22| 0: [TypeAccess] Unit
# 22| 1: [MethodAccess] intValue(...)
# 22| -1: [VarAccess] n
# 23| 7: [ExprStmt] <Expr>;
# 23| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
# 23| 0: [TypeAccess] Unit
# 23| 1: [MethodAccess] shortValue(...)
# 23| -1: [VarAccess] n
# 24| 8: [ExprStmt] <Expr>;
# 24| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
# 24| 0: [TypeAccess] Unit
# 24| 1: [MethodAccess] keySet(...)
# 24| -1: [VarAccess] m
# 25| 9: [ExprStmt] <Expr>;
# 25| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
# 25| 0: [TypeAccess] Unit
# 25| 1: [MethodAccess] values(...)
# 25| -1: [VarAccess] m
# 26| 10: [ExprStmt] <Expr>;
# 26| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
# 26| 0: [TypeAccess] Unit
# 26| 1: [MethodAccess] entrySet(...)
# 26| -1: [VarAccess] m
# 27| 11: [ExprStmt] <Expr>;
# 27| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
# 27| 0: [TypeAccess] Unit
# 27| 1: [MethodAccess] remove(...)
# 27| -1: [VarAccess] l
# 27| 0: [IntegerLiteral] 1
# 28| 12: [ExprStmt] <Expr>;
# 28| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
# 28| 0: [TypeAccess] Unit
# 28| 1: [MethodAccess] getKey(...)
# 28| -1: [MethodAccess] first(...)
# 28| -2: [TypeAccess] Entry<String,String>
# 28| 0: [TypeAccess] String
# 28| 1: [TypeAccess] String
# 28| -1: [TypeAccess] CollectionsKt
# 28| 0: [MethodAccess] entrySet(...)
# 28| -1: [VarAccess] m
# 29| 13: [ExprStmt] <Expr>;
# 29| 0: [ImplicitCoercionToUnitExpr] <implicit coercion to unit>
# 29| 0: [TypeAccess] Unit
# 29| 1: [MethodAccess] getValue(...)
# 29| -1: [MethodAccess] first(...)
# 29| -2: [TypeAccess] Entry<String,String>
# 29| 0: [TypeAccess] String
# 29| 1: [TypeAccess] String
# 29| -1: [TypeAccess] CollectionsKt
# 29| 0: [MethodAccess] entrySet(...)
# 29| -1: [VarAccess] m

View File

@@ -1,4 +1,7 @@
diagnostics
| file://:0:0:0:0 | Couldn't find a Java equivalent function to kotlin.Number.toChar in java.lang.Number |
#select
| Integer |
| Iterable<? extends T> |
| Object |
| int |

View File

@@ -11,3 +11,20 @@ fun fn2(s: String) = s + ""
fun fn1(i: Int) = i.minus(10)
fun fn2(i: Int) = i - 10
fun special(n: Number, m: Map<String, String>, s: String, l: MutableList<Int>) {
s[1]
s.get(1)
n.toDouble()
n.toByte()
n.toChar()
n.toFloat()
n.toInt()
n.toShort()
m.keys
m.values
m.entries
l.removeAt(1)
m.entries.first().key
m.entries.first().value
}