Commit Graph

206 Commits

Author SHA1 Message Date
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
Alexander Udalov
b3cdd818f0 Support member extension properties, implement KClass.getExtensionProperties()
#KT-6570 Fixed
2015-03-11 16:42:38 +03:00
Alexander Udalov
da209e673c Implement KClass.getProperties()
#KT-6570 In Progress
2015-03-11 16:42:37 +03:00
Alexander Udalov
ff0044f66a Use descriptors for reflection on extension properties 2015-03-11 16:42:34 +03:00
Alexander Udalov
1a618deeab Use descriptors for reflection on top level properties
This also allows to obtain a Field object from the package part (see
mapping.kt)
2015-03-11 16:42:33 +03:00
Alexander Udalov
64fdb18ad3 Use descriptors for reflection on class properties
- use ConcurrentHashMap as a cache of class loaders to module descriptors
- KClassImpl now has a lazy class descriptor and it manages property creation
  by looking (also lazily) for the property descriptor in the corresponding
  scope
- since deserialized descriptors have full information about where a JVM symbol
  is located and what signature it has, new tests will begin to pass where
  Kotlin model and Java reflection model differ, see classObjectVar.kt
2015-03-11 16:42:31 +03:00
Alexander Udalov
a8046020fb Rename kotlin.reflect.IllegalAccessException -> IllegalPropertyAccessException
The former name clashes with java.lang.IllegalAccessException and proved to be
inconvenient because it should always be qualified in the source.

Also use java.lang exception's message as kotlin.reflect exception's message
2015-03-07 02:32:15 +03:00
Pavel V. Talanov
59f192ef90 Replace 'class object' with 'default object' in renderers and test data
Includes changes to decompiled text
Old syntax is used in builtins and project code for now
2015-03-06 19:36:54 +03:00
Dmitry Jemerov
c029fa2ed0 add test for generating annotations on the setter of a delegated property; (KT-4169); properly generate backing field for delegated property with a setter 2015-03-05 19:04:18 +03:00
Dmitry Jemerov
2835459920 correctly generate 'in' expressions with IntRange on RHS and a type other than Int on LHS 2015-03-05 11:33:24 +01:00