fe328f8c7a
1) Trim unused spaces in annotations 2) Rewrote fq name rendering 3) Added annotations to for loop variable 4) Added type arguments render along to type parameters in functions
45 lines
1.0 KiB
Kotlin
Vendored
45 lines
1.0 KiB
Kotlin
Vendored
fun simple() {
|
|
// Int Int
|
|
// │ │
|
|
var x = 10
|
|
// var simple.x: Int
|
|
// │ fun (Int).plus(Int): Int
|
|
// │ │ Int
|
|
// │ │ │
|
|
x += 20
|
|
// var simple.x: Int
|
|
// │ fun (Int).minus(Int): Int
|
|
// │ │ Int
|
|
// │ │ │
|
|
x -= 5
|
|
// var simple.x: Int
|
|
// │ fun (Int).div(Int): Int
|
|
// │ │ Int
|
|
// │ │ │
|
|
x /= 5
|
|
// var simple.x: Int
|
|
// │ fun (Int).times(Int): Int
|
|
// │ │ Int
|
|
// │ │ │
|
|
x *= 10
|
|
}
|
|
|
|
// collections/List<String>
|
|
// │
|
|
fun List<String>.modify() {
|
|
// fun <T> collections/Collection<String>.plus<String>(String): collections/List<String>
|
|
// │
|
|
this += "Alpha"
|
|
// fun <T> collections/Collection<String>.plus<String>(String): collections/List<String>
|
|
// │
|
|
this += "Omega"
|
|
}
|
|
|
|
fun Any.modify() {
|
|
// collections/List<Int>
|
|
// │ fun <T> collections/Collection<Int>.plus<Int>(Int): collections/List<Int>
|
|
// │ │ Int
|
|
// │ │ │
|
|
(this as List<Int>) += 42
|
|
}
|