Alexey Andreev
aa5d15cff7
KT-2752: minor fixes after code review
2016-10-08 19:25:43 +03:00
Alexander Udalov
73652f309f
Do not create synthesized equals/hashCode/toString in data classes in compatibility mode
...
To simplify migration from 1.0 to 1.1, do not allow data classes to
automatically implement abstract equals/hashCode/toString declared in
super-interfaces (KT-11306) if "-language-version 1.0" is specified
2016-10-04 10:24:41 +03:00
Denis Zharkov
bb1b8cca20
Fix AssertionError in CodegenUtil.getDelegates
...
Change getAllOverriddenDescriptors contracti, now it returns
original (not substituted) descriptors without any duplicates.
First of all it's necessary in CodegenUtil.getDelegates to avoid
duplicates (see assertion there), but also it's convenient for all
other usages of this method
#KT-8154 Fixed
2016-09-28 11:40:35 +03:00
Denis Zharkov
49fee026fc
Minor. Simplify CodegenUtil.getDelegates
2016-09-28 11:40:20 +03:00
Denis Zharkov
217f033552
Prevent generation of delegations to interfaces private methods
...
#KT-13381 Fixed
#KT-13996 Fixed
2016-09-23 14:51:14 +03:00
Alexander Udalov
fea116f14e
Allow data classes to implement equals/hashCode/toString from base classes
...
#KT-11306 Fixed
2016-09-15 16:45:48 +03:00
Michael Bogdanov
69dc18b8b4
Proper concrete implementation filtering in java 8 interface case
2016-09-12 12:59:31 +03:00
Michael Bogdanov
4b0c272e19
'toString' implementation in DescriptorBasedFunctionHandle
2016-09-12 12:59:31 +03:00
Alexander Udalov
d945c33d5e
Move some members from OverrideResolver to OverridingUtil
2016-07-25 15:55:31 +03:00
Denis Zharkov
2d42ba23b3
Minor. Replace TraitImpl -> DefaultImpls, Trait -> Interface
...
There are still a lot of trait word entries in the source code,
only some of them got replaced here
2016-07-12 16:27:48 +03:00
Mikhael Bogdanov
bb59638039
Support bridges in interfaces. Fix for KT-12416: Missed bridges in js backend
...
#KT-12416 Fixed
2016-06-15 13:43:28 +03:00
Stanislav Erokhin
a6da15f8e2
Minor. remove several methods from TypeUtils
2016-06-09 12:58:02 +03:00
Alexander Udalov
1c8272d3f1
Simplify data class function generation and signature lookup code
...
- change prerequisites for generating equals/hashCode/toString in a data class:
previously they were generated if the corresponding method is trivial (i.e.
it comes from kotlin.Any), now we're generating it always unless it'll cause
a JVM signature clash error (see KT-6206)
- use static KotlinBuiltIns.isXxx methods to compare types instead of checking
against descriptors loaded from certain built-ins instance, this is quicker
and more correct in environments where several built-ins are possible
- don't use isOrOverridesSynthesized, it's not relevant for
equals/hashCode/toString because functions with these names are never
synthesized
#KT-6206 Fixed
2016-05-20 00:54:19 +03:00
Alexander Udalov
c1c2651988
J2K backend-common classes: convert
...
Also merge CodegenUtilKt into CodegenUtil
2016-05-20 00:36:56 +03:00
Alexander Udalov
27ed0dd25f
J2K backend-common classes: rename .java -> .kt
2016-05-20 00:36:56 +03:00
Mikhail Glukhikh
733f3e8025
Code cleanup: type parameters can have in / out variance
2016-05-13 17:57:02 +03:00
Valentin Kipyatkov
b551886889
Code cleanup: removed redundant semicolons
2016-04-29 11:26:25 +03:00
Denis Zharkov
78c9dffe00
Refine return type of MemberScope.getContributedFunctions
2016-03-16 20:22:58 +03:00
Alexander Udalov
1b8f934b54
Delete deprecated enum 'values' property
2016-02-19 22:28:44 +03:00
Dmitry Jemerov
117a0d8b7b
compiler: cleanup 'public', property access syntax
2016-01-07 17:57:38 +01:00
Ilya Gorbunov
80916d5ed7
Cleanup in compiler modules
2015-12-29 18:04:15 +03:00
Alexander Udalov
e67318e049
Minor, add DescriptorUtils.isClassOrEnumClass
2015-12-23 16:45:26 +03:00
Michael Bogdanov
7c7786f7d0
Generate private methods in TraitImpl as private, don't generate delegation to private trait methods
2015-12-12 11:41:36 +03:00
Dmitry Jemerov
009e3f9cd7
rename PSI classes according to current terminology:
...
KtMultiDeclaration(Entry) -> KtDestructuringDeclaration(Entry)
KtFunctionLiteralExpression -> KtLambdaExpression
KtFunctionLiteralArgument -> KtLambdaArgument
KtDelegationSpecifierList -> KtSuperTypeList
KtDelegationSpecifier -> KtSuperTypeListEntry
KtDelegatorToSuperClass -> KtSuperTypeEntry
KtDelegatorToSuperCall -> KtSuperTypeCallEntry
KtDelegationByExpressionSpecifier ->KtDelegatedSuperTypeEntry
2015-12-10 16:15:13 +01:00
Dmitry Petrov
84824b1024
Fix KT-10194: skip incorrect delegates.
2015-12-09 17:43:48 +03:00
Natalia Ukhorskaya
d0355a793b
Write lineNumbers for constructors
2015-11-30 12:25:51 +03:00
Michael Nedzelsky
c80c33efb6
add kjsm option for kotlin js command line compiler
2015-11-23 22:32:32 +03:00
Stanislav Erokhin
2c3f58eeb7
Renamed methods in MemberScope from getSmth to getContributedSmth
2015-11-05 14:34:00 +03:00
Stanislav Erokhin
0b5de434fa
Removed usages KtScope.getAllDescriptors
2015-11-04 12:41:34 +03:00
Dmitry Jemerov
d6a3870101
rename Kt to Kotlin in KtType, KtIcons
2015-10-20 16:23:31 +02:00
Dmitry Jemerov
49033e0002
rename Jet* classes to Kt*
2015-10-19 21:35:30 +02:00
Denis Zharkov
d8ede6d03e
Transform Enum.values to property
2015-10-17 17:46:16 +03:00
Dmitry Petrov
8cd624a58a
Drop package facades: code cleanup in Kotlin project.
2015-10-15 10:33:47 +03:00
Dmitry Petrov
7e9e427d4c
Java 8 rules for method overrides:
...
- report errors on implementing methods of Any in interfaces
- update testData
~~~
Java 8 override restrictions: interface can't implement a method of 'Any'
- update compiler sources
2015-10-12 14:12:31 +03:00
Ilya Gorbunov
37a0347669
Replace sort with sorted.
2015-10-07 22:36:16 +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
b2d4bdc802
Minor. Rename isTrait -> isInterface
2015-09-30 08:19:51 +03:00
Denis Zharkov
9c4564a5a6
Get rid of deprecated annotations and modifiers in project code
2015-09-18 09:34:27 +03:00
Alexander Udalov
a946f787bc
Fix exception from data class codegen for light classes
...
EA-66827
2015-09-15 13:11:16 +03:00
Michael Bogdanov
e83ec1017b
Reflection support
2015-09-07 16:28:51 +03:00
Nikolay Krasko
5325767c61
Minor: fix spelling
2015-09-03 13:40:08 +03:00
Zalim Bashorov
6c28dbd407
LookupLocation.NO_LOCATION_FROM_BACKEND -> NoLookupLocation.FROM_BACKEND
2015-08-18 12:34:19 +03:00
Zalim Bashorov
69e0f23db9
Classify Location.NO_LOCATION usages
2015-08-18 12:21:31 +03:00
Zalim Bashorov
0978e9f169
Minor: move LookupLocation to org.jetbrains.kotlin.incremental.components
2015-08-08 02:08:16 +03:00
Zalim Bashorov
2aa4c383cd
UsageLocation -> LookupLocation
2015-08-08 02:08:15 +03:00
Zalim Bashorov
41449c107e
Location.NOWHERE -> UsageLocation.NO_LOCATION
2015-07-21 22:27:25 +03:00
Zalim Bashorov
0f92036353
Add location parameter to JetScope::getFunctions
2015-07-21 22:27:25 +03:00
Dmitry Jemerov
7c2b2dcc6a
code cleanup: backend-common, cli modules
2015-07-21 16:20:11 +02:00
Svetlana Isakova
a714de783f
Converted CallResolverUtil to kotlin
2015-07-10 15:05:08 +03:00
Ilya Gorbunov
86f4a1b6e4
Compiler&plugin deprecations cleanup: replace streams with sequences.
2015-06-29 17:06:40 +03:00