Do not try to detect cycles if delegation call resolution is unsuccessful

This commit is contained in:
Denis Zharkov
2015-03-23 11:06:48 +03:00
parent 9da88bbd0f
commit 023e1a13a9
3 changed files with 3 additions and 3 deletions
@@ -17,5 +17,5 @@ class A1<R> : B<R> {
}
class A2<R> {
constructor(t: R, i: Int) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(<!TYPE_MISMATCH!>i<!>, 1)
constructor(t: R, i: Int) : this(<!TYPE_MISMATCH!>i<!>, 1)
}
@@ -1,4 +1,4 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
class X<T> {
constructor(t: T, i: Int): <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(<!TYPE_MISMATCH!>i<!>, 1)
constructor(t: T, i: Int): this(<!TYPE_MISMATCH!>i<!>, 1)
}