Line markers for recursive calls.

This commit is contained in:
Evgeny Gerashchenko
2015-04-02 01:46:45 +03:00
parent 06c05193a6
commit 6041d566d9
16 changed files with 285 additions and 0 deletions
@@ -0,0 +1,5 @@
fun Any.get(a: Int) {
if (a > 0) {
<lineMarker>this[a - 1]</lineMarker>
}
}
@@ -0,0 +1,5 @@
fun Any.f(a: Int) {
"".f(1)
this.<lineMarker>f</lineMarker>(2)
<lineMarker>f</lineMarker>(3)
}
@@ -0,0 +1,3 @@
fun <T> f(a: Int) {
<lineMarker>f</lineMarker><String>(55)
}
@@ -0,0 +1,5 @@
fun f(a: Int) {
run {
<lineMarker>f</lineMarker>(a - 1)
}
}
@@ -0,0 +1,5 @@
fun outer(a: Int) {
SwingUtilities.invokeLater {
outer(a - 1)
}
}
@@ -0,0 +1,7 @@
fun f(a: Int) {
class Local {
fun member() {
f(11)
}
}
}
@@ -0,0 +1,3 @@
fun f(a: Int) {
val x = ::f
}
@@ -0,0 +1,7 @@
fun outer(a: Int) {
fun local(a: Int) {
if (a > 0) {
outer(a - 1)
}
}
}
@@ -0,0 +1,7 @@
class F {
fun f(a: Int, other: F) {
if (a > 0) {
other.f(a - 1)
}
}
}
@@ -0,0 +1,7 @@
fun f(a: Int): Int {
if (a > 0) {
<lineMarker>f</lineMarker>(a - 1) + f(a + 1)
}
return <lineMarker>f</lineMarker>(a)
}
@@ -0,0 +1,5 @@
fun f(a: Int) {
if (a > 0) {
<lineMarker descr="Recursive call">f</lineMarker>(a - 1)
}
}
@@ -0,0 +1,12 @@
open class <lineMarker></lineMarker>Super {
open fun <lineMarker></lineMarker>f(a: Int) {
}
}
class F: Super() {
override fun <lineMarker></lineMarker>f(a: Int) {
if (a > 0) {
super.f(a - 1)
}
}
}
@@ -0,0 +1,7 @@
class F {
fun f(a: Int) {
if (a > 0) {
this.<lineMarker>f</lineMarker>(a - 1)
}
}
}