Alexander Dudinsky
36dd883768
Update testData of testKt28385 for 202 version
2020-10-14 12:15:07 +03:00
Pavel Punegov
4b3455dfa1
Set backend for the test
2020-10-13 22:02:16 +03:00
Dmitry Petrov
052f345a17
JVM_IR no generic signatures for abstract stubs KT-42609
2020-10-13 19:20:29 +03:00
Dmitry Petrov
c8bf74c7d5
Bytecode listing test fails if JVM and JVM_IR have same testData
2020-10-13 19:20:29 +03:00
Alexander Udalov
1b39a235d8
JVM IR: sort multifile part names in metadata
2020-10-13 16:40:53 +02:00
Alexander Udalov
b257b03152
JVM IR: do not generate JvmName on multifile parts
...
#KT-36970 Fixed
2020-10-13 16:40:52 +02:00
Jinseong Jeon
bc6693fa6e
FIR2IR: element-wise SAM conversion for vararg
2020-10-13 15:40:06 +03:00
Pavel Kirpichenkov
9dd3d8fb14
[NI] Fix extension function check after commonization
...
`isExtensionFunction` property is false for suspend functions
2020-10-13 11:00:21 +03:00
Pavel Kirpichenkov
c53011dd04
[FIR] mute builder inference test
...
^KT-42591 Open
2020-10-13 11:00:21 +03:00
Pavel Kirpichenkov
39a87435ee
[FIR/NI] Refactor type variable gathering from lambda types
...
Motivation:
- drop getArguments from type context as a duplicate of getArgumentList
- reduce the number of collection allocations in getAllDeeplyRelatedTypeVariables
Additional minor improvements, test data fixes
2020-10-13 11:00:21 +03:00
Pavel Kirpichenkov
ef44077cb7
[FIR] Restore variable fixation direction in call completion
...
Several tests are affected by the usage of fixation direction calculator in FIR.
Restored to mimimize test data changes.
It is unnecessary in FE10 because a type variable with unknown type
is inferred into an error type, but affects test data in FIR where
Nothing/Any is selected by direction (as a temporary measure).
CR candidate in spec test is Unresolved in FIR because top-level CRs are resolved as call arguments.
Resolution ambiguity is also present in FE10 when CR is wrapped into an id call.
2020-10-13 11:00:21 +03:00
Pavel Kirpichenkov
712a2ce1ab
[FIR] Improved lambda completion: initial implementation
...
Repeat the logic of KotlinConstraintSystemCompleter in ConstraintSystemCompleter.
Implement additional context operations required for updated lambda completion algorithm.
2020-10-13 11:00:21 +03:00
Victor Petukhov
0685beb765
NI: do substitution type variables during updating trace for lambda (these type variables can appear after the builder inference)
...
^KT-42450 Fixed
2020-10-13 10:21:55 +03:00
Alexander Udalov
e399b4cd12
JVM IR: minor, sort ElementType fields as in the old backend
...
In the old backend, targets are generated in the order of their
declaration in the ElementType enum, see AnnotationCodegen.java:306
(EnumSet guarantees such iteration ordering).
This has no effect other than reducing non-essential differences when
comparing ABI of JVM vs JVM_IR.
2020-10-12 21:38:09 +02:00
Alexander Udalov
1daeebcdd3
Minor, add regression test
...
#KT-42562
2020-10-12 21:37:37 +02:00
pyos
1663619606
JVM_IR: add local delegated property metadata to non-synthetic classes
...
Otherwise kotlin-reflect won't find it (and it won't even be serialized
anyway).
#KT-42562 Fixed
2020-10-12 21:14:00 +02:00
Ilmir Usmanov
d7b9920eba
Treat field initializer as class initializer
...
when checking for allowance of other field initialization in lambda
with EXACTLY_ONCE contract.
#KT-40948 Fixed
2020-10-12 20:16:21 +02:00
Ilmir Usmanov
3b5706972e
Extract effect from lambda argument if it is in parentheses
...
Otherwise, contracts on the parameter have no effect.
#KT-42044 Fixed
#KT-26229 Fixed
2020-10-12 20:16:19 +02:00
Dmitry Petrov
df64bb3eb7
JVM_IR emulate JVM hack for generic signatures in KT-18189
...
KT-40307
See also KT-42609
2020-10-12 21:14:48 +03:00
Steven Schäfer
f20a695c0e
Minor: Rebase testGenericConstructorCallWithTypeArguments
2020-10-12 17:34:34 +02:00
Victor Petukhov
f39e2d4a2d
JSpecify: convert java use sites for existing tests to kotlin ones
2020-10-12 17:24:35 +03:00
Victor Petukhov
520e35baaf
JSpecify: rework tests – replace kotlin use sites to java ones with future j2k conversion
2020-10-12 17:24:29 +03:00
Alexander Udalov
ac39e4d89c
Minor, add regression test
...
#KT-42554
2020-10-09 22:11:37 +02:00
pyos
e6c0575d3a
JVM_IR: do not deep-copy suspend lambdas in initializers
...
This loses reflection metadata (and also sometimes fails). Which was
missing anyway - this is also fixed now.
#KT-42554 Fixed
2020-10-09 22:11:00 +02:00
Mark Punzalan
8bc7370b92
ForLoopsLowering: Add PLUSEQ origin to increment to use IINC
...
instructions if possible.
2020-10-09 21:34:56 +02:00
Mark Punzalan
ccbf7cc2ee
ForLoopsLowering: Use last-exclusive for-loops for optimized until
...
progressions instead of decrementing "last".
#KT-41352 Fixed
2020-10-09 21:34:56 +02:00
Mark Punzalan
a093efde11
Add blackbox test for KT-42533.
2020-10-09 21:34:56 +02:00
Ilmir Usmanov
375d92cf67
Merge two consequent records in LVT
...
Otherwise, atomicfu will be unable to transform atomic variable usages.
2020-10-09 18:36:37 +02:00
Dmitry Petrov
91b8e32d43
Add ABI tests for classes extending Number and CharSequence
2020-10-09 16:36:35 +03:00
Dmitry Petrov
a412596d8e
JVM_IR emulate old back-end behavior in special bridges + inline classes
...
KT-42491 KT-42539
2020-10-09 16:06:08 +03:00
Mads Ager
afd710292a
[JVM_IR] Fix mangling of default argument stubs for internal methods.
...
The MethodSignatureMapper expected to be able to look at the body
of the default argument stub. That is of course not possible when
it is from an external dependency.
Instead, we go through the attribute owner to get to the method
the stub is a default argument adapter for.
2020-10-08 17:43:24 +02:00
Jinseong Jeon
8c88670185
FIR: copy constructor for typealias'ed inner/nested class
2020-10-08 16:33:13 +03:00
Victor Petukhov
9f716ba37c
Jspecify: Rename DefaultNotNull to DefaultNonNull
2020-10-08 14:00:10 +03:00
Victor Petukhov
c3bada44cf
Jspecify: Rename NullnessUnknown to NullnessUnspecified
2020-10-08 14:00:10 +03:00
Victor Petukhov
2685c7efce
Jspecify: Rename codeanalysis annotations to jspecify ones
2020-10-08 14:00:10 +03:00
Denis Zharkov
59bd7364ab
Enhance bounds for type parameters after loops disconnection
...
Otherwise behavior might change because enhancement may force computation
for other type parameters in cases like:
class A<X extends Y, Y extends X> {}
See the test:
org.jetbrains.kotlin.checkers.DiagnosticsTestGenerated.Tests.J_k#testRecursiveRawUpperBound3
2020-10-08 14:00:10 +03:00
Denis Zharkov
6661814e40
Do not enhance star projections for bounds of raw types
...
We have an invariant that their lower bound is always
SomeType<Any?> and their upper bound is SomeType<*>.
Ehancing the latter to SomeType<out Any> making
lower bound not being a subtype of upper bound that breaks contract
for flexible types (fails with exception)
2020-10-08 14:00:10 +03:00
Denis Zharkov
2964d52640
Add test case for codeanalysis annotation
2020-10-08 14:00:09 +03:00
Denis Zharkov
dfb1cb8642
Minor. Rename UnknownNullness -> NullnessUnknown
2020-10-08 14:00:09 +03:00
Denis Zharkov
0b958c8ac5
Fix annotation name in test data to DefaultNullnessUnknown
2020-10-08 14:00:09 +03:00
Denis Zharkov
f3a490ee16
Support compiler flag -Xcodeanalysis-annotations
2020-10-08 14:00:09 +03:00
Denis Zharkov
6c37574fce
Rename Jsr305State -> JavaTypeEnhancementState
...
Also, rename some of the properties
It's needed to store status for codeanalysis annotation in that class
2020-10-08 14:00:08 +03:00
Denis Zharkov
2f04a1505d
Support enhancement for unbounded wildcards from codeanalysis annotations
2020-10-08 14:00:07 +03:00
Denis Zharkov
392ef9aa2b
Support type arguments enhancement from type parameters bounds
...
Currently, only works for codeanalysis annotations because
type parameters bounds are enhanced only for them
2020-10-08 14:00:07 +03:00
Denis Zharkov
e9e05c53e1
Support enhancement for type parameter based types
...
Load them as non-flexible when a relevant type parameter has non-flexible upper bound
(Currently, it only works for case of codeanalysis annotations)
2020-10-08 14:00:07 +03:00
Denis Zharkov
e27501497b
Support codeanalysis annotations on type parameters bounds
2020-10-08 14:00:06 +03:00
Denis Zharkov
82d39dd86a
Add basic support for default codeanalysis annotations
2020-10-08 14:00:06 +03:00
Denis Zharkov
517cc84f4d
Add initial support for codeanalysis annotations
2020-10-08 14:00:06 +03:00
Mikhail Glukhikh
beac3757bc
[IR text test] Minor: add forgotten .fir.txt file
2020-10-08 10:33:58 +03:00
Alexander Udalov
2f003bdcb5
Minor, add regression test
...
#KT-42527
2020-10-07 21:31:43 +02:00