Restored live template but made it more useful

This commit is contained in:
Valentin Kipyatkov
2015-07-21 15:51:58 +03:00
parent 16ae9e3861
commit 82cd58a556
13 changed files with 56 additions and 18 deletions
@@ -1,7 +1,7 @@
// WITH_RUNTIME
fun a() {
val b = listOf(1,2,3,4,5)
for ((index, c : Int) in b.withIndex()) {
for ((index, c : Int) in b.withIndex()) {<caret>
}
}
@@ -1,6 +1,6 @@
// WITH_RUNTIME
fun foo(bar: IntArray) {
for ((index, a) in bar.withIndex()) {
for ((index, a) in bar.withIndex()) {<caret>
}
}
@@ -1,6 +1,6 @@
// WITH_RUNTIME
fun foo(bar: Iterable<Int>) {
for ((index, a) in bar.withIndex()) {
for ((index, a) in bar.withIndex()) {<caret>
}
}
+4
View File
@@ -0,0 +1,4 @@
// WITH_RUNTIME
fun foo(bar: IntArray) {
for (<caret>a in bar)
}
@@ -0,0 +1,4 @@
// WITH_RUNTIME
fun foo(bar: IntArray) {
for ((index, a) in bar.withIndex())<caret>
}
@@ -1,6 +1,6 @@
// WITH_RUNTIME
fun foo(bar: Array<Object>) {
for ((index, a) in bar.withIndex()) {
for ((index, a) in bar.withIndex()) {<caret>
}
}
+2 -3
View File
@@ -1,6 +1,5 @@
// WITH_RUNTIME
fun foo(bar: Sequence<String>) {
for (<caret>a in bar) {
}
for (<caret>a in bar)
print(a)
}
@@ -1,6 +1,5 @@
// WITH_RUNTIME
fun foo(bar: Sequence<String>) {
for ((index, a) in bar.withIndex()) {
}
for ((index, a) in bar.withIndex())
<caret>print(a)
}
@@ -1,7 +1,7 @@
// WITH_RUNTIME
fun a() {
val b = listOf(1,2,3,4,5)
for ((index, c) in b.withIndex()) {
for ((index, c) in b.withIndex()) {<caret>
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
// WITH_RUNTIME
fun foo(bar: String) {
for (<caret>a in bar) {
print(a)
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
// WITH_RUNTIME
fun foo(bar: String) {
for ((index, a) in bar.withIndex()) {
<caret>print(a)
}
}