Commit Graph

154 Commits

Author SHA1 Message Date
Michael Bogdanov
15eaa15b65 Fix for KT-7421: Unable to inherit from inner class
Fix for KT-6708: Compiler Error when extending open inner class: "java.lang.RuntimeException: Error generating primary constructor of class InnerB with kind IMPLEMENTATION"

  #KT-7421 Fixed
  #KT-6708 Fixed
2015-11-03 10:14:57 +03:00
Michael Bogdanov
9e5af43ce1 Fix for KT-9788: AssertionError from back-end when we read field from inline function
#KT-9788 Fixed
2015-10-30 09:39:08 +03:00
Denis Zharkov
9b29181878 Minor. Add Kotlin overrides to test
#KT-6733 Obsolete
2015-10-29 21:05:52 +03:00
Denis Zharkov
5755af6b27 Remove wrong condition part: there could be irrelevant overrides from Kotlin 2015-10-29 21:05:52 +03:00
Denis Zharkov
94803ce1c4 Collect overrides of special builtin members in super types
#KT-9695 Fixed
2015-10-29 21:05:26 +03:00
Michael Bogdanov
f3e6fab68e Fix for KT-4250: IllegalAccessError when using protected java member from lambda function
#KT-4250 Fixed
2015-10-28 11:57:21 +03:00
Alexander Udalov
ae4c7b5a61 Minor, rename codegen tests on platformName and platformStatic 2015-10-23 19:03:49 +03:00
Michael Bogdanov
18f3eb87e4 INSTANCE field deprecated in companion object
Fix for KT-9692: Deadlock between <clinit> of a class (KtSimpleNameExpressionImpl) and <clinit> of its companion object

 #KT-9692 Fixed
