Commit Graph

215 Commits

Author SHA1 Message Date
dnpetrov 50ea67ba13 KT-5524 Support [platformName] annotation for class members
@platformName is now supported for final non-overriding class member functions
(including property accessors).
Front-end provides diagnostics for inapplicable annotation cases.
Code generation updated:
- ignore kotlin.platform.platformName annotation for Java class methods;
- bridges generation generates proper JVM declarations in case of methods renamed with @platformName.
@platformName-related tests added.

#KT-5524 Fixed
2015-06-04 17:54:08 +03:00
Alexander Udalov 596d378962 Fix abstract method error: implement arity in function references 2015-06-01 19:23:09 +03:00
Alexander Udalov 28addcf8e7 Do not generate annotations of method parameters on its $default synthetic method
#KT-7892 Fixed
2015-06-01 19:23:08 +03:00
Dmitry Jemerov 1188e57597 rename @overloads annotation to @jvmOverloads 2015-05-27 12:23:08 +02:00
Alexander Udalov 6ae7ed1cc4 Add some new tests on functions and extension functions 2015-05-27 01:44:19 +03:00
Alexander Udalov 49004a8b8e Conform functions to extension functions and vice versa
#KT-5989 Fixed
2015-05-26 15:04:56 +03:00
Denis Zharkov e98b9ea84e Save annotations of lambda on SAM's method
Also add tests checking that annotations on 'invoke' methods of common lambdas are saved properly

 #KT-6932 Fixed
2015-05-20 09:24:57 +03:00
Denis Zharkov fd4946e552 Annotate $default-method with same annotations as original
#KT-6930 Fixed
2015-05-20 09:24:57 +03:00
Michael Bogdanov 58183731f5 Test for obsolete KT-5448: VerifyError with mismatched stack types
#KT-5448 Obsolete
2015-05-18 15:28:58 +03:00
Dmitry Jemerov 4bdf598bfe compiler testdata: s/trait/interface 2015-05-12 19:43:17 +02:00
Denis Zharkov 44a55e5bf6 Adjust testData to new labels syntax 2015-04-29 14:03:11 +03:00
Alexander Udalov 0dec1eaaad Refactor RuntimeTypeMapper, extract IntrinsicObjects-related behavior
Make it similar to other JavaToKotlinClassMapBuilder implementations to be able
to get rid of that inheritance
2015-04-24 02:09:04 +03:00
Alexander Udalov 07c2442405 Make $default methods non-private, avoid generating accessors for them
#KT-5786 Fixed
2015-04-23 22:09:02 +03:00
Michael Bogdanov 48aef1eb28 Fix for KT-6895: Compile error on Android (EXCEPTION FROM SIMULATION) when declaring locals in an inline function
#KT-6895 Fixed
2015-04-17 14:24:35 +03:00
Denis Zharkov cc17f7d82d JVM: Support using KClass as annotation parameter type 2015-04-16 10:40:19 +03:00
Dmitry Jemerov 9434e4bee9 mark wrapper methods that pass default values of parameters as synthetic
#KT-7314 Fixed
2015-04-13 15:26:20 +02:00
Michael Bogdanov a24d845bd0 Test for KT-7009: VerifyError: Bad type on operand stack in daload
#KT-7009 Obsolete
2015-04-10 08:59:27 +03:00
Michael Bogdanov 824d1ac556 Fix for KT-7306: Implicit array conversions cause ClassCastException at runtime
#KT-7306 Fixed
2015-04-10 08:59:26 +03:00
Alexander Udalov 6182b3ff5c Prohibit Array::class, require type arguments for reified parameters 2015-04-09 19:46:47 +03:00
Michael Bogdanov 20653090d3 Test for KT-7338: Incorrect code is emitted for is-checks with array types, resulting in java.lang.VerifyError
#KT-7338 Obsolete
2015-04-09 11:10:33 +03:00
Michael Bogdanov c582b1d9ce Generate linenumber if needed after inlining 2015-04-09 09:25:26 +03:00
Alexander Udalov 87ef4ff7c5 Fix KClassImpl#toString to render Kotlin FQ name, not JVM one 2015-04-07 20:25:06 +03:00
Alexander Udalov 715641fb0d Call getMethod/getDeclaredMethod depending on visibility 2015-04-07 20:20:40 +03:00
Alexander Udalov 0202217135 Fix JVM signatures involving multi-dimensional array types
Apparently ASM's Type#getElementType returns the type of the array even if it's
multi-dimensional, so the loop was incorrect
2015-04-07 20:06:23 +03:00
Nikolay Krasko 2946c1d6a8 KT-7271 Accessing an extension property of Char.Companion leads to ClassNotFoundException in runtime
#KT-7271 Fixed
2015-04-07 15:59:05 +03:00
Stanislav Erokhin 3de0dff575 Migrate testdata to new lambda syntax 2015-04-07 13:08:53 +03:00
Stanislav Erokhin b152211096 Added init keyword to testdata 2015-04-07 13:08:51 +03:00
Ilya Gorbunov 70cc7fbf1f Remove never intentionally used String.hashCode extension. 2015-04-07 03:14:49 +03:00
Alexander Udalov 72aa3d1465 Use mock JDK in compiler tests where full JDK is not needed
- move some of boxWithStdlib tests under fullJdk/ directory, where they will be
  compiled against the full JDK
