Ilya Gorbunov
e2d96da396
Introduce experimental kotlin.concurrent.Volatile annotation KT-55268, KT-55609
...
Use this annotation in tests to ensure it works the same at least on JVM
2022-12-23 19:07:30 +01:00
Dmitriy Novozhilov
02e327277e
[FIR] Report VAL_REASSIGNMENT on assign to non-local vals
...
In this commit reporting on member properties in init section of class
is not supported (see KT-55528)
^KT-55493 Fixed
2022-12-20 08:12:09 +00:00
Dmitriy Novozhilov
b174bb8844
[FIR] Update testdata after introducing FirResolvedErrorReference
2022-12-15 12:12:19 +00:00
Steven Schäfer
6af616d3c3
FIR: make declarations marked with 'override' implicitly open
...
#KT-52236 Fixed
2022-12-14 21:46:41 +00:00
Ilya Kirillov
644d1bf0d0
[FIR] ignore tests which fail because of resolve contracts violation
2022-12-12 16:21:07 +00:00
Denis.Zharkov
cd0d6d2773
Adjust test data for postponing ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated
...
^KT-55357 Related
^KT-36770 Related
2022-12-12 11:39:04 +00:00
pyos
402ea98e02
FIR DFA: align FirLocalVariableAssignmentAnalyzer with the graph builder
...
I.e. maintain a set of seen lambdas where each marked as either "data
flow only" or "both data and control flow". The latter are truly
parallel with the function being analyzed, while the former have
technically already terminated, we just don't know the types inside them
because they may not have been analyzed yet.
2022-12-08 10:19:34 +00:00
pyos
0d46dfc1ba
FIR: fix substitution of type arguments in SAM type aliases
...
^KT-54730 Fixed
2022-12-07 22:09:20 +00:00
Dmitriy Novozhilov
ac7fddaad5
[FE] Always infer upper types to intersection types in K2...
...
...and always use old algorithm for K1
^KT-51221
2022-11-29 12:25:44 +00:00
Evgeniy.Zhelenskiy
002f6bd34a
[FIR] Fix JvmName annotation diagnostics
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-55143
2022-11-25 16:30:22 +01:00
Mikhail Glukhikh
3e22f6c052
K2 opt-in: fix reporting of WasExperimental-bound errors
2022-11-23 12:00:08 +00:00
Mikhail Glukhikh
f62bdb0e3d
K1 opt-in: fix message/behavior for future error with WasExperimental
2022-11-23 12:00:08 +00:00
Mikhail Glukhikh
8ddc535caf
Opt-in: forbid/deprecate constructor call with default arguments under marker
...
#KT-55074 Fixed
2022-11-23 12:00:07 +00:00
Mikhail Glukhikh
b92ce68f32
K2 opt-in: restore marker annotation check for constructors
2022-11-23 12:00:07 +00:00
Mikhail Glukhikh
a77750a257
K2 opt-in: drop redundant recursive check for overridables
2022-11-23 12:00:06 +00:00
Mikhail Glukhikh
73cb4d1a6e
K2 opt-in: don't take sub./int. override parent classes into account
...
#KT-54823 Fixed
2022-11-23 12:00:04 +00:00
Dmitriy Novozhilov
eb8ce449e3
[FIR] Don't lose flexible types during capturing from expression
2022-11-22 15:46:22 +00:00
Dmitriy Novozhilov
9b7b517f43
[FIR] Properly resolve declarations inside contract calls on CONTRACT phase
2022-11-22 15:46:21 +00:00
Dmitriy Novozhilov
01c6c7dc59
[FIR] Properly approximate return type of callable declarations
...
- approximate intersection types in all non-local declarations
- approximate local types in non-private non-local declarations
2022-11-22 15:46:20 +00:00
Dmitriy Novozhilov
991d8c18aa
[FIR] Fix incorrect inference of return type of anonymous functions
...
Also remove incorrect subtype check checkers
Test unsafeVarianceInAliasedFunctionalType.kt started to fail because
of KT-54894. This bug existed before, changes from this commit just
unhided it (previously it was hidden because incorrect subtype check
in `isSubtypeForTypeMismatch` which is used by FirFunctionReturnTypeMismatchChecker
2022-11-22 15:46:19 +00:00
Dmitriy Novozhilov
0e84bf2053
[FIR] Don't report ARGUMENT_TYPE_MISMATCH on error types
2022-11-22 15:46:19 +00:00
Dmitriy Novozhilov
07567d6748
[FIR] Always fix type variables with UNKNOWN direction
2022-11-22 15:46:18 +00:00
Dmitriy Novozhilov
1b27d60307
[FIR] Support @OnlyInputTypes annotation
...
^KT-54807 Fixed
2022-11-22 15:46:17 +00:00
pyos
ae31275f73
FIR DFA: unwrap transparent expressions in more places
2022-11-22 15:44:35 +00:00
pyos
5b08c300f4
FIR DFA: don't assume != true/false => == false/true
...
This also fixes some returnsNotNull contracts because the old code added
an implication that `== true` => `!= null` then promptly removed any
statement that this could've affected if the argument was a synthetic
variable.
^KT-26612 tag fixed-in-k2
2022-11-22 15:44:34 +00:00
pyos
edaca59d83
FIR DFA: fork flow everywhere
...
In theory, forking persistent flows should be cheap because of object
reuse, so the proposal here is to start from scratch and prove
redundancy of forks on a case-by-case basis. Something something better
safe than sorry.
^KT-28333 tag fixed-in-k2
^KT-28489 tag fixed-in-k2
2022-11-22 15:44:32 +00:00
pyos
6ee6d019ee
FIR DFA: align return-implies checker closer to smartcasts
2022-11-22 15:44:31 +00:00
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
22c21ca4df
[FIR] Replace uninferred type variables and stub types during delegate inference
2022-11-03 08:30:07 +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
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
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
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
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
Mikhail Glukhikh
591992dc12
K1: mute failing test with slow assertions
...
Note: in this test, we create a flexible type from two captured types
during substitution, which provokes exception from
FlexibleTypeImpl.runAssertions() (they are run only in test mode)
Related to KT-54198
2022-09-28 15:29:44 +00:00
Mikhail Glukhikh
e9bb0f4fda
Resolution: extract projections from captured flexible type properly
...
#KT-54100 Fixed
Related to KT-54196, KT-54198
2022-09-28 15:29:43 +00:00
Mikhail Glukhikh
a4b2a8c4ea
AbstractTypeChecker: fix special case with CapturedType as self type argument
...
#KT-53908 Fixed
May fix also KT-53271
2022-09-19 19:12:21 +00:00
Mikhail Glukhikh
6ab516a7e5
FE: add test for KT-53908
2022-09-19 19:12:20 +00:00
Ilya Gorbunov
e51d25fb60
Fix test data: use also stdlib where stdlib-jdk8 was required
...
#KT-51907
2022-09-15 15:38:32 +00:00
Mikhail Glukhikh
fb9b1ad0dc
K1: implement warning for upper bound violated in type alias constructors
...
Partially implements KT-47473
2022-09-15 08:51:46 +00:00
Mikhail Glukhikh
8c475750b1
FE: add test for KT-47473
2022-09-15 08:51:45 +00:00
Ivan Kochurkin
6c4dafc23c
Disable IgnoreNullabilityForErasedValueParameters for indefinite time, ^KT-53751 Fixed
2022-09-13 16:45:06 +00:00
Mikhail Glukhikh
b78106e437
Don't report INFERRED_..._INTO_EMPTY_INTERSECTION with explicit arguments
2022-08-19 14:01:38 +00:00
Arseniy Terekhov
c0ab367281
[FIR] DeprecationProvider: fix test, remove FIR_IDE_IGNORE
2022-08-19 07:37:55 +00:00
Vsevolod Tolstopyatov
22e26d0756
Move EnumEntries LVS to 1.9
...
* Also cleanup tests to avoid using obsolete WITH_RUNTIME
2022-08-12 09:35:32 +00:00
Mikhail Glukhikh
7333589663
K1/K2: add Enum.entries unconditionally and filter them out in tower
...
Before this commit, we added Enum.entries only in case when
LanguageFeature.EnumEntries was ON (with an exception in K1/Java case).
In this commit we add Enum.entries unconditionally, and in case
the language feature is OFF we filter them out during tower resolve.
2022-08-12 09:35:27 +00:00
Mikhail Glukhikh
81e1131441
SubclassOptInRequired: add extra test about inheritance and superseding
2022-08-11 14:05:09 +00:00