[IR BE] Fix inline class lowering

- provide additional type parameters from context when transforming
 constructor into static function.
 - fix KT-41771
 - add test
This commit is contained in:
Roman Artemev
2020-09-22 17:57:55 +03:00
parent 5954db18cb
commit 76ed09482f
9 changed files with 63 additions and 1 deletions
@@ -0,0 +1,11 @@
// KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME
// KT-41771
inline class Polynomial<T : Any>(val coefficients: List<T>) {
constructor(vararg coefficients: T) : this(coefficients.toList())
}
fun box(): String {
val p = Polynomial("FAIL1", "OK", "FAIL2")
return p.coefficients[1]
}