Alexey Sedunov
5f87e84966
Override/Implement: Do not insert super-call into extension body
...
Such super-calls are not are supported yet
#KT-4311 Fixed
2018-06-19 12:22:39 +03:00
Alexey Sedunov
c49eede054
Generate hashCode()/equals(): Support deep array equality
...
#KT-19102 Fixed
2018-06-19 12:22:39 +03:00
Mikhail Glukhikh
9ef89447b3
Sealed sub-class -> object: handle equals, suggest "add equals"
...
Before this commit, sealed sub-class without state was considered
a style issue.
After this commit, sealed sub-class without state AND custom equals
is considered a probable bug,
because comparison of its instances is very fragile.
Alternative fix (generate equals & hashCode by identity) is added.
2018-06-19 11:20:26 +03:00
Dmitry Petrov
ecd2709a11
psi2ir: type arguments for function references
2018-06-19 11:13:50 +03:00
Mikhail Glukhikh
84c369dc6c
Highlighting settings provider: skip inspections on libraries *only*
...
This keeps inspection running e.g. in build.gradle.kts scripts
2018-06-19 10:42:37 +03:00
Mikhail Glukhikh
cbec005055
Add test for KT-21710 (gutters inside library sources)
2018-06-19 10:42:36 +03:00
Mikhail Glukhikh
1819878c2b
Switch off inspections on Kotlin files not in project source
...
To switch them off, KotlinDefaultHighlightingSettingsProvider
was introduced.
So #KT-19377 Fixed
2018-06-19 10:42:34 +03:00
Mikhail Glukhikh
ef0eb5cbe9
KotlinProblemHighlightFilter: *perform* highlighting on library sources
...
This commit reverts fixing commit for KT-19377
So #KT-21710 Fixed
So #KT-19377 Submitted
2018-06-19 10:42:33 +03:00
Mikhail Zarechenskiy
6431934c13
Fix signature mapping for built-in methods inside erased inline class
2018-06-18 18:55:18 +03:00
Mikhail Zarechenskiy
8503194e0d
Temporarily mute test for JS target
2018-06-18 18:36:36 +03:00
Nikolay Krasko
0f88565b93
Auto-add pattern for running inner tests in Gradle (KT-24961)
...
Since Gradle 4.7 there's a more strict pattern check. Simple include
trick doesn't work anymore.
Probably modification of TestSelectionMatcher.java in
https://github.com/gradle/gradle/commit/c2067eaa129af4c9c29ad08da39d1c853eec4c59#diff-e92afe807d7ea74cc9ab0dcef30efc93
is responsible for the new behaviour.
#KT-24961 Fixed
2018-06-18 17:18:43 +03:00
Nikolay Krasko
1f2d6da770
Minor: fix formatting and warnings in tasks.kt
2018-06-18 17:18:38 +03:00
Alexander Udalov
f6169337dd
Use kotlinx-metadata-jvm to relocate .kotlin_module files in kotlin-reflect
...
Instead of custom logic which used compiler internals and was very
brittle
2018-06-18 12:35:06 +02:00
Anton Bannykh
14dfb6bd99
JS: install -> npmInstall (collides with maven tasks)
2018-06-18 13:32:59 +03:00
Anton Bannykh
b551afb202
JS IR: minor fix for callable ref translation
...
The caching variable has to have no initializers so that there is no
dependence on evaluation order.
2018-06-18 13:15:19 +03:00
Anton Bannykh
43e3314255
JS IR: Remove inline functions with reified type parameters
...
Otherwise we cannot handle type casts
2018-06-18 13:15:19 +03:00
Anton Bannykh
3808d77bf4
JS IR: inliner
2018-06-18 13:15:19 +03:00
Anton Bannykh
d938c91711
JS IR: top-level initializer lowering
2018-06-18 13:15:19 +03:00
Mikhail Zarechenskiy
c5160a6a95
Don't use methods from super interface if call was on inline class type
...
Some methods (like `size` from kotlin.collections.Collection) have
special rules for mapping and overriding. For example, when we call
`size`, normally there will be `INVOKEVIRTUAL size()` in the bytecode,
but for inline classes it should be `INVOKESTATIC ...$Erased.getSize()`
2018-06-18 12:35:31 +03:00
Mikhail Zarechenskiy
246d5e294c
Fix bytecode optimisations for consequent boxing
2018-06-18 11:52:37 +03:00
Mikhail Zarechenskiy
01d9be65bc
Perform bytecode optimisations for inline classes
...
#KT-23742 Fixed
2018-06-18 11:52:36 +03:00
Mikhail Zarechenskiy
7465289811
Introduce jvm backend class resolver to resolve asm types
...
Original author is @dnpetrov
2018-06-18 11:52:34 +03:00
Mikhail Zarechenskiy
5bdd7bca65
Pass GenerationState to OptimizationMethodVisitor
...
Original author is @dnpetrov
2018-06-18 11:52:32 +03:00
Mikhail Zarechenskiy
605cdcd8d8
Allow to use inline classes in 1.3 with warning
2018-06-18 11:52:31 +03:00
Mikhail Zarechenskiy
6db07f71f3
Check feature dependencies targets before report diagnostics
...
For example, if inline classes feature would have state `ENABLED_WITH_WARNING`,
then corresponding warning will be reported on inline functions too
2018-06-18 11:52:29 +03:00
Nikolay Krasko
423e8f9979
Depend on jre8 kotlin stdlib in idea
...
Use jre artifact for now because of KT-24730.
2018-06-16 01:19:15 +03:00
Natalia Selezneva
077554c438
Use field access instead of setter in clone method of KtCodeFragment
...
Fix EA-120381
2018-06-16 00:01:29 +03:00
Alexander Udalov
a9974a522e
Use correct class loader in kotlinx-metadata to load MetadataExtensions implementations
...
By default, ServiceLoader.load uses thread context class loader, which
can differ from the MetadataExtensions' class loader (which also loads
JvmMetadataExtensions, since they're in the same .jar) in many cases,
for example when used in annotation processing
#KT-24881 Fixed
2018-06-15 19:35:39 +02:00
Alexander Udalov
28da071ff6
Remove usages of deprecated ClsCustomNavigationPolicy
...
#KT-24891 Fixed
2018-06-15 18:58:15 +02:00
Nikolay Krasko
ea3c4fd451
Run single test after Gradle 4.7 update
2018-06-15 18:06:20 +03:00
Roman Artemev
960fba3c4e
Fix test failures
2018-06-15 16:23:06 +03:00
Nikolay Krasko
e37cbe51d2
Remove outdated runtime notification
...
#KT-23122 Fixed
#KT-21634 Fixed
#KT-20324 Fixed
#KT-18366 Fixed
#KT-20910 Fixed
Outdated runtime notification was abandoned.
2018-06-15 16:13:17 +03:00
Ilmir Usmanov
192f311128
Minor. Ignore test is JS_IR.
2018-06-15 15:43:56 +03:00
Alexander Udalov
9bf2d129ee
Improve exception message when failing to serialize anonymous object metadata
...
(See KT-20996)
Old message:
Cannot get FQ name of local class: class <no name provided>
New message:
Cannot get FQ name of local class: class <no name provided> defined in private fun x(): <no name provided> defined in root package in file 1.kt
2018-06-15 13:26:44 +02:00
Ilya Chernikov
29adf09b7e
Add test with other annotation, tests fix of #KT-2496
2018-06-15 12:01:49 +02:00
Rodrigo B. de Oliveira
e24a9d08f2
Only collect annotations with a name starting with KotlinScript
2018-06-15 11:53:49 +02:00
Natalia Selezneva
0adfa7b038
182: Converting J2K: save file path before conversion to use it in commit dialog
...
^KT-9945 Fixed
2018-06-14 21:33:11 +03:00
Natalia Selezneva
adfa7a2418
Create new module with dependency on IDEA Git plugin
2018-06-14 21:33:10 +03:00
Roman Artemev
dbb360555c
[JS IR BE] Fix logic boolean operations
2018-06-14 19:54:35 +03:00
Roman Artemev
6ac4fd2e5f
[JS IR BE] Update test data
2018-06-14 19:54:30 +03:00
Roman Artemev
17d71f1e46
[JS IR BE] Implement type check
...
* IrTypeOperator lowering
* runtime support
* refactoring
2018-06-14 18:40:06 +03:00
Alexander Udalov
50eda3b8a0
Make metadata writers' properties protected
...
These properties are only supposed to be used from Writer classes in
KotlinClassMetadata
2018-06-14 17:19:08 +02:00
Alexander Udalov
fec2c14ea5
Support local delegated properties in kotlinx-metadata-jvm
2018-06-14 17:19:08 +02:00
Alexander Udalov
b00f765255
Pass whole ReadContext/WriteContext to kotlinx-metadata extensions
2018-06-14 17:19:08 +02:00
Anton Bannykh
05123c13f8
[JS IR BE] mute ranges' tests
2018-06-14 18:17:43 +03:00
Mikhail Glukhikh
cbcd35e2f5
Implement Kotlin sub-classes tooltip to handle MPP correctly
...
Before this commit, Java tooltip was in use which could not
work correctly with expect / actual classes
So #KT-21011 Fixed
2018-06-14 15:42:37 +03:00
Mikhail Glukhikh
90b6f369e0
Module-specific list cell renderer: wrap into runReadAction
...
This should fix KotlinGoto*ModuleTestGenerated.testExpectClassSuperclass
and related exception in IDEA
Additional fix for KT-23685
2018-06-14 13:55:31 +03:00
Mikhail Glukhikh
3d4b407d0c
MPP wizard: introduce structure: root <- common <- js / jvm
...
This commit also removes deprecated structure with common root
So #KT-20554 Fixed
2018-06-14 13:14:45 +03:00
Ilya Chernikov
cf294b57f0
Update changelog with changes in 1.2.50
2018-06-14 12:02:40 +02:00
Alexander Udalov
5d76e463d3
Fix exception from reflection on local delegated properties
...
The problem was that in JvmSerializerExtension.writeLocalProperties, we
only serialized metadata for local properties, but indices generated in
MemberCodegen.generatePropertyMetadataArrayFieldIfNeeded were among all
delegated properties in the class (not only local). This behaved
incorrectly as long as there was a local and a non-local delegated
property in the same class. For example, if there were 5 non-local
properties and then one local, that local property would get the index 5
and the synthetic signature "<v#5>". But there would only be one
Property entry in the metadata, and so reflection would fail here trying
to load the 5th element of the list which contains only one element.
Now, the index for a local delegated property is computed only as the
number of _local_ delegated properties above it in the class, i.e. the
first local delegated property gets index 0 (and synthetic signature
"<v#0>"), the next one -- index 1, and so on.
#KT-23413 Fixed
2018-06-14 11:07:26 +02:00