Commit Graph

21 Commits

Author SHA1 Message Date
Denis.Zharkov 302eacbf59 Support new form of definitely non-nullable types: T & Any
^KT-26245 In Progress
2021-08-31 15:41:11 +03:00
Ilmir Usmanov 1f8dd45c2b Remove experimental coroutines support. Part 2 2021-08-30 14:21:57 +03:00
Denis.Zharkov 37813d9d82 Add version requirements for declarations with !! types
^KT-26245 Related
2021-04-09 13:06:40 +03:00
Mikhael Bogdanov 989fea3399 Remove version requirements for -Xjvm-default=enable (1.2.40) and JvmFieldInInterface(1.2.70) 2021-03-01 16:20:20 +01:00
Ilmir Usmanov 2cd9016016 IC mangling: Replace compiler hack with configuration flag 2020-11-19 17:39:30 +01:00
Dmitry Petrov 202bbdf8dd Forward compatibility hacks for Result.{success, failure}
Don't mangled functions annotated with @JvmName.
Annotate 'Result.success' and 'Result.failure' with @JvmName and
@Suppress("INAPPLICABLE_JVM_NAME").
NB this would require bootstrap.
2020-06-04 12:16:27 +03:00
Dmitry Petrov 5db6a0b563 New mangling rules require language version 1.4 (not compiler version)
Follow-up to a270ee094c
2020-05-29 15:15:54 +03:00
Dmitry Petrov 94509bdb4e 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').
2020-05-29 00:53:00 +03:00
Mikhail Bogdanov 7bcbae9826 Fix requirements 2020-04-09 07:37:31 +02:00
Ilya Gorbunov 3bd3d61469 Test experimental coroutines version requirement on JVM only
Modify 'suspendFun' and 'nestedClassMembers' tests so that pre-release
suspend functions are tested only on JVM, where they are still supported.
2020-01-29 09:12:42 +03:00
Alexander Udalov b970a57adb Generate version requirement on inline functions since API version 1.4
The old compiler will crash if it tries to inline a function that's
passing a lambda parameter into the new parameter null check method
`Intrinsics.checkNotNullParameter` because that usage is not considered as
inlinable by the old compiler (it only knows about
`Intrinsics.checkParameterIsNotNull`). Therefore we require that these
functions can only be read by compilers of version 1.3.50 or greater.

 #KT-22275 Fixed
2019-08-12 16:09:23 +02:00
Mikhail Zarechenskiy 09cd038e4b Fix test about version requirement
We began to write version requirement on declarations with `Result` and
 now (after bootstrap) we are getting error in this test because of that
 version requirement.

 see 908be10bf4
2018-09-20 17:58:56 +03:00
Mikhail Zarechenskiy 908be10bf4 Write version requirement on inline classes and relevant declarations
#KT-26720 Fixed
2018-09-11 17:13:44 +03:00
Alexander Udalov 1e9694f1db Fix version requirement serialization for nested classes
Use the version requierement table of the outer DescriptorSerializer
instance when serializing metadata for a class. Pass parent serializer
to DescriptorSerializer.create to make sure the correct table is used.
Serialize nested classes before the outer class in JS and common code,
to make sure requirements are not lost. Also, split
VersionRequirementTest to JVM and JS

 #KT-25120 In Progress
2018-07-18 17:58:46 +02:00
Mikhael Bogdanov e00b7a993f Write version requirements for @JvmField in interface companion 2018-07-16 16:13:18 +02:00
Mikhael Bogdanov 4aec9499b5 Add @RequireKotlin(1.2.40) on interface with @JvmDefaults and its subinterfaces 2018-04-04 16:17:38 +02:00
Alexander Udalov 00c846a160 Write patch version for VersionRequirement correctly 2017-10-10 13:21:50 +02:00
Alexander Udalov 6f2e6db131 Check the RequireKotlin annotation value
Similarly to SinceKotlin
2017-10-10 13:21:50 +02:00
Alexander Udalov a96861c353 Support version kind for RequireKotlin
#KT-20584 Fixed
2017-10-10 13:21:49 +02:00
Alexander Udalov 4532f7556c Introduce internal RequireKotlin annotation 2017-10-10 13:19:18 +02:00
Alexander Udalov 8962911503 Rename SinceKotlinInfo -> VersionRequirement 2017-10-10 13:19:18 +02:00