KT-39228 Fix inliner when latest 1.4 compiler used with 1.3 stdlib

Since 1.4.0-dev-8774, we mangle functions returning inline class values,
including functions with return type 'kotlin.Result'. This causes
incompatibility when 1.4 compiler is used with 1.3 (or just some
pre-1.4.0-dev-8774) standard library.

Also, write "message from the future" on functions returning inline
class values indicating that they can be used since compiler version 1.4
(otherwise 1.3 compiler using 1.4 stdlib would fail to find some
@InlineOnly functions such as 'Result.success' and 'Result.failure').
This commit is contained in:
Dmitry Petrov
2020-05-28 16:26:11 +03:00
parent ffdab473e2
commit 94509bdb4e
10 changed files with 113 additions and 29 deletions
+8
View File
@@ -79,41 +79,49 @@ public final annotation class A : kotlin/Annotation {
public final get
// requires language version 1.3.0 (level=ERROR)
// requires compiler version 1.4.0 (level=ERROR)
// getter: ub()B
public final val ub: kotlin/UByte
public final get
// requires language version 1.3.0 (level=ERROR)
// requires compiler version 1.4.0 (level=ERROR)
// getter: ub_max()B
public final val ub_max: kotlin/UByte
public final get
// requires language version 1.3.0 (level=ERROR)
// requires compiler version 1.4.0 (level=ERROR)
// getter: ui()I
public final val ui: kotlin/UInt
public final get
// requires language version 1.3.0 (level=ERROR)
// requires compiler version 1.4.0 (level=ERROR)
// getter: ui_max()I
public final val ui_max: kotlin/UInt
public final get
// requires language version 1.3.0 (level=ERROR)
// requires compiler version 1.4.0 (level=ERROR)
// getter: ul()J
public final val ul: kotlin/ULong
public final get
// requires language version 1.3.0 (level=ERROR)
// requires compiler version 1.4.0 (level=ERROR)
// getter: ul_max()J
public final val ul_max: kotlin/ULong
public final get
// requires language version 1.3.0 (level=ERROR)
// requires compiler version 1.4.0 (level=ERROR)
// getter: us()S
public final val us: kotlin/UShort
public final get
// requires language version 1.3.0 (level=ERROR)
// requires compiler version 1.4.0 (level=ERROR)
// getter: us_max()S
public final val us_max: kotlin/UShort
public final get