Simon Ogorodnik
05d486d55a
Fix receiver inconsistency when builder inference restriction disabled
...
In 154e53c701 update of
extensionReceiverArgument in resolvedCall was accidentally moved into
language feature dependant block
2022-09-05 10:07:41 +00:00
Nikolay Lunyak
3d9c77efa8
[FIR] Add DNN checks
...
Merge-request: KT-MR-7000
Merged-by: Nikolay Lunyak <lunyak.kolya@mail.ru >
2022-09-01 14:25:07 +00:00
Denis.Zharkov
490382b77f
Add test for KT-52782
...
It just demonstrates/fixate the current "broken" behavior in K1
that we unfortunately have and that is fixed in K2
2022-08-31 09:45:54 +00:00
Denis.Zharkov
db1bd4f232
Add test for KT-53124
...
The issue itself is supposed to be fixed after eb19d39cbf reverted
^KT-53124 Fixed
2022-08-30 15:56:31 +00:00
Denis.Zharkov
42c41a1916
Revert "[FE 1.0] Build captured type's supertypes in an alternative way: use own projection type as a first supertype, then supertypes from the corresponding type parameter's upper bounds"
...
This reverts commit eb19d39cbf .
2022-08-30 15:56:30 +00:00
Denis.Zharkov
f4a3ab877f
Add test for parsing issue KT-53719
...
^KT-53719 Related
2022-08-30 11:21:51 +00:00
Denis.Zharkov
3d7969ec8f
Revert "KT-35811: Type parameter angle brackets followed by equal sign are parsed incorrectly if whitespace is missing"
...
This reverts commit 2053363def .
^KT-35811 Open
2022-08-30 11:21:50 +00:00
Denis.Zharkov
211d662708
Revert "KT-8263: Conditional operators are not parsed correctly"
...
This reverts commit ec8da2033c .
For the reason for the revert see KT-53719
^KT-8263 Open
^KT-53719 Fixed
2022-08-30 11:21:50 +00:00
Simon Ogorodnik
154e53c701
K1: add diagnostic BUILDER_INFERENCE_STUB_RECEIVER
...
It's reported on receivers in extension function calls with stub type,
as such calls can shadow members of finalized stub types causing
change of resolve when corresponding type argument specified explicitly
It works by checking extension receiver during call resolution parts run
That way we can easily detect if we found an extension applicable to
stub receiver and report call diagnostic for it
KT-53739
2022-08-30 10:19:26 +00:00
Simon Ogorodnik
105358dcf6
K1: add diagnostic BUILDER_INFERENCE_MULTI_LAMBDA_RESTRICTION
...
Let's call builder lambdas (BL) a lambda that has non-fixed input type
projection at the moment of lambda arguments analysis, such lambdas
is a subject to be analyzed with builder inference
Due to bug in constraint system joining algorithm, currently system
of two or more such lambdas may lead to unsound type inference
Diagnostic added here should be reported in case when there are two
BL that shares a common constraint system, while not annotated with
@BuilderInference, as a protection against aforementioned bug
It's reported by ConstraintSystemCompleter when such situation has
occurred during builder inference phase, it is the same place that
decides wherever lambdas is subject to builder inference or not
KT-53740
2022-08-30 10:19:25 +00:00
Mikhail Glukhikh
f6ad6fb816
Add test for stub type receiver and for KT-53639
2022-08-30 10:19:24 +00:00
Mikhail Glukhikh
5cbecd276c
FE: add test reproducing builder inference problem from KT-53422
2022-08-30 10:19:23 +00:00
Artem Kobzar
dbda8dcad1
[K/JS] test: add @file:JsExport tests for each @JsExport test + auto-generate TypeScript export tests.
2022-08-26 09:51:59 +00:00
Ilya Gorbunov
6aff3c6d07
Update misc test data after introducing rangeUntil member #KT-52933
2022-08-24 22:22:54 +00:00
Rick Clephas
0a8cefc8a5
[FIR] Add NativeObjCRefinement checkers
2022-08-22 16:10:44 +02:00
Rick Clephas
203af3afdd
[FE 1.0] Add NativeObjCRefinement checkers
2022-08-22 16:10:44 +02:00
Mikhail Glukhikh
b78106e437
Don't report INFERRED_..._INTO_EMPTY_INTERSECTION with explicit arguments
2022-08-19 14:01:38 +00:00
Mikhail Glukhikh
a6b90fcb8e
Add a test with false positive "inferred into empty intersection"
...
Related to KT-50232
2022-08-19 14:01:37 +00:00
Mikhail Glukhikh
fb1c80a7c9
K2: discriminate synthetic 'Enum.entries' during resolve
2022-08-19 10:08:11 +00:00
Mikhail Glukhikh
68ca453467
K2: don't report REDECLARATION on Enum.entries
2022-08-19 10:08:10 +00:00
Mikhail Glukhikh
730de8fd7c
K1/K2: add test for enum class with 'entries' entry
2022-08-19 10:08:09 +00:00
Arseniy Terekhov
c0ab367281
[FIR] DeprecationProvider: fix test, remove FIR_IDE_IGNORE
2022-08-19 07:37:55 +00:00
Ilya Goncharov
2f75ea585e
[JS, Frontend] Not report warning with non-exportable super type
...
^KT-53539 fixed
2022-08-18 12:46:40 +00:00
Iven Krall
ec8da2033c
KT-8263: Conditional operators are not parsed correctly
2022-08-16 10:00:54 +00:00
Iven Krall
2053363def
KT-35811: Type parameter angle brackets followed by equal sign are parsed incorrectly if whitespace is missing
2022-08-16 10:00:53 +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
Vsevolod Tolstopyatov
0a5b3f1e13
[JVM IR] Adjust testData to address new static Enum.entries member
2022-08-12 09:35:26 +00:00
Mikhail Glukhikh
81e1131441
SubclassOptInRequired: add extra test about inheritance and superseding
2022-08-11 14:05:09 +00:00
Mikhail Glukhikh
80a9f22052
Add applicability checks & tests for SubclassOptInRequired
2022-08-11 14:05:09 +00:00
Mikhail Glukhikh
76aaecbdf0
Add/fix extra cases for #KT-41886 Fixed
2022-08-11 14:05:08 +00:00
Mikhail Glukhikh
7d3368da58
K2: report errors related to SubClassOptInRequired annotation
...
Related to KT-41886
2022-08-11 14:05:08 +00:00
Mikhail Glukhikh
c67c5cad27
K1: report errors related to SubClassOptInRequired annotation
...
Related to KT-41886
2022-08-11 14:05:07 +00:00
Pavel Mikhailovskii
8ba80b4b7b
KT-1436 Allow break/continue in inlined lambdas
2022-08-11 10:38:23 +00:00
Ilya Kirillov
56e6d5d6b9
[Analysis API] do not preresolve all FirDeclarations to TYPES in tests
...
Previously, we resolved all declaration to the TYPES phase to collect their sealed inheritors
and thus not really checking lazy resolution to TYPES.
Now sealed class inheritors collection happens in separate LLFirResolveSession
2022-08-10 22:49:13 +02:00
Mikhail Glukhikh
2598ecf23f
Revert "K2: fix internal visibility checks for overrides #KT-53197 Fixed"
...
This reverts commit 166965e559 .
2022-08-05 18:26:59 +02:00
Simon Ogorodnik
2a16fe1d0f
FIR: Fix overloading by type-arguments
...
In K1, upper bound violated causes candidate to have lower applicability
due to constraint errors, in K2 however constraint errors has to be
reported explicitly
2022-08-04 22:56:08 +02:00
Denis.Zharkov
11a26e540e
Revert "KT-35811: Type parameter angle brackets followed by equal sign are parsed incorrectly if whitespace is missing"
...
This reverts commit a2077f9063 .
2022-08-04 17:50:00 +02:00
Denis.Zharkov
2ae2a7e442
Revert "KT-8263: Conditional operators are not parsed correctly"
...
This reverts commit 85800b4f9f .
2022-08-04 17:49:42 +02:00
Iven Krall
85800b4f9f
KT-8263: Conditional operators are not parsed correctly
2022-08-04 11:24:09 +00:00
Iven Krall
a2077f9063
KT-35811: Type parameter angle brackets followed by equal sign are parsed incorrectly if whitespace is missing
2022-08-04 11:24:08 +00:00
Mikhail Glukhikh
166965e559
K2: fix internal visibility checks for overrides #KT-53197 Fixed
2022-08-03 07:52:14 +00:00
Victor Petukhov
8500ee08a8
[FE 1.0] Remove CONSTRAINT_SYSTEM_FOR_OVERLOAD_RESOLUTION analysis flag
...
The constraint system for the old type inference is going to be removed.
Also, `CONSTRAINT_SYSTEM_FOR_OVERLOAD_RESOLUTION` isn't used in the production
2022-08-02 10:29:38 +00:00
Ilmir Usmanov
b93c000250
Make suspend fun, where suspend is a function error in 1.9
...
instead of 1.8.
#KT-49264
2022-07-28 21:03:07 +02:00
Victor Petukhov
a61648651b
[FE 1.0] Use original receivers for NI while DSL scope violation checking
...
Original receivers are already use in the near place
^KT-46969 Fixed
2022-07-28 08:51:42 +00:00
Mikhail Glukhikh
8e9e8302f7
CandidateApplicability: merge INAPPLICABLE_MODIFIER into CONVENTION_ERROR
2022-07-27 15:29:43 +00:00
Mikhail Glukhikh
32a73968de
Stop tower resolve in K2 in more similar manner with K1
2022-07-27 15:29:41 +00:00
Ivan Kochurkin
80450042c7
[FIR] Ignore KtFakeSourceElementKind in FirRecursiveProblemChecker
2022-07-25 23:30:10 +02:00
Ivan Kochurkin
0af43757e3
[FIR] Implement FirNativeIdentifierChecker
...
* INVALID_CHARACTERS_NATIVE
2022-07-25 23:30:10 +02:00
Ivan Kochurkin
a44d5bf52f
[FIR] Implement FirNativeThreadLocalChecker
...
* INAPPLICABLE_THREAD_LOCAL
* INAPPLICABLE_THREAD_LOCAL_TOP_LEVEL
2022-07-25 23:30:10 +02:00