Denis Zharkov
61ae694be4
Allow return statements in secondary constructors
2015-03-11 17:45:24 +03:00
Denis Zharkov
80e13d3f70
Allow class initializer without primary constructor
2015-03-11 17:45:23 +03:00
Denis Zharkov
87193aec2f
Minor, drop unused variable
2015-03-11 17:45:23 +03:00
Denis Zharkov
3509cafcea
Allow no super class initialization within header
...
if there is no primary constructor
2015-03-11 17:45:23 +03:00
Denis Zharkov
1555eec954
Secondary constructors delegation calls and body resolve
2015-03-11 17:45:23 +03:00
Denis Zharkov
b2cecf1dd0
Secondary constructors resolve
2015-03-11 17:45:23 +03:00
Denis Zharkov
8305d73682
Drop unused interface method
...
There was the only usage and it's redundant.
JetClass' implementation name is refined.
2015-03-11 17:45:22 +03:00
Denis Zharkov
3ba94d7352
Parsing: secondary constructors
2015-03-11 17:45:22 +03:00
Denis Zharkov
cb881d2628
Drop some ClassDescriptor.getConstructors() usages
...
supposing that there is only primary constructor
2015-03-11 17:45:22 +03:00
Denis Zharkov
bdd2756bd1
Rename ThisReference -> ConstructorDelegationReference
2015-03-11 17:45:22 +03:00
Denis Zharkov
a55e8911ea
Drop parsing of enum initializers using `this'
...
#KT-6626 Fixed
2015-03-11 17:45:22 +03:00
Andrey Breslav
0dc1448d69
Secondary constructors specs
2015-03-11 17:45:21 +03:00
Dmitry Jemerov
d3b8464722
fix test: regenerate Primitives.kt
2015-03-11 15:18:38 +01: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
2b089e0f39
Configure kotlin-reflect.jar in IDE as part of KotlinJavaRuntime library
2015-03-11 16:42:39 +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
fdfd808d80
Remove KForeignMemberProperty and KClassOrigin, use KMemberPropertyImpl instead
2015-03-11 16:42:36 +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
d1debf586c
Support local classes in reflection
2015-03-11 16:42:32 +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
ba0ea1515b
Minor, simplify/optimize KClassImpl creation
2015-03-11 16:42:30 +03:00
Alexander Udalov
ecde41d9ab
Introduce ReflectProperties for lazy weak/soft property delegates
...
This class needs to be written in Java because no Kotlin classes can be used in
KClassImpl constructor (otherwise since each Kotlin class creates a KClassImpl
in its static initializer, this would result in infinite recursion)
2015-03-11 16:42:29 +03:00
Alexander Udalov
2b090e02a1
Build kotlin-reflect.jar in build.xml and for Maven
...
Reflection will be distributed in a separate jar and not in kotlin-runtime.jar
for two primary reasons:
- Reflection implementation at the moment takes almost 2Mb
- Separate libraries for separate features is a technique encouraged by Maven,
and it's inconvenient to make it different in the compiler distribution
2015-03-11 16:42:28 +03:00
Alexander Udalov
2c8754a6af
Build lite runtime of protobuf-java
...
Saves ~400kb (3.25mb -> 2.85mb) of runtime+reflect size
2015-03-11 16:42:27 +03:00
Alexander Udalov
af6e7cf140
Minor, remove ReflectJavaTypeProvider, throw unsupported instead
...
getTypeProvider() is in fact a bad abstraction because it's only used in SAM
construction, which does not happen at runtime
2015-03-11 16:42:26 +03:00
Alexander Udalov
e95d22dcfe
Refactor ReflectJavaConstructor.getValueParameters()
...
See https://youtrack.jetbrains.com/issue/KT-6886 for more information
2015-03-11 16:42:25 +03:00
Alexander Udalov
1054f004aa
Load annotations on constructors and parameters of Kotlin reflected classes
2015-03-11 16:42:24 +03:00
Alexander Udalov
4fb420f3f1
Fix deserialization of enum annotation arguments at runtime
2015-03-11 16:42:23 +03:00
Alexander Udalov
f36ef6f546
Provide equals, hashCode, toString for classes in reflection model
2015-03-11 16:42:21 +03:00
Alexander Udalov
a14b301f31
Resolve annotations on all reflected elements
...
Annotation in NestedEnumArgument test is made public, because we try to load
annotation argument values eagerly and fail, since you can't invoke methods
reflectively on an object of a non-effectively-public class
2015-03-11 16:42:19 +03:00
Alexander Udalov
c90f11b7e6
Support Java symbols in runtime descriptor loading
2015-03-11 16:42:18 +03:00
Alexander Udalov
73e4287aee
Initial support of annotation loading at runtime
...
In order to locate an annotated entity, we need to implement almost the whole
Java element model (which will be used anyway for Java descriptor loading)
2015-03-11 16:42:17 +03:00
Alexander Udalov
356f54b5df
Initial support of descriptor loading at runtime
2015-03-11 16:42:15 +03:00
Yan Zhulanow
be954f2c27
Fix WrongIdFormat exception on Android XML widgets with non-@+id/ format
2015-03-11 15:33:45 +03:00
Dmitry Jemerov
07381b765f
rename Numbers.kt to Primitives.kt as it now contains Char which is not a number
2015-03-11 12:40:39 +01:00
Dmitry Jemerov
89398796c6
generate also the Char class
2015-03-11 12:40:31 +01:00
Dmitry Jemerov
26e452383e
reenable test which was temporarily disabled
2015-03-10 20:28:48 +01:00
Pavel V. Talanov
a701cb2bd9
Add quick fix to replace all 'class object's in project
2015-03-10 18:21:33 +03:00
Pavel V. Talanov
81f9d34d1a
Add quick fix for deprecated 'class object' syntax
2015-03-10 18:21:33 +03:00
Pavel V. Talanov
3cfcef9da4
Render warning on 'class object' as deprecated
2015-03-10 18:21:32 +03:00
Pavel V. Talanov
581e163031
Report warning on 'class object'
2015-03-10 18:21:32 +03:00
Pavel V. Talanov
8fef31ee5b
Replace 'class object' with 'default object' in builtins
2015-03-10 18:07:56 +03:00
Pavel V. Talanov
9a844d2feb
Minor: replace some missed mentions of 'class object' with 'default object'
2015-03-10 18:07:54 +03:00
Pavel V. Talanov
9ecf95532e
Replace 'class object' with default object in project code
2015-03-10 18:07:46 +03:00
Alexander Udalov
dc7bb32a3b
Refactor runtime library configuration in IDE
2015-03-10 16:15:20 +03:00