Yan Zhulanow
f2dc132d5d
KT-23394: Add a test with a property
2020-10-23 15:46:51 +09:00
Toshiaki Kameyama
cdf7f46ce1
Provide quickfix for specifying type of variable initialized with null
...
#KT-23394 Fixed
2020-10-23 15:46:51 +09:00
Yan Zhulanow
55038e19ec
Minor: Extract lambda return expression handling
2020-10-23 15:46:51 +09:00
Toshiaki Kameyama
f76e98868c
"Change to return with label" quick fix: apply for type mismatch
...
#KT-32280 Fixed
2020-10-23 15:46:51 +09:00
Yan Zhulanow
016e78e483
Refactoring: Remove hard-coded augmented assignment check with a Name check
2020-10-23 15:46:50 +09:00
Toshiaki Kameyama
73e319ca7a
Replace with ordinary assignment: do not suggest when operator is augmented assignment operator function
...
#KT-34715 Fixed
2020-10-23 15:46:50 +09:00
Toshiaki Kameyama
55d55446c8
Redundant companion reference: do not report 'values/valueOf' function in enum
...
#KT-34285 Fixed
2020-10-23 15:46:50 +09:00
Yan Zhulanow
2a841550d4
Additional minor fixes for KT-33594: avoid using hard-coded annotation name, simplify hasAnnotationToSuppressDeprecation()
2020-10-23 15:46:50 +09:00
Toshiaki Kameyama
cf5a6274e2
"Code Cleanup": don't remove deprecated imports when file has @file:Suppress("DEPRECATION") annotation
...
#KT-33594 Fixed
2020-10-23 15:46:49 +09:00
Toshiaki Kameyama
4a328981c6
"Put/Join arguments/parameters" intention: don't suggest on nested argument list
...
#KT-31020 Fixed
2020-10-23 15:46:49 +09:00
Toshiaki Kameyama
be194c3460
ReplaceWith: suggest for "invoke" extension
...
#KT-8597 Fixed
2020-10-23 15:46:49 +09:00
Toshiaki Kameyama
bb7d4c224f
FoldInitializerAndIfToElvisInspection: don't add explicit type if var is used as non-nullable
...
#KT-38349 Fixed
2020-10-23 15:46:48 +09:00
Yan Zhulanow
3e632d074e
Enable Parcelize IDE plugin in Android Studio 4.2 (KT-42859)
...
It turned out that all extensions related to the Parcelize IDE plugin are disabled in Android Studio 4.2. The missing inclusion seemingly happened because of a rebase mistake. This commit returns the missing inclusion back.
2020-10-23 15:46:48 +09:00
Mikhail Glukhikh
47a4bd1701
[FIR Java] Look into type arguments during dependent type parameter search
2020-10-23 08:12:17 +03:00
Mikhail Glukhikh
7f3d0af4f7
[FIR Java] Soften rules for matching types for may-be-special-builtins
...
This commit is workaround for cases like
MyJavaMap<KK : Bound, V> : java.util.Map<K, V>.
After signature changing and substitution we have
MyJavaMap.get(Object) declared and MyJavaMap.get(KK) from supertype,
which can't be otherwise matched as overriding one another.
2020-10-23 08:12:16 +03:00
Mikhail Glukhikh
81529a835b
Drop FirAbstractOverrideChecker.isEqualTypes
2020-10-23 08:12:16 +03:00
Mikhail Glukhikh
abc2866902
[FIR] Fold flexible types after substitution if possible
2020-10-23 08:12:16 +03:00
Mikhail Glukhikh
acb03cb28c
[FIR2IR] Expand type during super qualifier search
2020-10-23 08:12:16 +03:00
Mikhail Glukhikh
c50aa5f2ec
[FIR TEST] Bad test data changes due to Java signature transformation
...
Both changes are related to getOrDefault. We should either make Java
version low priority or remove it at all.
2020-10-23 08:12:16 +03:00
Mikhail Glukhikh
d3e85dbce0
[FIR] Implement replacing Object with type parameters for specials builtins
...
#KT-42601 Fixed
2020-10-23 08:12:15 +03:00
Mikhail Glukhikh
d40248cb53
[FIR] Extract computeJvmDescriptorReplacingKotlinToJava
2020-10-23 08:12:15 +03:00
Mikhail Glukhikh
f866eff93e
Extract special generic signatures to compiler.common.jvm to reuse in FIR
2020-10-23 08:12:15 +03:00
Mikhail Glukhikh
0e7acd6e8b
[FIR Java] Add better type parameter erasure for override matching
...
Around KT-42601
2020-10-23 08:12:15 +03:00
Mikhail Glukhikh
17de486c23
[FIR Java] Drop nasty code providing type parameter erasure
2020-10-23 08:12:14 +03:00
Alexander Likhachev
999627952a
[Gradle, K/N] Add proper assumptions for Mac only integration tests
2020-10-23 05:41:08 +03:00
Alexander Likhachev
ac7b7abcc0
[Gradle, JS] Fix K/JS project build with configuration cache (part 3)
...
Now configuration cache enabled builds with JS tasks does not fails but prints warning and skips execution on subsequent builds.
Relates to KT-42494
2020-10-23 05:41:07 +03:00
Igor Yakovlev
97d39c102a
Fix BWC for Search utils
2020-10-22 19:32:18 +03:00
Andrei Klunnyi
71023cd596
[KT-40688] Inlay Hints: inlay hints are duplicated on code editing
...
Code editing changes inlay hints offset.
InlayModel.getAfterLineEndElementsInRange(int, int) call didn't return
previously existed hint by its "outdated" offset. From now on hints are
taken by logical line.
2020-10-22 18:22:51 +02:00
Georgy Bronnikov
b7a07fdf03
Review fix: unify irTemporary variants
2020-10-22 18:31:23 +03:00
Georgy Bronnikov
8e331c8afe
IR: relax type cast for WrappedVariableDescriptor.containingDeclaration
2020-10-22 18:26:47 +03:00
Georgy Bronnikov
b588839752
EnumConstructorCall.fromSymbolDescriptor
2020-10-22 18:26:46 +03:00
Georgy Bronnikov
887dd10764
IR: remove descriptor usage
2020-10-22 18:26:46 +03:00
Georgy Bronnikov
e5cf7a1be7
Remove descriptor usage from Scope.kt
2020-10-22 18:26:46 +03:00
Leonid Startsev
8d999a2c13
Disable kx.ser plugin inside descriptors serialization in the IDE
...
Since IDE does not perform any serialization of descriptors, and
metadata written to the 'serializationDescriptorSerializer'
deleted only on call to DescriptorSerializer,
enabling this extension in the IDE effectively causes memory leaks.
#KT-39624 Fixed
Pass SerializationDescriptorSerializerPlugin to other extensions directly
instead of using static val in companion.
2020-10-22 17:14:06 +03:00
Leonid Startsev
4ec90b18bc
Rework DescriptorSerializerPlugin to be a part of Project's extensions
...
instead of statically registering it.
Static registering can cause subtle errors when plugin implementation
(e.g. SerializationDescriptorPluginForKotlinxSerialization) is registered
from multiple classloaders: in multi-module with daemon compilation scenario
#KT-41857 Fixed
2020-10-22 17:04:35 +03:00
Mikhail Glukhikh
ef907e0c46
Fix FIR IDE test broken by Jinseong commit
2020-10-22 16:53:12 +03:00
Mikhail Glukhikh
ad12cc296b
[FIR] Expand type before adding equality constraint
2020-10-22 15:38:30 +03:00
Alexander Gorshenev
7815529eed
[Private fake overrides] Tests for private fake overrides construction
2020-10-22 13:23:29 +03:00
Alexander Gorshenev
294e7dd902
[Private fake overrides] Renamed FakeOverrideBuilder object to FakeOverrideBuilderForLowering
2020-10-22 13:23:29 +03:00
Alexander Gorshenev
81c06b24f7
[Private fake overrides] Private fake overrides linkage
2020-10-22 13:23:28 +03:00
Alexander Gorshenev
223d1dd5e6
[Private fake overrides] Private fake override construction
2020-10-22 13:23:28 +03:00
Alexander Gorshenev
c90556a883
[Private fake overrides] FakeOverrideDeclarationTable for private fake override construction
2020-10-22 13:23:28 +03:00
Alexander Gorshenev
623f9a54c6
[Private fake overrides] Tweak DeclarationTable to be open
2020-10-22 13:23:27 +03:00
Alexander Gorshenev
c7ea8b1ab6
[Private fake overrides] Prepare IdSignature for private fake override construction
2020-10-22 13:23:27 +03:00
Mikhail Glukhikh
91089f5f7a
IrValidator: add more details to duplicate message for type parameter
2020-10-22 13:05:01 +03:00
Mikhail Glukhikh
44bb12480b
[FIR2IR] Forbid private fake overrides in generator
2020-10-22 13:05:00 +03:00
Mikhail Glukhikh
3663bc6be3
FirClassSubstitutionScope: eliminate second constructor to simplify code
2020-10-22 13:05:00 +03:00
Mikhail Glukhikh
80f8b5b234
IrValidator: mention file in exception message
2020-10-22 13:05:00 +03:00
Mikhail Glukhikh
23e7468e57
[FIR2IR] Cache Java field-based properties more correctly #KT-42805 Fixed
...
Before this commit, we cached such IR properties by FIR property
which was created by Java field each time when we referenced it.
This led to signature clashes. Now we cache such IR properties
directly by associated FIR field.
2020-10-22 13:05:00 +03:00
Mikhail Glukhikh
3576cbf0d8
[FIR] Add test for KT-42805
2020-10-22 13:04:59 +03:00