Mikhail Glukhikh
84ccf7bbb1
FIR: use Java 8 rules in not implemented checker
2021-04-30 17:59:38 +03:00
Mikhail Glukhikh
5de8401494
Reset FirQualifiedNameResolver properly
2021-04-30 17:59:32 +03:00
Victor Petukhov
7c62e9aecd
Introduce warnings reporting by missed constraints because of incorrect optimization in the constraints processor
2021-04-30 15:46:04 +03:00
Victor Petukhov
e110b49cab
Revert "Don't stop constraints processing if all type variables have proper equality constraints"
...
This reverts commit b87c2a15
2021-04-30 15:46:03 +03:00
Andrey Zinovyev
287ff3ed55
[FIR] Fix for AugmentedArraySetCall expression type
...
Hacky fix so it's type is Unit and not error
2021-04-30 15:25:44 +03:00
Dmitry Petrov
72804d2e8c
JVM_IR KT-45779 don't generate intrinsic method refs via invokedynamic
2021-04-30 12:45:11 +03:00
Victor Petukhov
8dd71ec5c8
Build recursive raw types and raw types which contain type parameters properly
...
1) Substitute erasure of other type parameters
2) Use star projection at top level for recursive raw types
^KT-46126 Fixed
2021-04-30 10:49:47 +03:00
Andi Wenger
f9d2ca68ce
KJS IR: Fix KT-45738 - Consider recursive checkForPrimitiveOrPattern
...
Recursive results from checkForPrimitiveOrPattern were ignored. If it found a case/condition that could not be optimized the resulting "false" was not propagated. This would lead to a "optimized" when without all conditions.
- see KT-45738
- The return is now lifted out of the when to make it more obvious what is going on.
- New test for mixed multiple conditions in when
2021-04-29 23:52:01 +03:00
Ivan Kochurkin
7ec709cf46
FIR: fix incorrect reporting of underscores, simplify code, fix test data file
2021-04-29 22:31:39 +03:00
Jinseong Jeon
9b39a8abc2
FIR: avoid wrapping an erroneous type as FirResolvedTypeRef
...
Instead, use FirErrorTypeRef, a subtype of FirResolvedTypeRef
2021-04-29 22:31:38 +03:00
Ilmir Usmanov
cb89bd0e13
Generate SuspendFunction marker interface if supertype is suspend
...
Otherwise, is/as checks will not work.
#KT-18707
2021-04-29 17:11:31 +03:00
Mikhail Glukhikh
cc05d91bda
FE 1.0: add deprecation ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTED_WARNING
...
#KT-45508 Fixed
2021-04-29 15:24:49 +03:00
Steven Schäfer
84d78035e4
JVM IR: Avoid double mangling of function reference invoke methods
2021-04-29 13:10:43 +02:00
Alexander Udalov
276ffd5a4b
JVM IR: fix ::class reference and type mapping for scripts
...
#KT-46284 Fixed
2021-04-29 00:33:34 +03:00
Ilya Kirillov
7149d08995
FIR IDE: resolve supertypes before retrieving them
2021-04-28 22:11:05 +03:00
Ilya Kirillov
cccf9b7d54
FIR IDE: add JVM checkers
2021-04-28 17:57:45 +02:00
Ilya Kirillov
81a7271009
FIR: Decouple AbstractDiagnosticCollectorComponent and AbstractDiagnosticCollector
2021-04-28 17:57:45 +02:00
Ivan Kochurkin
525cc6df97
[FIR] Implement MANY_LAMBDA_EXPRESSION_ARGUMENTS diagnostics, fix tests
2021-04-28 16:21:48 +03:00
Dmitriy Novozhilov
07b15f9de6
[FIR] Support effective visibility with @PublishedApi
...
#KT-46270 Fixed
2021-04-27 18:39:10 +03:00
Dmitriy Novozhilov
32c3f85679
[FIR] Add inline checker for bodies of inline functions
...
This checker doesn't support `@PublishedAPI` yet, so some BB tests for it
were muted. #KT-46270
2021-04-27 18:39:09 +03:00
Dmitriy Novozhilov
7e052c1eb1
[FIR] Fix suppressing diagnostics for some expressions
2021-04-27 18:39:07 +03:00
Dmitriy Novozhilov
2a08923c51
[FIR] Add more utilities for builtin functional types
2021-04-27 18:39:06 +03:00
Dmitriy Novozhilov
8925b8c922
[FIR] Fix leaking mutable map type of resolved argument mapping
2021-04-27 18:39:05 +03:00
Dmitriy Novozhilov
1afb844e1a
[FIR] Fix FirExpressionWithSmartcastImpl.acceptChildren
2021-04-27 18:39:03 +03:00
Dmitriy Novozhilov
12331cb10c
[FIR] Build resolved declaration status for all non-raw declarations
2021-04-27 18:39:02 +03:00
Ivan Kochurkin
d54808e33f
[FIR] Implement CREATING_AN_INSTANCE_OF_ABSTRACT_CLASS diagnostics, fix tests
2021-04-27 18:27:39 +03:00
Dmitry Petrov
660208740e
PSI2IR KT-44013 WA: function interface constructor call accepted by FE
2021-04-27 17:35:37 +03:00
Ivan Kochurkin
704b5a0e13
[FIR] Implement UNDERSCORE_IS_RESERVED, UNDERSCORE_USAGE_WITHOUT_BACKTICKS diagnostics (lighttree)
2021-04-27 17:03:53 +03:00
Ivan Kochurkin
ea2d9f7c0c
[FIR] Implement UNDERSCORE_IS_RESERVED, UNDERSCORE_USAGE_WITHOUT_BACKTICKS diagnostics (psi only)
2021-04-27 17:03:52 +03:00
Ilmir Usmanov
0c0710bb79
Fix outer class accesses inside suspendImpl functions
...
We need to generate this$0 fields to get to the outer class and generate
accesses to these fields inside suspendImpl function.
#KT-46214 Fixed
2021-04-27 10:44:18 +02:00
Ilmir Usmanov
dc2485ae71
Support suspend functions as superinterfaces
...
Forbid mixing suspend and non-suspend functional supertypes.
Since JVM BE generates suspend functional types as non-suspend ones
with SuspendFunction marker interface, there is not way to distinguish
non-suspend functional type from suspend one if they are mixed.
#KT-18707 Fixed
2021-04-26 22:14:32 +02:00
Svyatoslav Kuzmich
ccc27b6a0c
[IR] Add module property to IrFile
2021-04-26 18:52:42 +03:00
Steven Schäfer
a1c1a32515
JVM: Fix unsigned literals in API version < 1.5
2021-04-26 15:11:45 +03:00
Mark Punzalan
af2d0ad36f
FIR: Properly set light-tree source for all nested types (e.g.,
...
nullable function type) and error type refs.
2021-04-26 15:11:44 +03:00
Mark Punzalan
1835185b16
FIR: Remove duplicated diagnostics on annotations on types.
2021-04-26 15:11:43 +03:00
Mark Punzalan
edb6b337dc
FIR: Resolve anonymous function bodies during
...
IMPLICIT_TYPES_BODY_RESOLVE phase.
This fixes an issue where some FirAnnotationCalls can be left with some
implicit type refs if they have anonymous functions in the arguments.
2021-04-26 15:11:42 +03:00
Mark Punzalan
e69b729e21
FIR checker: Create a new kind of checker FirTypeChecker and add
...
FirSuspendModifierChecker to report WRONG_MODIFIER_TARGET for `suspend`
on non-functional types.
2021-04-26 15:11:41 +03:00
Dmitriy Novozhilov
4282d17467
[FIR] Optimize imports
2021-04-26 15:11:40 +03:00
Mark Punzalan
b88913af1d
FIR checker: Report WRONG_MODIFIER_TARGET for suspend on
...
non-functional types.
2021-04-26 15:11:39 +03:00
Mark Punzalan
9a4742c08d
FIR: Properly build nullable suspend function types, and aggregate
...
modifiers and annotations within KtTypeReference/REFERENCE_TYPE nodes.
2021-04-26 15:11:38 +03:00
Mark Punzalan
9cf5ac1fbd
FIR: Render "?" on nullable function types.
2021-04-26 15:11:37 +03:00
Mikhail Glukhikh
29d2a6acee
FIR: fold String arguments inside string concatenation call
...
Related to KT-28006
2021-04-26 12:50:57 +03:00
Mikhail Glukhikh
f278de8768
FIR: don't call toString() inside string concatenations
2021-04-26 12:50:55 +03:00
Igor Chevdar
7dcdbf283b
[box-tests] Added test
2021-04-26 11:53:27 +05:00
Victor Petukhov
7a81d0de8a
Regenerate tests
2021-04-23 19:28:26 +03:00
Mikhail Glukhikh
683872ecbf
FIR: use more precise checkers when possible
2021-04-23 17:29:43 +03:00
Mikhail Glukhikh
5c224ad17c
FIR: fix positioning in fun interface checker
2021-04-23 17:29:34 +03:00
Артём
393a19db54
FIR: introduce FunInterfaceDeclarationChecker
2021-04-23 17:29:25 +03:00
Victor Petukhov
867d7b5bca
Allow type variable fixation into intersection type if it isn't meaningless (i.e. has one or more final classes, or two or more open classes)
...
^KT-46186 Fixed
2021-04-23 15:12:13 +03:00
Ilmir Usmanov
f7a9bc3521
Minor. Make test actually suspend and add a test without suspension
2021-04-23 03:50:08 +02:00