JetDiagnosticsTest migrated to TestGenerator

- test data files renamed from *.jet to *.kt
This commit is contained in:
Andrey Breslav
2012-07-10 14:04:59 +04:00
parent 6c23c093ef
commit 3d8d92c7d3
467 changed files with 2764 additions and 146 deletions
@@ -0,0 +1,36 @@
//KT-1066 false 'Variable cannot be initialized before declaration'
package kt1066
import java.util.Set
fun randomDigit() = 0.toChar()
fun foo(excluded: Set<Char>) {
var digit : Char
do {
digit = randomDigit()
// ^^^^^ here!
} while (excluded.contains(digit))
}
fun test() {
var sum : Int = 0
var first : Int = 1
var second : Int = 2
var temp : Int //= 0 // variable 'temp' initializer is redundant
while (true)
{
if (second > 4000000)
break
if (second % 2 == 0)
sum += second
temp = second
second = first + second
first = temp
}
}