- introduce FULL_JDK in-text directive for the reflection test as only 4 tests
  out of 654 needed the full JDK
2015-04-02 21:57:48 +03:00
Dmitry Jemerov 39828bfd32 Implement kotlin.jvm.overloads annotation for generating all overloads of a method that has default parameter values.
#KT-2095 Fixed

fix backend-side issues with kotlin.jvm.overloads: support the annotation on constructors, generate nullablity annotations on parameters, generate generic signatures, add various tests
2015-04-02 20:30:26 +02:00
Dmitry Jemerov e15b984232 Implement kotlin.jvm.overloads annotation for generating all overloads of a method that has default parameter values.
#KT-2095 Fixed
2015-04-02 20:30:01 +02:00
Dmitry Jemerov 389498eb91 Merge pull request #621 from JetBrains/rr/yole/kt4142
Regression tests for some more obsolete issues in the JVM backend
2015-03-25 13:28:38 +01:00
Dmitry Jemerov 0467bba7a6 regression test for KT-5953 2015-03-24 21:05:23 +01:00
Dmitry Jemerov f6093274ab regression test for KT-5395 2015-03-24 20:59:56 +01:00
Dmitry Jemerov 9d229ad271 regression test for KT-4259 2015-03-24 20:49:53 +01:00
Dmitry Jemerov 4f0cf2f918 regression test for obsolete issue KT-4142 2015-03-24 19:14:18 +01:00
Dmitry Jemerov 2767e789fb when generating coercion, take into account the original type of the expression 2015-03-24 18:01:56 +01:00
Alexander Udalov 7e69a5ac9a Don't create KProperty instance for synthetic field
#KT-5759 Fixed
2015-03-23 16:30:26 +03:00
Alexander Udalov 9cf0720925 Fix KClass.simpleName for local classes 2015-03-23 16:30:24 +03:00
Alexander Udalov a4f9fe1eaa Filter out invisible fakes in KClass.properties
A user will rarely need those at the moment, and there's currently no other way
to let him filter out them by himself
2015-03-17 23:39:13 +03:00
Alexander Udalov d3abd54b06 Add 'val KClass.declaredProperties', make getProperties a property 2015-03-17 23:39:13 +03:00
Pavel V. Talanov 06916d98c6 default -> companion: replace all mentions of default and default object 2015-03-17 15:47:39 +03:00
Michael Bogdanov 11ce50f0d6 Tests for obsolete KT-6434: android compile error: local variable type mismatch
#KT-6434 Obsolete
2015-03-17 11:39:28 +03:00
Alexander Udalov 8af6ca5279 Delete kotlin.jvm.internal.KObject
It was supposed to be used in reflection but the benefits do not outweigh the
cost of KT-6951

 #KT-3223 Fixed
 #KT-6951 Fixed
2015-03-12 23:15:38 +03:00
Stanislav Erokhin a89b48c577 Backend support for function expression 2015-03-12 17:11:46 +03:00
Denis Zharkov f07566d30d Add warning for initializers with obsolete syntax
Expected 'init' keyword before class initializer
2015-03-11 17:45:26 +03:00
Alexander Udalov dc4dfbeec1 Fix generic class literals, substitute type parameters with stars 2015-03-11 16:42:47 +03:00
Alexander Udalov 6468515d99 Report error when LHS of class literal is not a class 2015-03-11 16:42:45 +03:00
Alexander Udalov b93b9bd565 Support KClass.simpleName and built-in class literals 2015-03-11 16:42:43 +03:00
Alexander Udalov 6e45c6f17c Support class literals (A::class) 2015-03-11 16:42:41 +03:00