pyos
85b4668b7c
JVM_IR: optimize more if-null chains
...
1. consider reads of fields from the same file "stable" just like
functions, i.e. assume their nullability information is correct
2. apply if-null fusion repeatedly until the subject is no longer a
nested if-null expression
2021-04-13 11:48:36 +03:00
Denis.Zharkov
0b0a6d6ede
Fix false positive ENCLOSING_SUSPEND_FUNCTION_FOR_SUSPEND_FUNCTION_CALL
...
Previously added additional processing at findEnclosingSuspendFunction
seems unnecessary anymore
^KT-43258 Fixed
2021-04-13 11:47:05 +03:00
Dmitriy Novozhilov
803d47daaa
Distinguish classes from different sourcesets in SealedInheritorInSameModuleChecker
...
#KT-45848 Fixed
#KT-46031
2021-04-13 11:21:58 +03:00
Dmitriy Novozhilov
66e4d5664a
[Test] Properly setup KtFile.isCommonSource in tests
2021-04-13 11:21:57 +03:00
Jinseong Jeon
619360fe4d
FIR checker: report UNINITIALIZED_ENUM_(ENTRY|COMPANION)
2021-04-13 08:25:16 +03:00
Ivan Kochurkin
ad9b962536
[FIR] Fix tests (ARGUMENT_TYPE_MISMATCH instead of INCOMPATIBLE_CANDIDATE)
2021-04-12 23:49:55 +03:00
Ivan Kochurkin
4ffab5fe5a
[FIR] Add new test argParamTypeMismatch.kt for ARGUMENT_TYPE_MISMATCH diagnostics
2021-04-12 23:49:54 +03:00
Ivan Kochurkin
a09b836334
[FIR] Add new ARGUMENT_TYPE_MISMATCH diagnostics and related classes, throw it in corresponding cases
2021-04-12 23:49:52 +03:00
Dmitry Petrov
7e03f8ea80
JVM_IR KT-45853 include return type into Java method IdSignature
...
This is a hack required to accept [potentially] incorrect input
provided by the front-end; see KT-46042.
2021-04-12 22:52:08 +03:00
Matthew Gharrity
5ce746f1ec
ULC field has null nameIdentifier
...
KtUltraLightFieldForSourceDeclaration implements PsiField, for which
getNameIdentifier() is marked @NonNull, so some clients expect a
non-null return value.
#KT-45629 Fixed
2021-04-12 21:41:54 +03:00
Jinseong Jeon
9af108df77
FIR LT: set source for destructured value parameter of lambda
2021-04-12 19:20:03 +03:00
Dmitry Petrov
f59b49db68
JVM_IR KT-45967 generate accessor for argument of indy intrinsic
...
TODO handle inaccessible constructors gracefully
2021-04-12 17:36:24 +03:00
Alexander Udalov
e9a969875c
Minor, fix typo in the issue reference in comment
2021-04-12 15:43:35 +02:00
Dmitry Petrov
162363a324
JVM: CHECK_BYTECODE_TEST directive + use it in INVOKEDYNAMIC tests
2021-04-12 16:43:15 +03:00
Ilya Chernikov
ca352c9556
Fix jvm method reading when descriptor and signature do not match
...
#KT-38325 fixed
2021-04-12 16:23:53 +03:00
Mikhail Glukhikh
c75331bf2a
Implicit nothing type argument: handle nullable case properly
...
#KT-41620 Fixed
2021-04-12 15:51:46 +03:00
Alexander Udalov
115e2673ae
Minor, fix javac deprecation warning in DynamicBundle
2021-04-12 14:38:09 +02:00
Victor Petukhov
73a2838555
Do substitution captured type's super types as well
...
^KT-45982 Fixed
2021-04-12 14:00:40 +03:00
Victor Petukhov
e8275d2527
Complete old inference's callable references properly, by updating descriptor, resolved call and recorded expression's type
...
^KT-45721 Fixed
^KT-44994 Fixed
2021-04-12 14:00:38 +03:00
Victor Petukhov
d804e73c22
Avoid subtype checking between type variable of self type and captured star projection only for invariant positions
...
Subtyping with non-invariant positions may produce useful constraints
^KT-46001 Fixed
2021-04-12 13:44:09 +03:00
Ilya Chernikov
0274c41919
[minor] FIR: fix deprecation in test
2021-04-12 10:08:54 +02:00
Alexander Likhachev
9e78e43c49
[Gradle] Always declare system property reads for compile tasks
...
When Kotlin plugin is applied in buildSrc or included build that defines Gradle plugins it can cause Gradle to report undeclared system property reads at configuration time. Declaring all system properties reads through Gradle providers to cover all these cases.
#KT-45910 Fixed
2021-04-12 03:15:10 +03:00
Andrey Zinovyev
47407c4445
[FIR] Add NAME_IN_CONSTRAINT_IS_NOT_A_TYPE_PARAMETER check
2021-04-11 16:18:07 +00:00
Alexander Udalov
ea22f4b681
IR: check absence of extension receiver in isMethodOfAny
...
Otherwise extension methods named toString/equals/hashCode were
generated incorrectly on JVM IR, which could result in
AbstractMethodError at runtime.
#KT-45963 Fixed
2021-04-11 13:54:13 +02:00
Ilmir Usmanov
bce92d824a
Minor. Add tests to check returning Result from functions
...
Mainly, that virtual functions, returning Result, are mangled.
#KT-45855
2021-04-09 22:09:03 +03:00
Anton Bannykh
bcaad7487f
JS PIR: regenerate .proto
2021-04-09 19:54:24 +03:00
Anton Bannykh
923303c2c1
JS PIR: move PIR proto messages to a separate file
2021-04-09 19:54:23 +03:00
Anton Bannykh
8fe8419ad4
JS IR: serialize declarations without mutable state
2021-04-09 19:54:21 +03:00
Anton Bannykh
1e822aa28a
JS PIR: carrier serializer implementation
2021-04-09 19:54:20 +03:00
Anton Bannykh
c97066527c
JS PIR: carrier serializer / deserializer
2021-04-09 19:54:19 +03:00
Anton Bannykh
030498c5e1
JS IR: updated .proto
2021-04-09 19:54:18 +03:00
Anton Bannykh
5de04f49ca
JS PIR: updated declarations
2021-04-09 19:54:17 +03:00
Anton Bannykh
1f0d83b420
JS PIR: update the generator
...
- Use symbols in carriers
- .proto messages for carriers
- carrier serializer/derserializer
2021-04-09 19:54:16 +03:00
Anton Bannykh
c224dd4cb1
JS IR: JsMapping serialization
2021-04-09 19:54:15 +03:00
Anton Bannykh
ba5582de99
IntArray and LongArray serialization
2021-04-09 19:54:14 +03:00
Anton Bannykh
387b84b37c
JS IR: simplify DCE root calculation
2021-04-09 19:54:13 +03:00
Mads Ager
b27a109a1e
[JVM] Fix shrinking of local range for dead variables.
...
Coroutine transform would occasionally *extend* the range of a
local instead of shrinking it (if the next suspension point
is after the end point for the local). That leads to the local
variable table having a local that covers code where it is not
defined. That is invalid and leads to D8 removing the locals
table from the code.
2021-04-09 19:06:13 +03:00
Vladimir Dolzhenko
0761c4bf94
Optimize KtFile.getScript
2021-04-09 14:45:20 +02:00
Mikhail Glukhikh
254e41b70d
FIR: apply bad test data changes related to ABSTRACT_*_NOT_IMPLEMENTED
2021-04-09 14:52:41 +03:00
Mikhail Glukhikh
818c54e3a6
FIR: report ABSTRACT_*_NOT_IMPLEMENTED on appropriate intersections
2021-04-09 14:52:34 +03:00
Vladimir Dolzhenko
04268a720f
Optimize KtFile.isScript
2021-04-09 12:17:51 +02:00
Denis.Zharkov
37813d9d82
Add version requirements for declarations with !! types
...
^KT-26245 Related
2021-04-09 13:06:40 +03:00
Denis.Zharkov
403406f92d
Ignore not-null assertion test related to T!! on JVM_IR
...
^KT-45935 Related
2021-04-09 13:06:39 +03:00
Denis.Zharkov
16ca8ddbbd
Do not parse !! as part of annotation type
...
^KT-26245 Related
2021-04-09 13:06:38 +03:00
Denis.Zharkov
37f923a98f
Do not approximate DefinitelyNotNullType in public declarations
...
Because since 1.6 they become normal denotable types
^KT-26245 Fixed
2021-04-09 13:06:37 +03:00
Denis.Zharkov
e74a0c7ef7
Pass languageVersionSettings to AbstractTypeApproximator
2021-04-09 13:06:35 +03:00
Denis.Zharkov
59372fd15f
Enable ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated since 1.6
...
^KT-36770 Fixed
2021-04-09 13:06:34 +03:00
Denis.Zharkov
bd05ef19de
Add blackbox test for definitely-not-null types
...
^KT-26245 Fixed
2021-04-09 13:06:32 +03:00
Denis.Zharkov
30eb9ad32f
Add serialization/deserialization of definitely-not-null types
...
^KT-26245 In Progress
2021-04-09 13:06:31 +03:00
Denis.Zharkov
6ca6bb2d45
Load configuration for FirLoadCompiledKotlin
2021-04-09 13:06:29 +03:00