Files
kotlin-fork/compiler/testData/diagnostics/tests
Denis Zharkov 7173e56393 Make computation of arguments for raw types lazy
See how we translate raw types to Kotlin model:
RawType(A) = A<ErasedUpperBound(T1), ...>
ErasedUpperBound(T : G<t>) = G<*> // UpperBound(T) is a type G<t> with arguments
ErasedUpperBound(T : A) = A // UpperBound(T) is a type A without arguments
ErasedUpperBound(T : F) = UpperBound(F) // UB(T) is another type parameter F

Stack overflow happens with the following classes:
class A<X extends B> // NB: raw type B in upper bound
class B<Y extends A> // NB: raw type A in upper bound

when calculating raw type for A, we start calculate ErasedUpperBound(Y),
thus starting calculating raw type for B => ErasedUpperBound(X) => RawType(A),
so we have SOE here.
The problem is that we calculating the arguments for these raw types eagerly,
while from the definition of ErasedUpperBound(Y) we only need a type constructor
of raw type B (and the number of parameters), we don't use its arguments.

The solution is to make arguments calculating for raw types lazy

 #KT-16528 Fixed
2017-03-10 13:30:33 +03:00
..
2016-12-14 23:59:38 +03:00
2017-01-16 17:25:13 +03:00
2016-10-11 23:38:52 +03:00
2017-01-16 17:25:13 +03:00
2017-01-11 11:50:34 +01:00
2017-03-01 14:07:09 +03:00
2016-12-26 17:11:32 +03:00
2017-01-19 09:53:17 +03:00
2017-01-23 10:22:34 +03:00
2016-05-16 15:38:13 +03:00
2017-01-16 17:25:13 +03:00
2016-07-21 16:07:16 +03:00
2015-10-14 01:29:10 +03:00
2015-10-14 01:29:10 +03:00
2015-09-25 19:20:20 +03:00
2015-10-14 01:29:10 +03:00
2015-10-07 21:56:07 +03:00
2015-10-14 20:51:01 +03:00
2015-10-16 22:19:33 +03:00
2017-01-16 17:25:13 +03:00
2016-05-16 15:38:13 +03:00