Dmitriy Novozhilov
7af43176ce
[FIR] Add optin on API of updating type of receiver values. KT-54708
2022-11-03 08:30:09 +00:00
Dmitriy Novozhilov
e6ce008415
[FIR] Ignore leaked internal types because of KT-54568
2022-11-03 08:30:09 +00:00
Dmitriy Novozhilov
22c21ca4df
[FIR] Replace uninferred type variables and stub types during delegate inference
2022-11-03 08:30:07 +00:00
pyos
7787638737
FIR: fix substitution of anonymous type's supertype again
...
^KT-51418 Fixed
2022-11-01 15:28:41 +00:00
Denis.Zharkov
f95bfccf59
K1: Prolong deprecation for KT-46727
...
The language committee ticket has not yet been prepared
2022-11-01 12:03:26 +00:00
Denis.Zharkov
82100a414f
FIR: Preserve K1 behavior for rawTypeValue ?: nothingTypedValue
...
It's been approximated to the non-raw version back then
^KT-54526 Fixed
2022-10-31 14:28:56 +00:00
Denis.Zharkov
52eb535a7d
FIR: Use platform specific overridability rules for platform members
...
^KT-54570 Fixed
2022-10-31 14:28:55 +00:00
Denis.Zharkov
1e368bcd86
FIR: Allow to skip specifying type arguments for members from raw type
...
^KT-54666 Fixed
^KT-54526 Related
2022-10-31 14:28:54 +00:00
Denis.Zharkov
c0e0900344
FIR: Preserve K1 behavior for synthetic properties on raw type
...
^KT-54502 Fixed
2022-10-31 14:28:53 +00:00
Denis.Zharkov
7b15b28ee2
FIR: Properly support raw types in type parameter upper bounds
...
^KT-49345 Fixed
2022-10-31 14:28:52 +00:00
Denis.Zharkov
5cc31114cd
FIR: Support special scope for raw types
...
^KT-46369 Fixed
^KT-41794 Fixed
^KT-49351 Fixed
2022-10-31 14:28:50 +00:00
Pavel Mikhailovskii
1215ae0fe7
KT-1436 Nicer compiler errors when the feature isn't supported
2022-10-31 13:49:57 +00:00
Alexey Belkov
2036b65b78
K1: render receiver DNN type as parenthesized
...
^KTIJ-20849
2022-10-28 12:52:22 +04:00
Dmitriy Novozhilov
6bc952adff
[Test] Add test for KT-54663
2022-10-27 11:08:56 +00:00
Dmitriy Novozhilov
b7da00744b
[FIR] Consider overridden getter for setter function for synthetic property
...
^KT-54662 Fixed
2022-10-27 11:08:55 +00:00
Dmitriy Novozhilov
1927369ae9
[Test] Add test for KT-54662
2022-10-27 11:08:55 +00:00
Mikhail Glukhikh
50cd560d09
K1: add more tests for BI assignment checker, fix corner cases
...
Related to KT-54004
2022-10-26 09:21:49 +00:00
Mikhail Glukhikh
8e48636b29
K1: don't report assignment TYPE_MISMATCH in BI under feature ON
...
Related to KT-54004
2022-10-26 09:21:48 +00:00
pyos
6c6d653e85
FE: don't lose annotations on Java primitive arrays
...
but only use them to enhance for warnings for now.
^KT-48861 Fixed
2022-10-26 09:33:40 +02:00
Mikhail Glukhikh
80fa765333
K1: introduce synthetic assignment checker with deprecation for KT-54305
...
#KT-54305 Fixed
Related to KT-54309
2022-10-25 12:33:09 +00:00
Mikhail Glukhikh
7bd512fbb3
FE: add test for KT-54305
2022-10-25 12:33:08 +00:00
Ivan Kylchik
5b16b2c71e
Properly verify args in string concatenation expression for interpreter
...
If string concatenation contains object value, then this argument
will not have explicit toString call. We must find and check toString
method manually.
#KT-54615
2022-10-24 13:14:16 +00:00
Artem Kobzar
14e4febb05
[K/JS] Exclude default from the regular reserved keywords to give ability to export declarations with default export ^KT-54480 Fixed
...
fix(KT-54480): exclude default from the regular reserved keywords to give ability to export intities with default export.
Merge-request: KT-MR-7459
Merged-by: Artem Kobzar <Artem.Kobzar@jetbrains.com >
2022-10-24 10:12:30 +00:00
Mikhail Glukhikh
5347c3c7cc
FE: add test for KT-53408 to have stable behavior here
2022-10-20 13:27:04 +02:00
Dmitriy Novozhilov
248c45acb3
[FIR] Properly set resolvedToCompanionObject field for lhs of GetClassCall
...
^KT-54209 Fixed
2022-10-19 11:09:32 +00:00
Dmitriy Novozhilov
55aae5325c
[Test] Add test for KT-54209
2022-10-19 11:09:32 +00:00
Dmitriy Novozhilov
64e21af03b
[FIR] Consider containing class during visibility check of static function call
...
^KT-53441
2022-10-19 11:09:32 +00:00
Dmitriy Novozhilov
5665139865
[Test] Add test for KT-54125
2022-10-19 11:09:31 +00:00
Mikhail Glukhikh
69c883ecee
FIR: use FIR_IDENTICAL instead of FIR_IGNORE for diags with BE tests
2022-10-17 12:46:25 +00:00
Mikhail Glukhikh
1826d9b332
K2: add & fix tests for JVM BE diagnostics
2022-10-17 12:46:24 +00:00
pyos
ee921412fc
FIR: intersect return types of declarations in intersection scopes
...
^KT-54378 Fixed
2022-10-14 08:25:26 +00:00
Ivan Kochurkin
1deb253bac
[FIR] Run FirSupertypesChecker for anonymous objects, ^KT-54300 Fixed
2022-10-13 18:11:49 +00:00
Ivan Kochurkin
9c6df5313a
[FIR] Fix substitution of anonymous type's supertypes, ^KT-51418 Fixed
2022-10-13 18:11:47 +00:00
vladislav.grechko
817afcd4af
KT-MR-7307 review fixes
2022-10-13 15:19:10 +00:00
Denis.Zharkov
31ba1f1534
Add deprecation warning for false-negative TYPE_MISMATCH
...
See KT-49404 for details
In K1, within SubstitutingScope we approximate almost all the types
containing captured types are being approximated to either a lower or
an upper bound.
While mostly, it's being done correctly there are some problems with
approximations for flexible types
So, the parameter's type of A<in Any>::foo is approximated to Inv<in Any!>,
thus allowing to use Inv<*>, while it's obviously unsound.
NB: For the similar example, in B, there are regular TYPE_MISMATCH
because parameter for B<in Any>::foo is approximated to Nothing
Also, it's important to say that
- in K2 everything works because we don't use type approximation there
- approximation algorithm that works incorrectly is only being used in K1
^KT-54332 Fixed
2022-10-12 20:53:02 +00:00
pyos
2ec264cfa2
FIR CFG: filter out variables declared inside lambdas more eagerly
2022-10-12 11:56:02 +00:00
Mikhail Glukhikh
0080f16cc2
K1: report TYPE_MISMATCH for incorrect assignments in builder
...
#KT-54004 Fixed
2022-10-12 08:21:13 +00:00
Mikhail Glukhikh
0940707fd4
FE: add reproducer for KT-54004
2022-10-12 08:21:12 +00:00
Pavel Mikhailovskii
f4bdf54601
KT-8575 Fix warnings for Java synthetic properties
2022-10-10 22:03:58 +00:00
vladislav.grechko
e0c8142106
Support of custom 'equals' and 'hashCode' in inline classes
...
'equals' from any made available for overriding in inline classes
'typed' equals made available for definition in inline classes
'typed' equals definition made compulsory if 'untyped' is overridden
'operator' keyword is allowed in 'typed' equals definition
^KT-24874: Fixed
2022-10-10 16:52:34 +00:00
Nikolay Lunyak
b6f950ed75
[FIR][FE 1.0] KT-47933: Warn about redundant @Repeatable
...
Merge-request: KT-MR-7318
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com >
2022-10-07 13:33:49 +00:00
pyos
46d7b66e59
FIR CFG: remove liveness analysis from lambda reassignment analyzer
...
Handling try/catch and break/continue is too hard here, and failing to
do that properly can create incorrect smartcast. Better be conservative
and assume all code is live.
2022-10-07 08:56:05 +00:00
pyos
3160470201
Minor: change a test to be more precise
2022-10-07 08:56:04 +00:00
pyos
a9ae1fcdf9
FIR CFG: handle loops and try/catch when analyzing smartcasts in lambdas
...
See KT-50092
2022-10-07 08:56:04 +00:00
pyos
d054617b8e
FIR CFG: handle reassignments with explicit receivers more precisely
...
When a looping control structure has a reassignment with an explicit
receiver, we don't need to erase its smartcast info as it has to be a
non-local property and is thus automatically unstable anyway. However,
we should still do that upon reaching the assignment itself for slightly
more precise error messages (as the property not just "could be"
reassigned, but *has been* reassigned already).
2022-10-07 08:56:03 +00:00
pyos
77c2601382
Add a test where a local variable has the same name as a property
2022-10-07 08:56:02 +00:00
Nikolay Lunyak
e2fdb352f1
[FIR] KT-42962: Ensure the issue is not present in K2
...
Merge-request: KT-MR-7288
Merged-by: Nikolay Lunyak <nikolay.lunyak@jetbrains.com >
2022-10-04 12:27:17 +00:00
Dmitriy Novozhilov
c0ad67c4f9
[FIR] Generate java declarations for record components of java records
...
^KT-53964 Fixed
2022-10-03 15:48:17 +03:00
Nikolay Lunyak
fcd3e4f4c5
[FIR JS] KT-51740: Alter positioning of NO_VALUE_FOR_PARAMETER
2022-09-30 21:39:20 +03:00
Ilya Kirillov
556b7894d5
[Low Level FIR] do not search for declarations from kotlin. package in source modules
2022-09-30 12:15:49 +02:00