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
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
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
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
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
Pavel V. Talanov
581e163031
Report warning on 'class object'
2015-03-10 18:21:32 +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
Alexander Udalov
ca8831097f
Resolve annotations on Java constructors
...
Also add tests on custom annotations on fields and methods
2015-03-07 02:32:14 +03:00
Andrey Breslav
d466533ef2
Missing test added
2015-03-06 21:59:03 +03:00
Dmitry Jemerov
46dbf005df
update testdata for the newly appeared Double.mod(Char) method
2015-03-06 18:02:13 +01:00
Pavel V. Talanov
5540f09751
Report default object specific diagnostics on 'default' modifier
2015-03-06 19:37:02 +03:00
Pavel V. Talanov
012d25dbca
Add test for soon to be deprecated 'class object' syntax
2015-03-06 19:37:00 +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
28ed30bcb3
change KDoc parsing so that space after parameter/section name is not included in tag content; support @property tag in KDocFinder
2015-03-06 16:13:11 +01:00
Alexey Sedunov
2684ce20d4
Parser: Do not produce qualified expressions without receiver in package directives. Add assertion on JetQualifiedExpression
...
#KT-6907 Fixed
2015-03-06 14:37:22 +03:00
Evgeny Gerashchenko
14b16ff87c
KT-6916 Slow bytecode for downTo iteration like for (i in max downTo min)
...
#KT-6916 fixed
2015-03-06 13:43:02 +03:00
Pavel V. Talanov
913724f0e9
Allow default object to be denoted with 'default' modifier
...
Report 'default' modifier in illegal positions
2015-03-06 12:41:50 +03:00
Pavel V. Talanov
2b51e4f2d4
Add 'default' keyword
...
Parser: allow objects that are marked as default to have no name
2015-03-06 12:41:38 +03:00
Pavel V. Talanov
0ca2f3f336
Minor: prevent rare case when soft keyword was parsed as enum entry
2015-03-06 12:41:34 +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
b4eb3e0f43
add test for visibility of setter for delegated property (KT-5957)
2015-03-05 19:04:18 +03:00
Dmitry Jemerov
e9266481c5
allow delegated properties to have getters and setters without bodies
2015-03-05 19:04:17 +03:00
Evgeny Gerashchenko
af7eba64f7
Disallow PropertyMetadataImpl in conventions for delegated properties
2015-03-05 18:42:17 +03:00
Evgeny Gerashchenko
056daeaadb
Don't mark parameters of get/set/propertyDelegated functions as unused.
...
#KT-5974 fixed
2015-03-05 18:42:16 +03:00
Dmitry Jemerov
48b0afd84d
correctly generate safe casts from Unit type
...
#KT-4494 fixed
2015-03-05 11:59:23 +01: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
Dmitry Jemerov
1188be9070
generate correct bytecode for constructors using infix call syntax
...
#KT-4589 Fixed
2015-03-05 11:26:27 +01:00
Pavel V. Talanov
afe8773e41
Minor: rename OVERRIDE_CANNOT_BE_STATIC and improve message
2015-03-05 13:06:00 +03:00
Nikolay Krasko
518c35fae1
Intrinsic default objects implementation: old test data modification
2015-03-05 01:30:39 +03:00
Nikolay Krasko
30a50746b5
Intrinsic default objects implementation: tests
2015-03-05 01:30:38 +03:00
Dmitry Jemerov
e60aafb18a
regression test for KT-3421
2015-03-04 17:43:38 +01:00
Dmitry Jemerov
46e0fdc067
regression test for KT-3442
2015-03-04 17:41:27 +01:00
Dmitry Jemerov
7522eb4032
regression test for KT-3903
2015-03-04 17:32:40 +01:00
Dmitry Jemerov
18e54322b8
regression test for KT-4281
2015-03-04 17:27:55 +01:00
Dmitry Jemerov
a2e22c6d20
regression test for KT-3107
2015-03-04 17:24:58 +01:00
Pavel V. Talanov
48fbce9582
Refactor: process mentions of class object
...
Rename usages that refer to "default object" concept now
Test data file names are left as is
2015-03-03 20:57:08 +03:00
Pavel V. Talanov
989f07962b
Write to trace in case class qualifier is a short reference to default object
...
This allows to fix some cases when there is a difference between explicit and short reference to default object
Fix shorten reference, optimize imports and import insert helper for default objects
ShortenReferences always transforms default object references to shorter form for now
Fix DescriptorUtils#getFqName() for default objects (affects test data mostly)
Fix DescriptorUtils#getImportableDescriptor()
2015-03-03 13:04:30 +03:00
Pavel V. Talanov
ffabe19229
Prohibit accessing nested classes/objects of class object using class literal
...
The fqname of class should be clear from code
Example: can't shorten A.Default.B.Default.C to A.B.C
Also fixes problem when nested class of enum class could be accessed via enum entry
2015-03-03 13:04:29 +03:00
Pavel V. Talanov
cceb5738c8
Can't omit default object name in imports and types
...
There should be only one way to denote a type (A.Default.B can't be denoted as A.B)
2015-03-03 13:04:28 +03:00
Pavel V. Talanov
88c5379424
Change importing rules for objects:
...
Allow importing classes from object, prohibit import-on-demand from objects
It's unclear what import-on-demand from object should mean so we prohibit it for now
2015-03-03 13:04:27 +03:00
Alexander Udalov
2c0830b017
Change synthetic accessor method names to "access$..."
...
As per discussion in https://youtrack.jetbrains.com/issue/KT-6870
2015-02-27 20:30:51 +03:00
Andrey Breslav
4c84b19b33
KT-5488 Invalid ambiguity between plus and plusAssign
...
#KT-5488 Fixed
2015-02-27 19:32:58 +03:00
Stanislav Erokhin
602689892e
Wrong diagnostic when last expression in lambda contains assignment operation
...
#KT-6769 Fixed
2015-02-27 14:16:20 +03:00
Yan Zhulanow
6ab2dc90f8
Fix cli help tests
2015-02-26 15:25:54 +03:00