File tree Expand file tree Collapse file tree 5 files changed +46
-0
lines changed
java/ql/test/kotlin/library-tests/ministdlib Expand file tree Collapse file tree 5 files changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ package kotlin
2
+
3
+ /*
4
+ This is a mini standard library replacement, to make it easy to write
5
+ very small tests that create very small databases.
6
+
7
+ If you define a class, then you will need to also define any members that
8
+ compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/descriptors/IrBuiltInsOverDescriptors.kt
9
+ expects (e.g. with findFunctions(...).first) to exist.
10
+ */
11
+
12
+ public open class Any {
13
+ fun toString (): String { return this .toString() }
14
+ open operator fun equals (other : Any? ): Boolean { return this .equals(other) }
15
+ }
16
+
17
+ public open class String {
18
+ operator fun plus (other : Any? ): String { return this .plus(other) }
19
+ }
20
+
21
+ public open class Boolean {
22
+ operator fun not (): Boolean { return this .not () }
23
+ }
24
+
25
+ public open class Int {
26
+ operator fun plus (other : Int ): Int { return this .plus(other) }
27
+ operator fun times (other : Int ): Int { return this .times(other) }
28
+ infix fun xor (other : Int ): Int { return this .xor(other) }
29
+ }
30
+
31
+ public open class Unit {
32
+ }
33
+
Original file line number Diff line number Diff line change
1
+ class MyClass {}
Original file line number Diff line number Diff line change
1
+ | MiniStdLib.kt:12:1:15:1 | Any |
2
+ | MiniStdLib.kt:17:1:19:1 | String |
3
+ | MiniStdLib.kt:21:1:23:1 | Boolean |
4
+ | MiniStdLib.kt:25:1:29:1 | Int |
5
+ | MiniStdLib.kt:31:1:32:1 | Unit |
6
+ | MyClass.kt:1:1:1:16 | MyClass |
7
+ | file://:0:0:0:0 | FakeKotlinClass |
Original file line number Diff line number Diff line change
1
+ import java
2
+
3
+ from Class c
4
+ select c
Original file line number Diff line number Diff line change
1
+ codeql-extractor-kotlin-options: -no-jdk -no-reflect -no-stdlib -Xallow-kotlin-package
You can’t perform that action at this time.
0 commit comments