mirror of
https://github.com/github/codeql.git
synced 2026-04-26 09:15:12 +02:00
Rework SAM conversion extraction (handle arbitrary expression that's being converted)
This commit is contained in:
@@ -2208,76 +2208,264 @@ samConversion.kt:
|
||||
# 0| [CompilationUnit] samConversion
|
||||
# 0| 1: [Class] SamConversionKt
|
||||
# 1| 1: [Method] main
|
||||
#-----| 4: (Parameters)
|
||||
# 1| 0: [Parameter] b
|
||||
# 1| 5: [BlockStmt] { ... }
|
||||
# 2| 0: [LocalVariableDeclStmt] var ...;
|
||||
# 2| 1: [LocalVariableDeclExpr] isEven
|
||||
# 2| 0: [CastExpr] (...)...
|
||||
# 2| 1: [CastExpr] (...)...
|
||||
# 2| 0: [TypeAccess] IntPredicate
|
||||
# 2| 1: [ClassInstanceExpr] new (...)
|
||||
# 2| -4: [AnonymousClass] new Object(...) { ... }
|
||||
# 2| -4: [AnonymousClass] new IntPredicate(...) { ... }
|
||||
# 2| 1: [Constructor]
|
||||
#-----| 4: (Parameters)
|
||||
# 2| 0: [Parameter] <fn>
|
||||
# 2| 5: [BlockStmt] { ... }
|
||||
# 2| 0: [SuperConstructorInvocationStmt] super(...)
|
||||
# 2| 1: [Method] accept
|
||||
# 2| 1: [ExprStmt] <Expr>;
|
||||
# 2| 0: [AssignExpr] ...=...
|
||||
# 2| 0: [VarAccess] this.<fn>
|
||||
# 2| -1: [ThisAccess] this
|
||||
# 2| 1: [VarAccess] <fn>
|
||||
# 2| 1: [FieldDeclaration] Function1<Integer,Boolean> <fn>;
|
||||
# 2| -1: [TypeAccess] Function1<Integer,Boolean>
|
||||
# 17| 3: [Method] accept
|
||||
#-----| 4: (Parameters)
|
||||
# 2| 0: [Parameter] it
|
||||
# 17| 0: [Parameter] i
|
||||
# 2| 5: [BlockStmt] { ... }
|
||||
# 2| 0: [ReturnStmt] return ...
|
||||
# 2| 0: [ValueEQExpr] ... (value equals) ...
|
||||
# 2| 0: [RemExpr] ... % ...
|
||||
# 2| 0: [VarAccess] it
|
||||
# 2| 1: [IntegerLiteral] 2
|
||||
# 2| 1: [IntegerLiteral] 0
|
||||
# 2| -3: [TypeAccess] Object
|
||||
# 4| 1: [ExprStmt] <Expr>;
|
||||
# 4| 0: [MethodAccess] fn1(...)
|
||||
# 4| -1: [CastExpr] (...)...
|
||||
# 2| 0: [MethodAccess] invoke(...)
|
||||
# 2| -1: [VarAccess] <fn>
|
||||
# 2| 0: [VarAccess] i
|
||||
# 2| -3: [TypeAccess] IntPredicate
|
||||
# 2| 0: [LambdaExpr] ...->...
|
||||
# 2| -4: [AnonymousClass] new Function1<Integer,Boolean>(...) { ... }
|
||||
# 2| 1: [Constructor]
|
||||
# 2| 5: [BlockStmt] { ... }
|
||||
# 2| 0: [SuperConstructorInvocationStmt] super(...)
|
||||
# 2| 1: [Method] invoke
|
||||
#-----| 4: (Parameters)
|
||||
# 2| 0: [Parameter] it
|
||||
# 2| 5: [BlockStmt] { ... }
|
||||
# 2| 0: [ReturnStmt] return ...
|
||||
# 2| 0: [ValueEQExpr] ... (value equals) ...
|
||||
# 2| 0: [RemExpr] ... % ...
|
||||
# 2| 0: [VarAccess] it
|
||||
# 2| 1: [IntegerLiteral] 2
|
||||
# 2| 1: [IntegerLiteral] 0
|
||||
# 2| -3: [TypeAccess] Function1<Integer,Boolean>
|
||||
# 4| 1: [LocalVariableDeclStmt] var ...;
|
||||
# 4| 1: [LocalVariableDeclExpr] i0
|
||||
# 4| 2: [CastExpr] (...)...
|
||||
# 4| 0: [TypeAccess] InterfaceFn1
|
||||
# 4| 1: [ClassInstanceExpr] new (...)
|
||||
# 4| -4: [AnonymousClass] new Object(...) { ... }
|
||||
# 4| -4: [AnonymousClass] new InterfaceFn1(...) { ... }
|
||||
# 4| 1: [Constructor]
|
||||
#-----| 4: (Parameters)
|
||||
# 4| 0: [Parameter] <fn>
|
||||
# 4| 5: [BlockStmt] { ... }
|
||||
# 4| 0: [SuperConstructorInvocationStmt] super(...)
|
||||
# 4| 1: [Method] fn1
|
||||
# 4| 1: [ExprStmt] <Expr>;
|
||||
# 4| 0: [AssignExpr] ...=...
|
||||
# 4| 0: [VarAccess] this.<fn>
|
||||
# 4| -1: [ThisAccess] this
|
||||
# 4| 1: [VarAccess] <fn>
|
||||
# 4| 1: [FieldDeclaration] Function2<Integer,Integer,Unit> <fn>;
|
||||
# 4| -1: [TypeAccess] Function2<Integer,Integer,Unit>
|
||||
# 23| 3: [Method] fn1
|
||||
#-----| 4: (Parameters)
|
||||
# 4| 0: [Parameter] a
|
||||
# 4| 1: [Parameter] b
|
||||
# 23| 0: [Parameter] i
|
||||
# 23| 1: [Parameter] j
|
||||
# 4| 5: [BlockStmt] { ... }
|
||||
# 4| 0: [ExprStmt] <Expr>;
|
||||
# 4| 0: [VarAccess] INSTANCE
|
||||
# 4| -3: [TypeAccess] Object
|
||||
# 4| 0: [IntegerLiteral] 1
|
||||
# 4| 1: [IntegerLiteral] 2
|
||||
# 6| 2: [LocalVariableDeclStmt] var ...;
|
||||
# 6| 1: [LocalVariableDeclExpr] i
|
||||
# 6| 0: [CastExpr] (...)...
|
||||
# 6| 0: [TypeAccess] InterfaceFnExt1
|
||||
# 6| 1: [ClassInstanceExpr] new (...)
|
||||
# 6| -4: [AnonymousClass] new Object(...) { ... }
|
||||
# 6| 1: [Constructor]
|
||||
# 6| 5: [BlockStmt] { ... }
|
||||
# 6| 0: [SuperConstructorInvocationStmt] super(...)
|
||||
# 6| 1: [ExtensionMethod] ext
|
||||
# 4| 0: [ReturnStmt] return ...
|
||||
# 4| 0: [MethodAccess] invoke(...)
|
||||
# 4| -1: [VarAccess] <fn>
|
||||
# 4| 0: [VarAccess] i
|
||||
# 4| 1: [VarAccess] j
|
||||
# 4| -3: [TypeAccess] InterfaceFn1
|
||||
# 4| 0: [LambdaExpr] ...->...
|
||||
# 4| -4: [AnonymousClass] new Function2<Integer,Integer,Unit>(...) { ... }
|
||||
# 4| 1: [Constructor]
|
||||
# 4| 5: [BlockStmt] { ... }
|
||||
# 4| 0: [SuperConstructorInvocationStmt] super(...)
|
||||
# 4| 1: [Method] invoke
|
||||
#-----| 4: (Parameters)
|
||||
# 4| 0: [Parameter] a
|
||||
# 4| 1: [Parameter] b
|
||||
# 4| 5: [BlockStmt] { ... }
|
||||
# 4| 0: [ExprStmt] <Expr>;
|
||||
# 4| 0: [VarAccess] INSTANCE
|
||||
# 4| -3: [TypeAccess] Function2<Integer,Integer,Unit>
|
||||
# 5| 2: [LocalVariableDeclStmt] var ...;
|
||||
# 5| 1: [LocalVariableDeclExpr] i1
|
||||
# 5| 2: [CastExpr] (...)...
|
||||
# 5| 0: [TypeAccess] InterfaceFn1
|
||||
# 5| 1: [ClassInstanceExpr] new (...)
|
||||
# 5| -4: [AnonymousClass] new InterfaceFn1(...) { ... }
|
||||
# 5| 1: [Constructor]
|
||||
#-----| 4: (Parameters)
|
||||
# 6| 0: [Parameter] $this$InterfaceFnExt1
|
||||
# 6| 1: [Parameter] i
|
||||
# 6| 5: [BlockStmt] { ... }
|
||||
# 6| 0: [ReturnStmt] return ...
|
||||
# 6| 0: [ValueEQExpr] ... (value equals) ...
|
||||
# 6| 0: [ThisAccess] this
|
||||
# 6| 1: [StringLiteral]
|
||||
# 6| -3: [TypeAccess] Object
|
||||
# 9| 2: [Interface] IntPredicate
|
||||
# 10| 2: [Method] accept
|
||||
# 5| 0: [Parameter] <fn>
|
||||
# 5| 5: [BlockStmt] { ... }
|
||||
# 5| 0: [SuperConstructorInvocationStmt] super(...)
|
||||
# 5| 1: [ExprStmt] <Expr>;
|
||||
# 5| 0: [AssignExpr] ...=...
|
||||
# 5| 0: [VarAccess] this.<fn>
|
||||
# 5| -1: [ThisAccess] this
|
||||
# 5| 1: [VarAccess] <fn>
|
||||
# 5| 1: [FieldDeclaration] Function2<Integer,Integer,Unit> <fn>;
|
||||
# 5| -1: [TypeAccess] Function2<Integer,Integer,Unit>
|
||||
# 23| 3: [Method] fn1
|
||||
#-----| 4: (Parameters)
|
||||
# 23| 0: [Parameter] i
|
||||
# 23| 1: [Parameter] j
|
||||
# 5| 5: [BlockStmt] { ... }
|
||||
# 5| 0: [ReturnStmt] return ...
|
||||
# 5| 0: [MethodAccess] invoke(...)
|
||||
# 5| -1: [VarAccess] <fn>
|
||||
# 5| 0: [VarAccess] i
|
||||
# 5| 1: [VarAccess] j
|
||||
# 5| -3: [TypeAccess] InterfaceFn1
|
||||
# 5| 0: [MemberRefExpr] ...::...
|
||||
# 5| -4: [AnonymousClass] new Function2<Integer,Integer,Unit>(...) { ... }
|
||||
# 5| 1: [Constructor]
|
||||
# 5| 5: [BlockStmt] { ... }
|
||||
# 5| 0: [SuperConstructorInvocationStmt] super(...)
|
||||
# 5| 1: [Method] invoke
|
||||
#-----| 4: (Parameters)
|
||||
# 5| 0: [Parameter] a0
|
||||
# 5| 1: [Parameter] a1
|
||||
# 5| 5: [BlockStmt] { ... }
|
||||
# 5| 0: [ReturnStmt] return ...
|
||||
# 5| 0: [MethodAccess] fn2(...)
|
||||
# 5| 0: [VarAccess] a0
|
||||
# 5| 1: [VarAccess] a1
|
||||
# 5| -3: [TypeAccess] Function2<Integer,Integer,Unit>
|
||||
# 7| 3: [LocalVariableDeclStmt] var ...;
|
||||
# 7| 1: [LocalVariableDeclExpr] i
|
||||
# 7| 2: [CastExpr] (...)...
|
||||
# 7| 0: [TypeAccess] InterfaceFnExt1
|
||||
# 7| 1: [ClassInstanceExpr] new (...)
|
||||
# 7| -4: [AnonymousClass] new InterfaceFnExt1(...) { ... }
|
||||
# 7| 1: [Constructor]
|
||||
#-----| 4: (Parameters)
|
||||
# 7| 0: [Parameter] <fn>
|
||||
# 7| 5: [BlockStmt] { ... }
|
||||
# 7| 0: [SuperConstructorInvocationStmt] super(...)
|
||||
# 7| 1: [ExprStmt] <Expr>;
|
||||
# 7| 0: [AssignExpr] ...=...
|
||||
# 7| 0: [VarAccess] this.<fn>
|
||||
# 7| -1: [ThisAccess] this
|
||||
# 7| 1: [VarAccess] <fn>
|
||||
# 7| 1: [FieldDeclaration] Function2<String,Integer,Boolean> <fn>;
|
||||
# 7| -1: [TypeAccess] Function2<String,Integer,Boolean>
|
||||
# 27| 3: [ExtensionMethod] ext
|
||||
#-----| 4: (Parameters)
|
||||
# 27| 0: [Parameter] <this>
|
||||
# 27| 1: [Parameter] i
|
||||
# 7| 5: [BlockStmt] { ... }
|
||||
# 7| 0: [ReturnStmt] return ...
|
||||
# 7| 0: [MethodAccess] invoke(...)
|
||||
# 7| -1: [VarAccess] <fn>
|
||||
# 7| 0: [VarAccess] <this>
|
||||
# 7| 1: [VarAccess] i
|
||||
# 7| -3: [TypeAccess] InterfaceFnExt1
|
||||
# 7| 0: [LambdaExpr] ...->...
|
||||
# 7| -4: [AnonymousClass] new Function2<String,Integer,Boolean>(...) { ... }
|
||||
# 7| 1: [Constructor]
|
||||
# 7| 5: [BlockStmt] { ... }
|
||||
# 7| 0: [SuperConstructorInvocationStmt] super(...)
|
||||
# 7| 1: [ExtensionMethod] invoke
|
||||
#-----| 4: (Parameters)
|
||||
# 7| 0: [Parameter] $this$InterfaceFnExt1
|
||||
# 7| 1: [Parameter] i
|
||||
# 7| 5: [BlockStmt] { ... }
|
||||
# 7| 0: [ReturnStmt] return ...
|
||||
# 7| 0: [ValueEQExpr] ... (value equals) ...
|
||||
# 7| 0: [ThisAccess] this
|
||||
# 7| 1: [StringLiteral]
|
||||
# 7| -3: [TypeAccess] Function2<String,Integer,Boolean>
|
||||
# 9| 4: [LocalVariableDeclStmt] var ...;
|
||||
# 9| 1: [LocalVariableDeclExpr] x
|
||||
# 9| 1: [CastExpr] (...)...
|
||||
# 9| 0: [TypeAccess] IntPredicate
|
||||
# 9| 1: [ClassInstanceExpr] new (...)
|
||||
# 9| -4: [AnonymousClass] new IntPredicate(...) { ... }
|
||||
# 9| 1: [Constructor]
|
||||
#-----| 4: (Parameters)
|
||||
# 9| 0: [Parameter] <fn>
|
||||
# 9| 5: [BlockStmt] { ... }
|
||||
# 9| 0: [SuperConstructorInvocationStmt] super(...)
|
||||
# 9| 1: [ExprStmt] <Expr>;
|
||||
# 9| 0: [AssignExpr] ...=...
|
||||
# 9| 0: [VarAccess] this.<fn>
|
||||
# 9| -1: [ThisAccess] this
|
||||
# 9| 1: [VarAccess] <fn>
|
||||
# 9| 1: [FieldDeclaration] Function1<Integer,Boolean> <fn>;
|
||||
# 9| -1: [TypeAccess] Function1<Integer,Boolean>
|
||||
# 17| 3: [Method] accept
|
||||
#-----| 4: (Parameters)
|
||||
# 17| 0: [Parameter] i
|
||||
# 9| 5: [BlockStmt] { ... }
|
||||
# 9| 0: [ReturnStmt] return ...
|
||||
# 9| 0: [MethodAccess] invoke(...)
|
||||
# 9| -1: [VarAccess] <fn>
|
||||
# 9| 0: [VarAccess] i
|
||||
# 9| -3: [TypeAccess] IntPredicate
|
||||
# 9| 0: [WhenExpr] when ...
|
||||
#-----| 0: (branch)
|
||||
# 9| 0: [VarAccess] b
|
||||
# 9| 1: [ExprStmt] <Expr>;
|
||||
# 9| 0: [LambdaExpr] ...->...
|
||||
# 9| -4: [AnonymousClass] new Function1<Integer,Boolean>(...) { ... }
|
||||
# 9| 1: [Constructor]
|
||||
# 9| 5: [BlockStmt] { ... }
|
||||
# 9| 0: [SuperConstructorInvocationStmt] super(...)
|
||||
# 9| 1: [Method] invoke
|
||||
#-----| 4: (Parameters)
|
||||
# 10| 0: [Parameter] j
|
||||
# 10| 5: [BlockStmt] { ... }
|
||||
# 10| 0: [ReturnStmt] return ...
|
||||
# 10| 0: [ValueEQExpr] ... (value equals) ...
|
||||
# 10| 0: [RemExpr] ... % ...
|
||||
# 10| 0: [VarAccess] j
|
||||
# 10| 1: [IntegerLiteral] 2
|
||||
# 10| 1: [IntegerLiteral] 0
|
||||
# 9| -3: [TypeAccess] Function1<Integer,Boolean>
|
||||
#-----| 1: (branch)
|
||||
# 9| 0: [BooleanLiteral] true
|
||||
# 11| 1: [ExprStmt] <Expr>;
|
||||
# 11| 0: [LambdaExpr] ...->...
|
||||
# 11| -4: [AnonymousClass] new Function1<Integer,Boolean>(...) { ... }
|
||||
# 11| 1: [Constructor]
|
||||
# 11| 5: [BlockStmt] { ... }
|
||||
# 11| 0: [SuperConstructorInvocationStmt] super(...)
|
||||
# 11| 1: [Method] invoke
|
||||
#-----| 4: (Parameters)
|
||||
# 12| 0: [Parameter] j
|
||||
# 12| 5: [BlockStmt] { ... }
|
||||
# 12| 0: [ReturnStmt] return ...
|
||||
# 12| 0: [ValueEQExpr] ... (value equals) ...
|
||||
# 12| 0: [RemExpr] ... % ...
|
||||
# 12| 0: [VarAccess] j
|
||||
# 12| 1: [IntegerLiteral] 2
|
||||
# 12| 1: [IntegerLiteral] 1
|
||||
# 11| -3: [TypeAccess] Function1<Integer,Boolean>
|
||||
# 20| 2: [Method] fn2
|
||||
#-----| 4: (Parameters)
|
||||
# 10| 0: [Parameter] i
|
||||
# 13| 3: [Interface] InterfaceFn1
|
||||
# 14| 2: [Method] fn1
|
||||
# 20| 0: [Parameter] i
|
||||
# 20| 1: [Parameter] j
|
||||
# 20| 5: [BlockStmt] { ... }
|
||||
# 16| 2: [Interface] IntPredicate
|
||||
# 17| 2: [Method] accept
|
||||
#-----| 4: (Parameters)
|
||||
# 14| 0: [Parameter] i
|
||||
# 14| 1: [Parameter] j
|
||||
# 17| 4: [Interface] InterfaceFnExt1
|
||||
# 18| 2: [ExtensionMethod] ext
|
||||
# 17| 0: [Parameter] i
|
||||
# 22| 3: [Interface] InterfaceFn1
|
||||
# 23| 2: [Method] fn1
|
||||
#-----| 4: (Parameters)
|
||||
# 18| 0: [Parameter] <this>
|
||||
# 18| 1: [Parameter] i
|
||||
# 23| 0: [Parameter] i
|
||||
# 23| 1: [Parameter] j
|
||||
# 26| 4: [Interface] InterfaceFnExt1
|
||||
# 27| 2: [ExtensionMethod] ext
|
||||
#-----| 4: (Parameters)
|
||||
# 27| 0: [Parameter] <this>
|
||||
# 27| 1: [Parameter] i
|
||||
|
||||
@@ -108,4 +108,8 @@
|
||||
| localFunctionCalls.kt:5:25:5:29 | ... + ... | localFunctionCalls.kt:5:25:5:25 | i | localFunctionCalls.kt:5:29:5:29 | x |
|
||||
| samConversion.kt:2:33:2:38 | ... % ... | samConversion.kt:2:33:2:34 | it | samConversion.kt:2:38:2:38 | 2 |
|
||||
| samConversion.kt:2:33:2:43 | ... (value equals) ... | samConversion.kt:2:33:2:38 | ... % ... | samConversion.kt:2:43:2:43 | 0 |
|
||||
| samConversion.kt:6:36:6:45 | ... (value equals) ... | samConversion.kt:6:36:6:39 | this | samConversion.kt:6:44:6:45 | |
|
||||
| samConversion.kt:7:36:7:45 | ... (value equals) ... | samConversion.kt:7:36:7:39 | this | samConversion.kt:7:44:7:45 | |
|
||||
| samConversion.kt:10:14:10:18 | ... % ... | samConversion.kt:10:14:10:14 | j | samConversion.kt:10:18:10:18 | 2 |
|
||||
| samConversion.kt:10:14:10:23 | ... (value equals) ... | samConversion.kt:10:14:10:18 | ... % ... | samConversion.kt:10:23:10:23 | 0 |
|
||||
| samConversion.kt:12:14:12:18 | ... % ... | samConversion.kt:12:14:12:14 | j | samConversion.kt:12:18:12:18 | 2 |
|
||||
| samConversion.kt:12:14:12:23 | ... (value equals) ... | samConversion.kt:12:14:12:18 | ... % ... | samConversion.kt:12:23:12:23 | 1 |
|
||||
|
||||
@@ -1317,29 +1317,108 @@
|
||||
| localFunctionCalls.kt:10:15:10:20 | new (...) | localFunctionCalls.kt:3:1:11:1 | x | ClassInstanceExpr |
|
||||
| localFunctionCalls.kt:10:18:10:19 | 42 | localFunctionCalls.kt:3:1:11:1 | x | IntegerLiteral |
|
||||
| localFunctionCalls.kt:13:1:13:14 | <obinit>(...) | localFunctionCalls.kt:13:1:13:14 | C1 | MethodAccess |
|
||||
| samConversion.kt:2:5:2:45 | isEven | samConversion.kt:1:1:7:1 | main | LocalVariableDeclExpr |
|
||||
| samConversion.kt:2:18:2:45 | (...)... | samConversion.kt:1:1:7:1 | main | CastExpr |
|
||||
| samConversion.kt:2:18:2:45 | IntPredicate | samConversion.kt:1:1:7:1 | main | TypeAccess |
|
||||
| samConversion.kt:2:18:2:45 | Object | samConversion.kt:1:1:7:1 | main | TypeAccess |
|
||||
| samConversion.kt:2:18:2:45 | new (...) | samConversion.kt:1:1:7:1 | main | ClassInstanceExpr |
|
||||
| samConversion.kt:2:33:2:34 | it | samConversion.kt:2:31:2:45 | accept | VarAccess |
|
||||
| samConversion.kt:2:33:2:38 | ... % ... | samConversion.kt:2:31:2:45 | accept | RemExpr |
|
||||
| samConversion.kt:2:33:2:43 | ... (value equals) ... | samConversion.kt:2:31:2:45 | accept | ValueEQExpr |
|
||||
| samConversion.kt:2:38:2:38 | 2 | samConversion.kt:2:31:2:45 | accept | IntegerLiteral |
|
||||
| samConversion.kt:2:43:2:43 | 0 | samConversion.kt:2:31:2:45 | accept | IntegerLiteral |
|
||||
| samConversion.kt:4:5:4:33 | (...)... | samConversion.kt:1:1:7:1 | main | CastExpr |
|
||||
| samConversion.kt:4:5:4:33 | InterfaceFn1 | samConversion.kt:1:1:7:1 | main | TypeAccess |
|
||||
| samConversion.kt:4:5:4:33 | Object | samConversion.kt:1:1:7:1 | main | TypeAccess |
|
||||
| samConversion.kt:4:5:4:33 | new (...) | samConversion.kt:1:1:7:1 | main | ClassInstanceExpr |
|
||||
| samConversion.kt:4:28:4:31 | INSTANCE | samConversion.kt:4:18:4:33 | fn1 | VarAccess |
|
||||
| samConversion.kt:4:35:4:42 | fn1(...) | samConversion.kt:1:1:7:1 | main | MethodAccess |
|
||||
| samConversion.kt:4:39:4:39 | 1 | samConversion.kt:1:1:7:1 | main | IntegerLiteral |
|
||||
| samConversion.kt:4:41:4:41 | 2 | samConversion.kt:1:1:7:1 | main | IntegerLiteral |
|
||||
| samConversion.kt:6:5:6:46 | i | samConversion.kt:1:1:7:1 | main | LocalVariableDeclExpr |
|
||||
| samConversion.kt:6:13:6:46 | (...)... | samConversion.kt:1:1:7:1 | main | CastExpr |
|
||||
| samConversion.kt:6:13:6:46 | InterfaceFnExt1 | samConversion.kt:1:1:7:1 | main | TypeAccess |
|
||||
| samConversion.kt:6:13:6:46 | Object | samConversion.kt:1:1:7:1 | main | TypeAccess |
|
||||
| samConversion.kt:6:13:6:46 | new (...) | samConversion.kt:1:1:7:1 | main | ClassInstanceExpr |
|
||||
| samConversion.kt:6:36:6:39 | this | samConversion.kt:6:29:6:46 | ext | ThisAccess |
|
||||
| samConversion.kt:6:36:6:45 | ... (value equals) ... | samConversion.kt:6:29:6:46 | ext | ValueEQExpr |
|
||||
| samConversion.kt:6:44:6:45 | | samConversion.kt:6:29:6:46 | ext | StringLiteral |
|
||||
| samConversion.kt:2:5:2:45 | isEven | samConversion.kt:1:1:14:1 | main | LocalVariableDeclExpr |
|
||||
| samConversion.kt:2:18:2:45 | (...)... | samConversion.kt:1:1:14:1 | main | CastExpr |
|
||||
| samConversion.kt:2:18:2:45 | ...=... | samConversion.kt:2:18:2:45 | | AssignExpr |
|
||||
| samConversion.kt:2:18:2:45 | <fn> | samConversion.kt:2:18:2:45 | | VarAccess |
|
||||
| samConversion.kt:2:18:2:45 | <fn> | samConversion.kt:17:5:17:31 | accept | VarAccess |
|
||||
| samConversion.kt:2:18:2:45 | Function1<Integer,Boolean> | file://:0:0:0:0 | <none> | TypeAccess |
|
||||
| samConversion.kt:2:18:2:45 | IntPredicate | samConversion.kt:1:1:14:1 | main | TypeAccess |
|
||||
| samConversion.kt:2:18:2:45 | IntPredicate | samConversion.kt:1:1:14:1 | main | TypeAccess |
|
||||
| samConversion.kt:2:18:2:45 | i | samConversion.kt:17:5:17:31 | accept | VarAccess |
|
||||
| samConversion.kt:2:18:2:45 | invoke(...) | samConversion.kt:17:5:17:31 | accept | MethodAccess |
|
||||
| samConversion.kt:2:18:2:45 | new (...) | samConversion.kt:1:1:14:1 | main | ClassInstanceExpr |
|
||||
| samConversion.kt:2:18:2:45 | this | samConversion.kt:2:18:2:45 | | ThisAccess |
|
||||
| samConversion.kt:2:18:2:45 | this.<fn> | samConversion.kt:2:18:2:45 | | VarAccess |
|
||||
| samConversion.kt:2:31:2:45 | ...->... | samConversion.kt:1:1:14:1 | main | LambdaExpr |
|
||||
| samConversion.kt:2:31:2:45 | Function1<Integer,Boolean> | samConversion.kt:1:1:14:1 | main | TypeAccess |
|
||||
| samConversion.kt:2:33:2:34 | it | samConversion.kt:2:31:2:45 | invoke | VarAccess |
|
||||
| samConversion.kt:2:33:2:38 | ... % ... | samConversion.kt:2:31:2:45 | invoke | RemExpr |
|
||||
| samConversion.kt:2:33:2:43 | ... (value equals) ... | samConversion.kt:2:31:2:45 | invoke | ValueEQExpr |
|
||||
| samConversion.kt:2:38:2:38 | 2 | samConversion.kt:2:31:2:45 | invoke | IntegerLiteral |
|
||||
| samConversion.kt:2:43:2:43 | 0 | samConversion.kt:2:31:2:45 | invoke | IntegerLiteral |
|
||||
| samConversion.kt:4:5:4:42 | i0 | samConversion.kt:1:1:14:1 | main | LocalVariableDeclExpr |
|
||||
| samConversion.kt:4:14:4:42 | (...)... | samConversion.kt:1:1:14:1 | main | CastExpr |
|
||||
| samConversion.kt:4:14:4:42 | ...=... | samConversion.kt:4:14:4:42 | | AssignExpr |
|
||||
| samConversion.kt:4:14:4:42 | <fn> | samConversion.kt:4:14:4:42 | | VarAccess |
|
||||
| samConversion.kt:4:14:4:42 | <fn> | samConversion.kt:23:5:23:27 | fn1 | VarAccess |
|
||||
| samConversion.kt:4:14:4:42 | Function2<Integer,Integer,Unit> | file://:0:0:0:0 | <none> | TypeAccess |
|
||||
| samConversion.kt:4:14:4:42 | InterfaceFn1 | samConversion.kt:1:1:14:1 | main | TypeAccess |
|
||||
| samConversion.kt:4:14:4:42 | InterfaceFn1 | samConversion.kt:1:1:14:1 | main | TypeAccess |
|
||||
| samConversion.kt:4:14:4:42 | i | samConversion.kt:23:5:23:27 | fn1 | VarAccess |
|
||||
| samConversion.kt:4:14:4:42 | invoke(...) | samConversion.kt:23:5:23:27 | fn1 | MethodAccess |
|
||||
| samConversion.kt:4:14:4:42 | j | samConversion.kt:23:5:23:27 | fn1 | VarAccess |
|
||||
| samConversion.kt:4:14:4:42 | new (...) | samConversion.kt:1:1:14:1 | main | ClassInstanceExpr |
|
||||
| samConversion.kt:4:14:4:42 | this | samConversion.kt:4:14:4:42 | | ThisAccess |
|
||||
| samConversion.kt:4:14:4:42 | this.<fn> | samConversion.kt:4:14:4:42 | | VarAccess |
|
||||
| samConversion.kt:4:27:4:42 | ...->... | samConversion.kt:1:1:14:1 | main | LambdaExpr |
|
||||
| samConversion.kt:4:27:4:42 | Function2<Integer,Integer,Unit> | samConversion.kt:1:1:14:1 | main | TypeAccess |
|
||||
| samConversion.kt:4:37:4:40 | INSTANCE | samConversion.kt:4:27:4:42 | invoke | VarAccess |
|
||||
| samConversion.kt:5:5:5:32 | i1 | samConversion.kt:1:1:14:1 | main | LocalVariableDeclExpr |
|
||||
| samConversion.kt:5:14:5:32 | (...)... | samConversion.kt:1:1:14:1 | main | CastExpr |
|
||||
| samConversion.kt:5:14:5:32 | ...=... | samConversion.kt:5:14:5:32 | | AssignExpr |
|
||||
| samConversion.kt:5:14:5:32 | <fn> | samConversion.kt:5:14:5:32 | | VarAccess |
|
||||
| samConversion.kt:5:14:5:32 | <fn> | samConversion.kt:23:5:23:27 | fn1 | VarAccess |
|
||||
| samConversion.kt:5:14:5:32 | Function2<Integer,Integer,Unit> | file://:0:0:0:0 | <none> | TypeAccess |
|
||||
| samConversion.kt:5:14:5:32 | InterfaceFn1 | samConversion.kt:1:1:14:1 | main | TypeAccess |
|
||||
| samConversion.kt:5:14:5:32 | InterfaceFn1 | samConversion.kt:1:1:14:1 | main | TypeAccess |
|
||||
| samConversion.kt:5:14:5:32 | i | samConversion.kt:23:5:23:27 | fn1 | VarAccess |
|
||||
| samConversion.kt:5:14:5:32 | invoke(...) | samConversion.kt:23:5:23:27 | fn1 | MethodAccess |
|
||||
| samConversion.kt:5:14:5:32 | j | samConversion.kt:23:5:23:27 | fn1 | VarAccess |
|
||||
| samConversion.kt:5:14:5:32 | new (...) | samConversion.kt:1:1:14:1 | main | ClassInstanceExpr |
|
||||
| samConversion.kt:5:14:5:32 | this | samConversion.kt:5:14:5:32 | | ThisAccess |
|
||||
| samConversion.kt:5:14:5:32 | this.<fn> | samConversion.kt:5:14:5:32 | | VarAccess |
|
||||
| samConversion.kt:5:27:5:31 | ...::... | samConversion.kt:1:1:14:1 | main | MemberRefExpr |
|
||||
| samConversion.kt:5:27:5:31 | Function2<Integer,Integer,Unit> | samConversion.kt:1:1:14:1 | main | TypeAccess |
|
||||
| samConversion.kt:5:27:5:31 | a0 | samConversion.kt:5:27:5:31 | invoke | VarAccess |
|
||||
| samConversion.kt:5:27:5:31 | a1 | samConversion.kt:5:27:5:31 | invoke | VarAccess |
|
||||
| samConversion.kt:5:27:5:31 | fn2(...) | samConversion.kt:5:27:5:31 | invoke | MethodAccess |
|
||||
| samConversion.kt:7:5:7:46 | i | samConversion.kt:1:1:14:1 | main | LocalVariableDeclExpr |
|
||||
| samConversion.kt:7:13:7:46 | (...)... | samConversion.kt:1:1:14:1 | main | CastExpr |
|
||||
| samConversion.kt:7:13:7:46 | ...=... | samConversion.kt:7:13:7:46 | | AssignExpr |
|
||||
| samConversion.kt:7:13:7:46 | <fn> | samConversion.kt:7:13:7:46 | | VarAccess |
|
||||
| samConversion.kt:7:13:7:46 | <fn> | samConversion.kt:27:5:27:35 | ext | VarAccess |
|
||||
| samConversion.kt:7:13:7:46 | <this> | samConversion.kt:27:5:27:35 | ext | VarAccess |
|
||||
| samConversion.kt:7:13:7:46 | Function2<String,Integer,Boolean> | file://:0:0:0:0 | <none> | TypeAccess |
|
||||
| samConversion.kt:7:13:7:46 | InterfaceFnExt1 | samConversion.kt:1:1:14:1 | main | TypeAccess |
|
||||
| samConversion.kt:7:13:7:46 | InterfaceFnExt1 | samConversion.kt:1:1:14:1 | main | TypeAccess |
|
||||
| samConversion.kt:7:13:7:46 | i | samConversion.kt:27:5:27:35 | ext | VarAccess |
|
||||
| samConversion.kt:7:13:7:46 | invoke(...) | samConversion.kt:27:5:27:35 | ext | MethodAccess |
|
||||
| samConversion.kt:7:13:7:46 | new (...) | samConversion.kt:1:1:14:1 | main | ClassInstanceExpr |
|
||||
| samConversion.kt:7:13:7:46 | this | samConversion.kt:7:13:7:46 | | ThisAccess |
|
||||
| samConversion.kt:7:13:7:46 | this.<fn> | samConversion.kt:7:13:7:46 | | VarAccess |
|
||||
| samConversion.kt:7:29:7:46 | ...->... | samConversion.kt:1:1:14:1 | main | LambdaExpr |
|
||||
| samConversion.kt:7:29:7:46 | Function2<String,Integer,Boolean> | samConversion.kt:1:1:14:1 | main | TypeAccess |
|
||||
| samConversion.kt:7:36:7:39 | this | samConversion.kt:7:29:7:46 | invoke | ThisAccess |
|
||||
| samConversion.kt:7:36:7:45 | ... (value equals) ... | samConversion.kt:7:29:7:46 | invoke | ValueEQExpr |
|
||||
| samConversion.kt:7:44:7:45 | | samConversion.kt:7:29:7:46 | invoke | StringLiteral |
|
||||
| samConversion.kt:9:5:13:6 | x | samConversion.kt:1:1:14:1 | main | LocalVariableDeclExpr |
|
||||
| samConversion.kt:9:13:13:6 | (...)... | samConversion.kt:1:1:14:1 | main | CastExpr |
|
||||
| samConversion.kt:9:13:13:6 | ...=... | samConversion.kt:9:13:13:6 | | AssignExpr |
|
||||
| samConversion.kt:9:13:13:6 | <fn> | samConversion.kt:9:13:13:6 | | VarAccess |
|
||||
| samConversion.kt:9:13:13:6 | <fn> | samConversion.kt:17:5:17:31 | accept | VarAccess |
|
||||
| samConversion.kt:9:13:13:6 | Function1<Integer,Boolean> | file://:0:0:0:0 | <none> | TypeAccess |
|
||||
| samConversion.kt:9:13:13:6 | IntPredicate | samConversion.kt:1:1:14:1 | main | TypeAccess |
|
||||
| samConversion.kt:9:13:13:6 | IntPredicate | samConversion.kt:1:1:14:1 | main | TypeAccess |
|
||||
| samConversion.kt:9:13:13:6 | i | samConversion.kt:17:5:17:31 | accept | VarAccess |
|
||||
| samConversion.kt:9:13:13:6 | invoke(...) | samConversion.kt:17:5:17:31 | accept | MethodAccess |
|
||||
| samConversion.kt:9:13:13:6 | new (...) | samConversion.kt:1:1:14:1 | main | ClassInstanceExpr |
|
||||
| samConversion.kt:9:13:13:6 | this | samConversion.kt:9:13:13:6 | | ThisAccess |
|
||||
| samConversion.kt:9:13:13:6 | this.<fn> | samConversion.kt:9:13:13:6 | | VarAccess |
|
||||
| samConversion.kt:9:26:13:5 | true | samConversion.kt:1:1:14:1 | main | BooleanLiteral |
|
||||
| samConversion.kt:9:26:13:5 | when ... | samConversion.kt:1:1:14:1 | main | WhenExpr |
|
||||
| samConversion.kt:9:30:9:30 | b | samConversion.kt:1:1:14:1 | main | VarAccess |
|
||||
| samConversion.kt:9:33:11:5 | ...->... | samConversion.kt:1:1:14:1 | main | LambdaExpr |
|
||||
| samConversion.kt:9:33:11:5 | Function1<Integer,Boolean> | samConversion.kt:1:1:14:1 | main | TypeAccess |
|
||||
| samConversion.kt:10:14:10:14 | j | samConversion.kt:9:33:11:5 | invoke | VarAccess |
|
||||
| samConversion.kt:10:14:10:18 | ... % ... | samConversion.kt:9:33:11:5 | invoke | RemExpr |
|
||||
| samConversion.kt:10:14:10:23 | ... (value equals) ... | samConversion.kt:9:33:11:5 | invoke | ValueEQExpr |
|
||||
| samConversion.kt:10:18:10:18 | 2 | samConversion.kt:9:33:11:5 | invoke | IntegerLiteral |
|
||||
| samConversion.kt:10:23:10:23 | 0 | samConversion.kt:9:33:11:5 | invoke | IntegerLiteral |
|
||||
| samConversion.kt:11:12:13:5 | ...->... | samConversion.kt:1:1:14:1 | main | LambdaExpr |
|
||||
| samConversion.kt:11:12:13:5 | Function1<Integer,Boolean> | samConversion.kt:1:1:14:1 | main | TypeAccess |
|
||||
| samConversion.kt:12:14:12:14 | j | samConversion.kt:11:12:13:5 | invoke | VarAccess |
|
||||
| samConversion.kt:12:14:12:18 | ... % ... | samConversion.kt:11:12:13:5 | invoke | RemExpr |
|
||||
| samConversion.kt:12:14:12:23 | ... (value equals) ... | samConversion.kt:11:12:13:5 | invoke | ValueEQExpr |
|
||||
| samConversion.kt:12:18:12:18 | 2 | samConversion.kt:11:12:13:5 | invoke | IntegerLiteral |
|
||||
| samConversion.kt:12:23:12:23 | 1 | samConversion.kt:11:12:13:5 | invoke | IntegerLiteral |
|
||||
|
||||
@@ -13,6 +13,11 @@ lambdaExpr
|
||||
| funcExprs.kt:27:37:27:47 | ...->... | stmt body | funcExprs.kt:27:37:27:47 | invoke | invoke(int) | funcExprs.kt:27:37:27:47 | new Function1<Integer,Double>(...) { ... } |
|
||||
| funcExprs.kt:29:29:29:112 | ...->... | stmt body | funcExprs.kt:29:29:29:112 | invoke | invoke(int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,int) | funcExprs.kt:29:29:29:112 | new Function22<Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Integer,Unit>(...) { ... } |
|
||||
| funcExprs.kt:30:29:30:117 | ...->... | stmt body | funcExprs.kt:30:29:30:117 | invoke | invoke(java.lang.Object[]) | funcExprs.kt:30:29:30:117 | new FunctionN<String>(...) { ... } |
|
||||
| samConversion.kt:2:31:2:45 | ...->... | stmt body | samConversion.kt:2:31:2:45 | invoke | invoke(int) | samConversion.kt:2:31:2:45 | new Function1<Integer,Boolean>(...) { ... } |
|
||||
| samConversion.kt:4:27:4:42 | ...->... | stmt body | samConversion.kt:4:27:4:42 | invoke | invoke(int,int) | samConversion.kt:4:27:4:42 | new Function2<Integer,Integer,Unit>(...) { ... } |
|
||||
| samConversion.kt:7:29:7:46 | ...->... | stmt body | samConversion.kt:7:29:7:46 | invoke | invoke(java.lang.String,int) | samConversion.kt:7:29:7:46 | new Function2<String,Integer,Boolean>(...) { ... } |
|
||||
| samConversion.kt:9:33:11:5 | ...->... | stmt body | samConversion.kt:9:33:11:5 | invoke | invoke(int) | samConversion.kt:9:33:11:5 | new Function1<Integer,Boolean>(...) { ... } |
|
||||
| samConversion.kt:11:12:13:5 | ...->... | stmt body | samConversion.kt:11:12:13:5 | invoke | invoke(int) | samConversion.kt:11:12:13:5 | new Function1<Integer,Boolean>(...) { ... } |
|
||||
memberRefExprs
|
||||
| funcExprs.kt:32:26:32:38 | ...::... | funcExprs.kt:32:26:32:38 | invoke | invoke() | funcExprs.kt:32:26:32:38 | new Function0<Integer>(...) { ... } |
|
||||
| funcExprs.kt:33:26:33:36 | ...::... | funcExprs.kt:33:26:33:36 | invoke | invoke() | funcExprs.kt:33:26:33:36 | new Function0<Integer>(...) { ... } |
|
||||
@@ -25,3 +30,4 @@ memberRefExprs
|
||||
| funcExprs.kt:40:30:40:41 | ...::... | funcExprs.kt:40:30:40:41 | invoke | invoke(java.lang.Object[]) | funcExprs.kt:40:30:40:41 | new FunctionN<String>(...) { ... } |
|
||||
| funcExprs.kt:43:26:43:32 | ...::... | funcExprs.kt:43:26:43:32 | invoke | invoke() | funcExprs.kt:43:26:43:32 | new Function0<Integer>(...) { ... } |
|
||||
| funcExprs.kt:45:8:45:16 | ...::... | funcExprs.kt:45:8:45:16 | invoke | invoke() | funcExprs.kt:45:8:45:16 | new Function0<FuncRef>(...) { ... } |
|
||||
| samConversion.kt:5:27:5:31 | ...::... | samConversion.kt:5:27:5:31 | invoke | invoke(int,int) | samConversion.kt:5:27:5:31 | new Function2<Integer,Integer,Unit>(...) { ... } |
|
||||
|
||||
@@ -1,15 +1,24 @@
|
||||
fun main() {
|
||||
fun main(b: Boolean) {
|
||||
val isEven = IntPredicate { it % 2 == 0 }
|
||||
|
||||
InterfaceFn1 { a, b -> Unit }.fn1(1,2)
|
||||
val i0 = InterfaceFn1 { a, b -> Unit }
|
||||
val i1 = InterfaceFn1(::fn2)
|
||||
|
||||
val i = InterfaceFnExt1 { i -> this == ""}
|
||||
|
||||
val x = IntPredicate(if (b) {
|
||||
j -> j % 2 == 0
|
||||
} else {
|
||||
j -> j % 2 == 1
|
||||
})
|
||||
}
|
||||
|
||||
fun interface IntPredicate {
|
||||
fun accept(i: Int): Boolean
|
||||
}
|
||||
|
||||
fun fn2(i: Int, j: Int) { }
|
||||
|
||||
fun interface InterfaceFn1 {
|
||||
fun fn1(i: Int, j: Int)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user