Evgeny Gerashchenko
0ddfedba49
Allowed accessing private members from same package, but different package fragment instance.
2015-06-11 18:58:32 +03:00
Alexander Udalov
5394abc83e
Don't use reflection in JetType.getCapability
2015-06-10 14:41:56 +03:00
Valentin Kipyatkov
657abffea2
Minor code improvement
2015-06-10 11:34:59 +03:00
Valentin Kipyatkov
ef550e1f21
Reduced number of constant renderers in DescriptorRenderer
2015-06-10 11:34:59 +03:00
Valentin Kipyatkov
4263c47f4d
DescriptorRenderer: moved enums out
2015-06-10 11:34:59 +03:00
Valentin Kipyatkov
fcf613cf03
Replacing usages of DescriptorRenderer.renderName/renderFqName
2015-06-10 11:34:59 +03:00
Valentin Kipyatkov
acdf6b2821
Minor
2015-06-10 11:34:59 +03:00
Valentin Kipyatkov
c661e2fbe2
DescriptorRenderer uses FqName.render(), not the opposite
2015-06-10 11:34:59 +03:00
Valentin Kipyatkov
2d5611d916
DescriptorRenderer uses Name.render(), not the opposite
2015-06-10 11:34:58 +03:00
Valentin Kipyatkov
0766e685b1
Minor code improvements
2015-06-10 11:34:58 +03:00
Valentin Kipyatkov
55b898167b
DescriptorRendererImpl made internal + minor improvements
2015-06-10 11:34:58 +03:00
Valentin Kipyatkov
2601e0ccd4
Fixed non-equivalent conversion from Java
2015-06-10 11:34:58 +03:00
Valentin Kipyatkov
a1ff2f20ed
Got rid of DescriptorRendererBuilder providing new scheme for creating DescriptorRenderer's
2015-06-10 11:34:58 +03:00
Valentin Kipyatkov
ce2ce44d7b
Converted DescriptorRenderer, DescriptorRendererImpl and DescriptorRedererBuilder to Kotlin
2015-06-10 11:34:58 +03:00
Pavel V. Talanov
7585cbfe22
Remove check in visibilities that allowed access to privates of outer packages
...
It doesn't work for a while now in imports and is planned to be dropped with upcoming changes to private
2015-06-08 20:25:52 +03:00
Dmitry Jemerov
220403b6f6
avoid unnecessary creation of empty containers
2015-06-08 15:10:40 +02:00
Alexander Udalov
6e97f85863
Fix type argument substitution bug in KFunction construction
...
For example,
KMemberFunction2<T, P1, P2, R> : KMemberFunction<T, R>
So for this inheritance the heuristic that was present ("take the last K type
parameters of the subclass, and substitute for K parameters of the superclass")
was wrong. The new heuristic for this case is: take type parameters with the
same names.
Also don't store "parameters" in a lazy value, since it's easy to compute and
it's computed practically every time anyway
2015-06-04 23:08:21 +03:00
Alexander Udalov
b474fa9278
Refactor fictitious function class kinds, reuse in J<->K map
2015-06-04 23:08:21 +03:00
Denis Zharkov
0e718fbaab
Introduce UNKNOWN visibility as default in FunctionDescriptor
...
It's needed to prevent NPE when requesting non-nullable visibility of descriptor
before `initialize` has been called.
Currently it happens because of indirect calls of `DescriptorUtils.isLocal`
between descriptor creation and it's initialization.
2015-06-04 16:11:02 +03:00
Denis Zharkov
4f85afb3f0
Fix DescriptorUtils.isLocal semantics
...
Non-member descriptors, e.g. type parameters, value parameters that defined in local function should be local too
Otherwise a lot of exceptions happens when resolving references within anonymous objects
2015-06-04 16:11:02 +03:00
Alexander Udalov
e38bc864d1
Fix heavy integer parsing in FunctionN class factory
...
#KT-7924 Fixed
2015-06-03 15:37:49 +03:00
Alexander Udalov
6c8f2be1d8
Revert "Fix heavy integer parsing in FunctionN class factory"
...
This reverts commit 9d493d995e .
2015-06-03 15:32:47 +03:00
Alexander Udalov
9d493d995e
Fix heavy integer parsing in FunctionN class factory
...
#KT-7924 Fixed
2015-06-03 15:14:23 +03:00
Dmitry Jemerov
758b94d3a6
get rid of JetScopeSelectorUtil, inline its contents into Kotlin code
2015-06-03 12:03:15 +02:00
Dmitry Jemerov
9672264442
avoid unnecessary and expensive creation of FqName instances
2015-06-02 16:36:03 +02:00
Alexander Udalov
158b3ba102
Make parameter names of fictitious function classes non-stable
...
To be able to change them when overriding invoke in subclasses without a
warning
2015-06-02 17:30:58 +03:00
Denis Zharkov
70dbbd8fda
Resolve constructors declared in traits and objects
...
It prevents exceptions and produces less red code
#EA-68667 Fixed
2015-06-02 14:07:49 +03:00
Dmitry Jemerov
22168aa026
optimize DescriptorUtils.getContainingModuleOrNull() by removing duplicate parent traversal and Class.isInstance() checks
2015-06-02 11:55:16 +02:00
Valentin Kipyatkov
d74ac4d08a
Override/implement members dialog: no qualified type names in signatures but qualified owner class names (+ moved a method)
2015-06-01 18:23:34 +03:00
Valentin Kipyatkov
a6f76bbf76
Fixed keywords after 'this@' completion + fixed implementation of JetExpressionWithLabel.getLabelName()
2015-05-27 16:15:46 +03:00
Alexander Udalov
48b18f18d3
Restore explicit imports of Kotlin function types in Java
...
This is a follow-up to 738a84e259 and
d4965a4f3e . Optimize imports in all files
affected in those commits, drop temporary _.kt
2015-05-26 18:46:27 +03:00
Svetlana Isakova
14c2690447
Distinguish between no declared arguments and an empty argument list
...
in a function literal
If there are no arguments, any number of them might be expected
2015-05-26 15:05:03 +03:00
Svetlana Isakova
d9568ef88c
Added special type constructor for function/ extension function
...
that stores an information about declared argument types
2015-05-26 15:05:02 +03:00
Alexander Udalov
7f0b5029eb
Refactor KotlinBuiltIns#isFunctionType/isExtensionFunctionType
2015-05-26 15:04:58 +03:00
Alexander Udalov
49004a8b8e
Conform functions to extension functions and vice versa
...
#KT-5989 Fixed
2015-05-26 15:04:56 +03:00
Alexander Udalov
4141e0a8df
Introduce fictitious numbered Function class descriptors
2015-05-26 15:04:54 +03:00
Alexander Udalov
135ee92966
Minor, don't pass constants as parameters
2015-05-26 15:04:52 +03:00
Alexander Udalov
738a84e259
Temporary hack to migrate functions to package kotlin.jvm.functions
...
Add a file in package 'kotlin.jvm.functions' to the project and replace
explicit imports of functions 'kotlin.Function{n}' to two imports 'kotlin.*'
and 'kotlin.jvm.functions.*', so that the codebase can be compiled both by the
old and by the new compiler
2015-05-26 15:04:34 +03:00
Alexander Udalov
45c28abfee
Keep built-in metadata for reflection interfaces
...
Reflection interfaces (interfaces in kotlin.reflect.* in core/builtins/) are
now fully considered as built-ins and can be accessed via KotlinBuiltIns. This
increases runtime size by ~20kb, but only because KotlinBuiltIns is static and
is therefore constructed only via resource loading from the compiler classpath
at the moment. As soon as it's possible to inject KotlinBuiltIns to the
particular resolution process, the metadata on JVM will be loaded via standard
annotation mechanism (kotlin.jvm.internal.KotlinClass/KotlinPackage) and wasted
runtime space will be reclaimed
2015-05-26 14:27:38 +03:00
Pavel V. Talanov
e4c242e66b
Remove direct usages of ModuleDescriptor#getPackageFragmentProvider()
2015-05-25 13:00:16 +03:00
Pavel V. Talanov
23dabf595a
J2k for PackageViewDescriptorImpl: prettify
2015-05-25 13:00:15 +03:00
Pavel V. Talanov
3bca284e1b
J2k for PackageViewDescriptorImpl: autoconvert
2015-05-25 13:00:15 +03:00
Pavel V. Talanov
5ff4765e3d
J2k for PackageViewDescriptorImpl: rename file
2015-05-25 13:00:14 +03:00
Pavel V. Talanov
cfdb1f4ec3
Refactor creation of ModuleDescriptor
...
Add storageManager to ModuleDescriptorImpl (to be used later)
Extract ModuleParameters to hold default imports and platform class map
Introduce MutableModuleContext to simplify module creation code
2015-05-20 19:45:50 +03:00
Denis Zharkov
5297b4974f
Adjust descriptor renderer to latest parsing changes
...
- `constructor` keyword expected in primary constructor with non-empty modifier list
- annotation list should be preceeded by '@'
2015-05-20 09:24:56 +03:00
Andrey Breslav
f7a9cc6b28
Fix for EA-64905 - assert: TypeUtils.intersect
2015-05-19 17:15:02 +03:00
Mikhail Glukhikh
fdf0ea5546
Enum warnings fixed: deprecated delimiters, short super constructors, both in project and in libraries
2015-05-18 16:08:16 +03:00
Valentin Kipyatkov
09f478fc0f
Fixed duplication of some generic functions in code completion
2015-05-16 17:15:08 +03:00
Valentin Kipyatkov
ce3492f270
KT-6393 Smart completion of anonymous object inserts type with "!" for type parameter
...
#KT-6393 Fixed
2015-05-16 17:09:51 +03:00
Ilya Gorbunov
1fc5c39c22
Remove overload of joinToString with 5 parameters and it's usage from java code.
2015-05-15 03:02:48 +03:00