Victor Petukhov
fa7809cd80
[FE] Remove BuilderInference annotation from tests
2022-06-21 15:01:56 +02:00
Mikhail Glukhikh
065e852199
FIR: support more precise diagnostics about parameter names
...
#KT-52762 Fixed
2022-06-20 11:28:55 +00:00
Victor Petukhov
eb19d39cbf
[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
...
The original case provoked forking a constraint system which isn't supported in K1 (K2 only). If the captured type is recursive, then type parameter's upper bounds may break subtyping due to substitution the current captured type again, into a recursive type parameter.
Note that we already have special logic for recursive captured types. See `isTypeVariableAgainstStarProjectionForSelfType`.
^KT-52782 Fixed
2022-06-18 14:04:40 +02:00
Ivan Kochurkin
ffbb23661d
[FIR] Report UNSUPPORTED for default value in function type
2022-06-17 23:26:18 +00:00
Ivan Kochurkin
fd2b4fd497
[FIR] Fix false positive USELESS_CAST on stub types, ^KT-50293 Fixed
2022-06-17 23:26:18 +00:00
Ivan Kochurkin
9f69ea1786
[FIR] Add TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM diagnostics, ^KT-52327 Fixed
2022-06-17 23:26:16 +00:00
Ivan Kochurkin
c5648fd449
[FIR] Pass annotations to buildResolvedQualifierForClass
2022-06-17 23:26:16 +00:00
Ivan Kochurkin
1ac4d68433
[FIR] Initialize annotations for block for LightTree
2022-06-17 23:26:16 +00:00
Ivan Kochurkin
34b5ce21a1
[FIR] Fix WRONG_ANNOTATION_TARGET for annotation for block, ^KT-52175 Fixed
2022-06-17 23:26:15 +00:00
Jinseong Jeon
a2da690afd
Test: add java source files as JavaSourceRoot
...
so that those can be properly populated in SingleJavaRootsIndex
2022-06-16 22:14:17 +02:00
pyos
25f66b4e0e
FIR CFG: mark variables touched by not-in-place lambdas in all scopes
2022-06-15 20:05:49 +00:00
Mikhail Glukhikh
5ca730e38c
Add more tests for KT-49200
...
- exotic situation 1 field + 2 entries
- named import case
- exotic situation 2 fields + 1 entry
2022-06-15 17:20:00 +00:00
Mikhail Glukhikh
d44f180aa9
FE 1.0: deprecate resolve to property when enum entry is at same level
...
See also KT-52802
#KT-49200 Fixed
2022-06-15 17:19:59 +00:00
Mikhail Glukhikh
088f472117
Add test for KT-49200 deprecation
2022-06-15 17:19:58 +00:00
Dmitriy Novozhilov
12ce433bc2
[FE] Don't report cycle on annotation parameters if argument is vararg or array
...
^KT-52742 Fixed
^KT-47932
2022-06-15 09:55:27 +00:00
pyos
526e46cffc
FIR: fix some errors in local variable assignment analyzer
...
* wrong method was called from FirDataFlowAnalyzer.exitFunctionCall;
* map from function to affected properties should be keyed by symbol,
not FirFunction, as the latter may change;
* arguments of `return` and assignment statements should be visited,
as they may contain lambdas.
2022-06-10 09:43:48 +03:00
pyos
9968fa252a
FIR: fork flow on function entry, restore receivers on exit
...
^KT-52680 Fixed
2022-06-10 09:42:02 +03:00
Denis.Zharkov
3ba11711d2
Adjust test data after reverting fix for KT-35811
...
(see previous commit)
^KT-52684 Fixed
2022-06-09 15:44:36 +00:00
Denis.Zharkov
9caa60d389
Revert "KT-35811: Type parameter angle brackets followed by equal sign are parsed incorrectly if whitespace is missing"
...
This reverts commit ba5c85d6
^KT-52684 Related
2022-06-09 15:44:36 +00:00
Denis.Zharkov
67f9025f9e
Add test data for parsing of complicated <..> and <..>= combinations
...
^KT-52684 Related
^KT-8263 Related
2022-06-09 15:44:35 +00:00
Mikhail Zarechenskiy
372879b8e7
[FE 1.0] Don't fail with exception on unresolved type with type argument
...
^KT-50223 Fixed
2022-06-09 08:03:35 +00:00
Roman Golyshev
8fca9f41eb
[FIR IDE] Correctly check declarations' modalities in SamResolver
...
Modality might be null before the declaration itself is resolved to
`STATUS`
^KT-52667 Fixed
2022-06-07 21:14:24 +00:00
Dmitriy Novozhilov
67589b1b09
[FIR] Don't report TAILREC_ON_VIRTUAL_MEMBER_ERROR on private declarations
2022-06-07 14:12:13 +00:00
Denis.Zharkov
41dd00c241
FIR: Use outer scope for annotation arguments resolution
...
^KT-41980 Fixed
2022-06-06 15:18:05 +03:00
Denis.Zharkov
eae673233b
FIR: Rework FirRegularTowerDataContexts
...
- Get rid of SPECIAL mode (just left REGULAR and class-related instead)
- Clear naming
- Restore contexts after lambda/callable reference are processed
The test has been failing before this change because after
callable reference is resolved, its tower data context has been left
erroneously in the SPECIAL-related entry
2022-06-06 09:39:29 +00:00
Nikolay Lunyak
62ec19bda2
[FIR JS] Fix current tests
2022-06-02 13:47:33 +00:00
Nikolay Lunyak
be9e97d044
[FIR] Introduce ConeDynamicType
2022-06-02 13:47:23 +00:00
Denis.Zharkov
461d91a10e
FIR: Rework checking dispatch receivers applicability
...
Using `ownerLookupTag` might be wrong in case of private constuctors
of inner classes: their owner is an Inner class, but expected
dispach receiver is Outer
2022-06-01 16:02:31 +00:00
Denis.Zharkov
67e6687e89
FIR: Fix FP error on a call to constructor of a private inner class
...
Do not check dispatch receiver applicability when checking visibility
for containing class of a callee constructor
2022-06-01 16:02:30 +00:00
Denis.Zharkov
c1904004c4
FIR: Fix case when smartcast receiver is used for call to private method
...
^KT-54432 Fixed
2022-06-01 16:02:30 +00:00
Denis.Zharkov
ccc32b4e3b
FIR: Refine visibility check for private methods defined in a class
...
- use-site should be contained within the class that owns callee symbol
- class-representative of dispatch receiver value
should be exactly the same as a container class of a callee (not its subtype)
2022-06-01 16:02:29 +00:00
Victor Petukhov
b472ccd358
[FE 1.0] Introduce deprecation of inferred type variable into a declared upper bound within a builder inference call
2022-05-31 14:13:29 +00:00
Victor Petukhov
848075192c
[FE 1.0] Don't use BuilderInferenceSubstitutionConstraintPosition for declared upper bound constraint with no substituted upper bound
...
It leads to further infer type variable into those upper bounds which is forbidden
Substituted upper bounds is ok because specific substituted types came from constraints of other proper positions, or if specific substituted type is from declared upper bound too, then there should be another declared upper bound with no substitution
^KT-51464 Fixed
^KT-47986 Fixed
2022-05-31 14:13:28 +00:00
Victor Petukhov
f5f398788d
[FE 1.0] Add checker to report "unsupported range until operator" on declaration itself
2022-05-31 08:42:57 +00:00
Victor Petukhov
c266303197
[FE 1.0] Introduce "range until operator" language feature, and report errors on its usages till 1.8
2022-05-31 08:42:57 +00:00
Victor Petukhov
0b25ce4de9
[FE] Support resolve of until operator to rangeUntil
...
^KT-52420 Fixed
2022-05-31 08:42:55 +00:00
Ivan Kochurkin
feb3f41108
[FIR] Fix resolve inside lambda
...
The lambda is passed to extension function with type parameters
that defined inside this lambda
^KT-52197
^KT-52190 Fixed
2022-05-29 23:41:25 +03:00
Victor Petukhov
867ad24c86
[FE] Show causing types in the INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION diagnostic
2022-05-27 15:14:24 +00:00
Victor Petukhov
6a34b184ac
[FE] Introduce warnings on possible empty intersection types, and improve errors reporting in general
...
^KT-52361 Fixed
2022-05-27 15:14:23 +00:00
Victor Petukhov
02a430875f
[FE 1.0] Don't fail candidates which were marked with compatibility resolve previously
...
^KT-52431 Fixed
^KT-52393 Fixed
2022-05-27 15:14:22 +00:00
Mikhail Glukhikh
d7ca7e17c9
FE 10: wrap ext. receiver inlining prohibition in the language feature
...
See KT-52502
2022-05-27 14:55:08 +00:00
pyos
fad35b95d4
FE: forbid extension calls on inline functional parameters
...
Extension receivers are currently implicitly noinline, and changing that
would require modifying the syntax to allow marking them noinline or
crossinline.
^KT-5837 Open
^KT-25787 Fixed
^KT-47965 Fixed
^KT-50107 Fixed
^KT-52403 Fixed
2022-05-27 14:55:07 +00:00
Victor Petukhov
efa267bf86
[FE] Fix tests after rebase
2022-05-27 13:56:34 +00:00
Victor Petukhov
0199c76c06
[FE 1.0] Check callable reference return type safety during resolution
...
^KT-51844
^KT-52503 Fixed
2022-05-27 13:56:34 +00:00
Victor Petukhov
51551998c7
Revert "[FE 1.0] Take care callable reference candidates with recursive candidate return type"
...
This reverts commit d04beaa8bb49c99ceb993f3f7b32169c393b39f4.
2022-05-27 13:56:33 +00:00
Victor Petukhov
06deaed3d5
Add test for KT-50498
2022-05-27 13:56:33 +00:00
Victor Petukhov
c25e07119c
[FE 1.0] Skip improper constraints while determining READY_FOR_FIXATION_DECLARED_UPPER_BOUND_WITH_SELF_TYPES type variable readiness
...
^KT-51148 Fixed
2022-05-27 13:56:32 +00:00
Mikhail Glukhikh
7c89f0188a
FIR: resolve conflicts around SAM calls properly
2022-05-24 12:29:27 +00:00
Victor Petukhov
7c38f99cbf
[FE 1.0] Improve error message for disabled "Unit conversions" feature
...
^KT-49394 Fixed
2022-05-23 12:36:25 +02:00
Victor Petukhov
bbf52e8b90
[FE 1.0] Make "Unit conversions" accessible experimental feature
2022-05-23 12:36:16 +02:00