Recursion depth in CommonSupertypes is bounded by maxDepth + 3

This commit is contained in:
Andrey Breslav
2014-08-27 16:13:47 +04:00
parent 364a7a6574
commit 12d18533e8
8 changed files with 195 additions and 11 deletions
@@ -0,0 +1,11 @@
// !DIAGNOSTICS: -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE
trait Rec<T>
class A : Rec<A>
class B : Rec<B>
fun test(a: A, b: B, c: Boolean) {
var ab = if (c) a else b
ab = a
ab = b
}