Minor. Add tests and comment about copying generic parameters to

constructor, but not function reference to the constructor.

 #KT-32162
This commit is contained in:
Ilmir Usmanov
2022-01-31 06:21:59 +01:00
parent 84ccf412cb
commit 00a08fc6a4
16 changed files with 364 additions and 0 deletions
@@ -0,0 +1,14 @@
// LANGUAGE: -JvmInlineValueClasses, +GenericInlineClassParameter
// IGNORE_BACKED: JVM
inline class ICAny<T>(val value: T)
fun box(): String {
var res = ICAny("OK").value
if (res != "OK") return "FAIL 1: $res"
res = ICAny(ICAny("OK")).value.value
if (res != "OK") return "FAIL 2: $res"
res = ICAny(ICAny(ICAny("OK"))).value.value.value
if (res != "OK") return "FAIL 3: $res"
return "OK"
}