2015-10-23 17:39:27 +03:00
Denis Zharkov
8db206e7ff Take into account irrelevant implementation of special builtins 2015-10-21 17:51:43 +03:00
Denis Zharkov
d674aa1427 Refine signature mapping for special overrrides from Java
They have special JVM descriptor only when they are not inherited from
Kotlin super class
2015-10-21 17:51:43 +03:00
Dmitry Jemerov
49033e0002 rename Jet* classes to Kt* 2015-10-19 21:35:30 +02:00
Dmitry Petrov
3502c393fc Drop package facades: JVM BE tests passed. 2015-10-19 16:03:16 +03:00
Michael Bogdanov
3452fc8d02 Don't initialize const properties in constructor
#KT-9532 Fixed
2015-10-17 15:31:57 +03:00
Yan Zhulanow
9ae3b0fa9c Drop loading Java annotation methods as functions 2015-10-16 22:13:34 +03:00
Denis Zharkov
155bbd40ae Do not generate not-null assertion for argument of Collection.contains
Of course not only for contains but for other methods having INSTANCEOF bar.rier
Otherwise using platform null values becomes for such methods becomes
dangerous in cases like `platformString in setOf("", "")`
2015-10-16 18:16:02 +03:00
Mikhail Glukhikh
d4a1a469b7 Number rename: xxxValue() --> toXxx(), test 2015-10-14 20:40:21 +03:00
Mikhail Glukhikh
78cfeb0d7d Stdlib rename: List.indexOf(T), List.lastIndexOf(T), MutableCollection.removeAll(Collection<T>), MutableCollection.retainAll(Collection<T>) 2015-10-14 20:40:09 +03:00
Denis Zharkov
6322198a11 Revert 'isEmpty' transformation 2015-10-14 20:40:01 +03:00
Denis Zharkov
f0e3fd617d Adjust testData to CharSequence.length transformation 2015-10-14 20:39:35 +03:00
Denis Zharkov
1305d9755a Transform CharSequence.length to property 2015-10-14 20:39:29 +03:00
Michael Bogdanov
27a1a17c09 Deprecate non-const properties copies in interface 2015-10-13 14:15:47 +03:00
Michael Bogdanov
22142ee44d Initial support of JvmField annotation 2015-10-13 10:50:09 +03:00
Pavel V. Talanov
6cf9bfdb70 publicField -> JvmField
Effectively drop publicField and introduce JvmField (which has the same effect for now)
Implement frontend checks for @JvmField
Replace publicField -> JvmField in test data
2015-10-13 10:50:08 +03:00
Denis Zharkov
a76a8fcc3f Adjust various testData to remove/charAt transformation 2015-10-11 19:59:31 +03:00
Denis Zharkov
89ded4ab1d Implement hack to support both remove() and removeAt() in MutableList<Int>
Also add couple of tests about CharSequence.get
2015-10-11 19:57:22 +03:00
Denis Zharkov
97ed8c83a0 Adjust testData to isEmpty/key/value transformations 2015-10-10 12:29:15 +03:00
Denis Zharkov
ad68378836 Support loading methods from Java as common properties overrides 2015-10-10 12:29:14 +03:00
Michael Bogdanov
60d1736b97 Instance field generation in objects 2015-10-09 16:25:16 +03:00
Michael Bogdanov
12afbffb09 Copy to interface just companion object public const properties 2015-10-09 16:25:15 +03:00
Denis Zharkov
e9cd9db2a7 Adjust testData after contains transformation 2015-10-09 14:40:34 +03:00
Denis Zharkov
80da320c2c Customize JVM signature for Collection's members
- Do not write signature for `contains`
- Write signature for `containsAll` as it's declared like `containsAll(Collection<?>)`
2015-10-09 14:40:33 +03:00
Zalim Bashorov
ae2831338b Load Java static members from parents 2015-10-08 19:33:29 +03:00
Ilya Gorbunov
43a74e575e Fix testData/codegen: replace deprecated sort usages. 2015-10-07 22:36:43 +03:00
Michael Bogdanov
882f6113dc Initial internal member mangling 2015-10-07 18:10:54 +03:00
Denis Zharkov
6a1566a6dc Make JVM backend work with Collection.size as val
0. Such properties are called special because their accessor JVM name differs from usual one
1. When making call to such property, always choose special name
2. When generating Kotlin class inheriting such property generate `final bridge int size() { return this.getSize(); }`
3. If there is no `size` declaration in current class generate `bridge int getSize() { // super-call }`
2015-10-07 08:46:35 +03:00
Denis Zharkov
c21d827326 Adjust various testData to size transformation 2015-10-07 08:46:34 +03:00
Dmitry Petrov
9e546bda27 Support is/as/as? with Function[K]<...> types. 2015-10-06 10:06:27 +03:00
Denis Zharkov
fd0c92e307 Record inner class info for interface and DefaultImpls 2015-09-30 08:19:51 +03:00
Mikhail Glukhikh
103bb320c8 Do not generate non-function/getter/setter (expression) annotations on anonymous functions 2015-09-25 17:46:38 +03:00
Dmitry Petrov
3cd1c222f0 Generate delegates to multifile class members in package facade classes
(unless using -Xmultifile-package-facades option)
2015-09-23 17:41:13 +03:00
Dmitry Jemerov
4ca434da54 remove support for 'trait' keyword 2015-09-22 15:00:24 +02:00
Dmitry Petrov
7f4ae52517 Generate annotations for single-file classes. 2015-09-21 12:10:40 +03:00
Denis Zharkov
bae3320d52 Get rid of deprecated annotations in testData 2015-09-18 10:14:32 +03:00
Dmitry Petrov
2931e474e1 - InnerClasses & EnclosingMethod attributes for local classes
in multifile part members
- invocation of multifile part/facade members
(TODO: deserialized descriptor case)
- inlining of multifile part/facade members
(TODO: inline against binaries case)
2015-09-14 11:25:41 +03:00
Dmitry Petrov
8162272106 Cleanup
- do not use annotation resolve in CodegenFileClassProvider
- test using private methods across different parts of multifile class
2015-09-09 19:08:19 +03:00
Dmitry Petrov
e88584742e basic multifile class codegen tests 2015-09-09 19:08:18 +03:00
Dmitry Petrov
bc5e29df9f update tests: jvmName --> JvmName 2015-09-08 13:02:56 +03:00
Dmitry Petrov
2519641b2b JvmName annotation support, single-file facade case (just rename file facade class)
- initial implementation of JvmFileClassesProvider
- migrate some of PackagePartClassUtil usages to JvmFileClassesProvider (mostly in Codegen)
- placeholder ("no resolve") implementation for migration period and unclear cases
- tests
2015-09-08 13:02:56 +03:00
Mikhail Glukhikh
8f7b29f80a Annotation rename: target --> @Target 2015-09-07 13:42:26 +03:00
Mikhail Glukhikh
eab288bdd7 annotation() now has no arguments. Syntax migration to Retention / Repeatable / MustBeDocumented combination
Deprecated test for annotation(params) completion deleted. A lot of tests changed.
2015-09-04 19:21:12 +03:00