Andrey Zinovyev
84f5d6b149
[FIR] Add JVM_RECORD_WITHOUT_PRIMARY_CONSTRUCTOR_PARAMETERS diagnostic
2021-08-23 10:33:20 +00:00
Andrey Zinovyev
3fee87a0f3
[FIR] Add ENUM_JVM_RECORD diagnostic
2021-08-23 10:33:20 +00:00
Andrey Zinovyev
c8381e9b0f
[FIR] Add NON_FINAL_JVM_RECORD diagnostic
2021-08-23 10:33:20 +00:00
Andrey Zinovyev
6b70aecad5
[FIR] Add LOCAL_JVM_RECORD diagnostic
2021-08-23 10:33:19 +00:00
Ilya Chernikov
47ea5330ff
IR: Allow references to script constructor in module
...
aso add test checking (somewhat confusing) semantic of
script nested classes.
2021-08-23 12:49:45 +03:00
Ilya Chernikov
e7cbc9a0fb
IR: Process script with LDL as if it is a function body
...
#KT-46645 fixed
#KT-48025 fixed
2021-08-23 12:49:43 +03:00
Victor Petukhov
d730db094a
Don't look at raw type's arguments while enhancing super types
...
^KT-48172 Fixed
2021-08-20 13:10:45 +03:00
Dmitry Petrov
a3bb9dde45
JVM_IR KT-48295 don't upcast field receiver with super qualifier
2021-08-20 12:27:43 +03:00
pyos
858bd47c45
JVM_IR: use substituted return type when lowering inline references
...
#KT-48267 Fixed
2021-08-20 06:41:03 +02:00
Mads Ager
0b84de31b7
[JVM IR] Generate line number for exception store for finally.
...
^KT-46451 Fixed
2021-08-20 00:59:55 +02:00
Victor Petukhov
a1519b7b4e
Be able to infer a type variable based on several builder inference lambdas
...
^KT-48329 Fixed
2021-08-20 01:28:12 +03:00
Victor Petukhov
bf1e68a53f
Resolve calls using the builder inference despite the presence of the annotation if there are uninferred type variables
...
^KT-48194 Fixed
2021-08-20 01:28:11 +03:00
Victor Petukhov
55811c8851
Don't use builder inference if possible
...
The builder inference is running only if there are still uninferred type variables
^KT-48193 Fixed
2021-08-20 01:28:10 +03:00
Ilmir Usmanov
b5fa129540
Loosen tail-call optimization check for functions returning Unit
...
Do not check, that all Unit predecessors are POPs. This is safe for the
same reason, as it is safe to allow some of ARETURN sources not be
suspension point results.
To elaborate, before Unit, the stack is empty. This is because if there
are multiple paths to Unit and at least one of them comes from POP after
suspension point (we are interested in this case only - otherwise, the
call is not tail-call), in path from said POP the stack is empty, since
after suspension point the stack contains only one element. Thus, the
stack in other paths leading to Unit has to be empty, otherwise, merge
operation is not possible and ASM will report error during analysis.
Since the stack is empty in all paths, we can hoist Unit and following
ARETURN to predecessors, effectively turning path from suspension point
to tail-call.
2021-08-19 16:05:21 +00:00
Mads Ager
d33b70af1a
[JVM IR] Ensure an instruction for the line number for a break.
...
This ensures that the debugger always has a bytecode offset for
the line number of a break/continue so that you step there and
so that you can set breakpoints there.
The `nop` instruction is optimized out if it has no line number
information.
^KT-46450 Fixed
2021-08-19 15:40:44 +02:00
Andrey Zinovyev
894a446585
[FIR] Add missing messages for jvm diagnostics and fix some tests
2021-08-19 15:25:51 +03:00
Andrey Zinovyev
3b21759697
[FIR] SUPER_CALL_WITH_DEFAULT_PARAMETERS diagnostic
2021-08-19 15:25:50 +03:00
Andrey Zinovyev
24fbe0f072
[FIR] UPPER_BOUND_CANNOT_BE_ARRAY diagnostic
2021-08-19 15:25:49 +03:00
Andrey Zinovyev
4661656b8c
[FIR] JVM_PACKAGE_NAME* diagnostics
2021-08-19 15:25:47 +03:00
Andrey Zinovyev
ae558c0290
[FIR] Add DEPRECATED_JAVA_ANNOTATION diagnostic
2021-08-19 15:25:46 +03:00
Andrey Zinovyev
f9b601edae
[FIR] @JvmOverloads related checkers
2021-08-19 15:25:44 +03:00
Andrey Zinovyev
17ae69416c
[FIR] Add SYNCHRONIZED_* diagnostics
2021-08-19 15:25:43 +03:00
Andrey Zinovyev
7ba8e0d9cc
[FIR] Add VOLATILE_ON_VALUE/VOLATILE_ON_DELEGATE diagnostic
2021-08-19 15:25:43 +03:00
Andrey Zinovyev
f90b534c4c
[FIR] Add STRICTFP_ON_CLASS diagnostic
2021-08-19 15:25:41 +03:00
pyos
d3de0109ca
Add tests for KT-48180
2021-08-18 18:39:33 +02:00
pyos
47d0211370
FE: do not enhance ? in jspecify NullMarked scope
...
No clue whether this should be done for `@TypeQualifierDefault` since it
appears to have no specification whatsoever.
#KT-48262 Fixed
2021-08-18 16:41:00 +03:00
Andrey Zinovyev
1cd321a90f
[FIR] Add INAPPLICABLE_OPERATOR_MODIFIER diagnostic
2021-08-18 16:03:01 +03:00
Mikhael Bogdanov
8ab546ba51
[FIR]: Pass special origins for local functions (named and anonymous)
2021-08-18 09:58:27 +00:00
Mikhael Bogdanov
a5e59e09ee
Copy methods for lambdas to DefaultImpls without receiver transformation
...
#KT-48230 Fixed
2021-08-18 09:58:27 +00:00
pyos
6d7eb2bd21
Add test for KT-48230
2021-08-18 09:58:27 +00:00
Tianyu Geng
fb1eac0985
FIR: report SMARTCAST_IMPOSSIBLE on inherited alien properties [KT-48101]
2021-08-18 12:02:02 +03:00
Denis.Zharkov
a8077aebb0
FIR: Ignore suspicious test on StrictJavaNullabilityAssertions
...
^KT-48302 Open
2021-08-17 21:38:01 +03:00
Denis.Zharkov
753ba99b04
FIR: Support enhanced types when checking if Java type is primitive
2021-08-17 21:38:01 +03:00
Denis.Zharkov
a0553f4dfd
FIR: Do not build synthetic property named with first capital character
2021-08-17 21:38:01 +03:00
Denis.Zharkov
c3a327e118
FIR: Fix ambiguity on Int2IntMap in IC
2021-08-17 21:38:01 +03:00
Mikhail Glukhikh
1a5552bef8
FIR2IR: fix argument mapping for deserialized annotation #KT-48298 Fixed
2021-08-17 18:22:33 +03:00
Mikhail Glukhikh
6660c9b26b
FIR: add test repeating a problem with annotation mapping (KT-48298)
2021-08-17 18:22:33 +03:00
Andrey Zinovyev
ab158a53c3
[FIR] ASSIGNING_SINGLE_ELEMENT_TO_VARARG_IN_NAMED_FORM_ANNOTATION diag
2021-08-17 16:05:42 +03:00
Andrey Zinovyev
1cdbbad367
[FIR] ASSIGNING_SINGLE_ELEMENT_TO_VARARG_IN_NAMED_FORM_FUNCTION diag
2021-08-17 16:05:42 +03:00
Andrey Zinovyev
a17a61341b
[FIR] Fix false positive NON_INTERNAL_PUBLISHED_API on constructor val
...
#KT-48234 Fixed
2021-08-16 19:12:31 +03:00
Tianyu Geng
b77dc4136b
FIR checker: fix JAVA_TYPE_MISMATCH again
2021-08-16 16:54:22 +03:00
Tianyu Geng
64ebddcbc6
FIR checker: add convention check for ++ and +=, etc
2021-08-16 15:14:30 +03:00
Ilmir Usmanov
ebb340fe68
Do not just merge consequent LVT ranges, but also extend them
2021-08-13 23:12:10 +03:00
Ivan Kochurkin
2c1c24c042
[FIR] Implement WRONG_MODIFIER_CONTAINING_DECLARATION, DEPRECATED_MODIFIER_CONTAINING_DECLARATION
2021-08-13 18:32:28 +03:00
Ivan Kochurkin
cd6384eb20
[FIR] Fix handling of WRONG_MODIFIER_TARGET
...
Implement DEPRECATED_MODIFIER, DEPRECATED_MODIFIER_FOR_TARGET, REDUNDANT_MODIFIER_FOR_TARGET
2021-08-13 18:32:27 +03:00
Ivan Kochurkin
e85940a1ac
Unbind modifiers checks from psi
...
Use common code in FE and FIR in modifier checker, refactor
2021-08-13 18:32:26 +03:00
Dmitry Petrov
f8503ba1bf
JVM_IR KT-47984 minor avoid using @Deprecated function in tests
2021-08-13 18:08:55 +03:00
Dmitry Petrov
15c41b2610
JVM_IR KT-47984 add test for argument reordering
2021-08-13 18:08:52 +03:00
Dmitry Petrov
edd2ca775b
JVM_IR KT-47984 use stack size calculator from ASM
2021-08-13 18:08:52 +03:00
Dmitry Petrov
5096e8c5c4
JVM_IR KT-47984 transform inplace arguments before inlining
2021-08-13 18:08:49 +03:00