Victor Petukhov
8e2b90b5db
[FE 1.0] Don't report CAST_NEVER_SUCCEEDS on stub types
...
^KT-49829 Fixed
2022-01-11 18:34:41 +03:00
Victor Petukhov
37d163d417
[FE 1.0] Don't lose diagnostics during lambda analysis at the overload resolution by return type stage
...
^KT-49658 Fixed
2022-01-11 18:07:05 +03:00
Roman Golyshev
5964d8c566
KTIJ-20618 FIR IDE: Enforce resolved type bounds in ConeTypeContext.kt
...
When lazy resolve is involved, type bounds can be in an unresolved
state (e.g. `FirUserTypeRef` instead of `FirResolvedTypeRef`). To
enforce the resolve, we use `resolvedTypeBounds` where it might be
important
^KTIJ-20618 Fixed
2022-01-11 13:56:17 +00:00
Denis.Zharkov
9be4f818f4
FIR: Weaken some UPPER_BOUND_VIOLATED restrictions
...
See test data at starProjectionInsteadOutCaptured.kt
^KT-49412 Fixed
^KT-50230 Relates
^KT-48044 Fixed
2022-01-11 16:27:06 +03:00
Denis.Zharkov
b193e708d3
FIR: Refactor checkUpperBoundViolated
...
There just should be a different facades for cases
A<T1, T2> and foo<T1, T2>()
Test data has changed for type alias constructors since previously,
it was working by mistake because of assumption that type alias arguments
are linearly mapped to the type parameters of the corresponding constructors
^KT-50703 Open
2022-01-11 16:27:03 +03:00
Ivan Kylchik
6fc56477bf
Drop all tests that disable features for language version less than 3
2021-12-28 20:08:56 +03:00
Alexander Udalov
92c80873ba
Revert "JVM: remove support for disabling NoConstantValueAttributeForNonConstVals"
...
This is a partial revert of e857966edb .
Specifically, behavior is restored in the old backend, which will allow
to support language version 1.3, where this language feature was not
enabled yet. There are no changes in the JVM IR backend, because to
enable JVM IR with LV 1.3, you need to pass the compiler argument
`-Xuse-ir` which is not stable and we don't guarantee anything about it.
#KT-50251
2021-12-28 13:21:18 +01:00
Mikhail Glukhikh
61e0375900
Drop YIELD_IS_RESERVED diagnostic in 1.7.0 #KT-27750 Fixed
2021-12-23 17:45:50 +03:00
Mikhail Glukhikh
0739925869
Drop QUALIFIED_SUPERTYPE_EXTENDED_BY_OTHER_SUPERTYPE diagnostic in 1.7.0
...
#KT-49016 Fixed
2021-12-23 17:45:49 +03:00
Mikhail Glukhikh
f53cd22253
FIR: copy builder inference session when creating snapshot for locals
...
This commit fixes one builder inference case from KT-49925
2021-12-23 17:28:01 +03:00
Mikhail Glukhikh
3f02309dad
FIR: add example 2 from KT-49925 (fails yet)
2021-12-23 17:27:59 +03:00
Mikhail Glukhikh
dde4c46df7
FIR: add original test from KT-49925 (passes)
2021-12-23 17:27:56 +03:00
Mikhail Glukhikh
6342eb96c0
FIR: replace constraint with NotFixedTypeToVariableSubstitutor properly
...
In this commit we add nullability to upper type of a substituted
constraint in the situation like (Stub<_L> <: SomeType),
where _L is fixed to nullable Stub<_L>?.
We have to change this constraint to L <: SomeType? and not to
L <: SomeType as before, otherwise nullability become broken
(direct substitution of Stub<_L> to L is illegal here).
#KT-50470 Fixed
2021-12-22 22:21:43 +03:00
Mikhail Glukhikh
e872cfa69a
FIR: add test repeating problem from KT-50470
2021-12-22 22:21:39 +03:00
Ivan Kochurkin
ee7e04b28e
[FIR] Ignore smartcast for non-final members from Java, ^KT-50219 Fixed
2021-12-21 19:10:40 +03:00
Ivan Kochurkin
c5a03d0573
[FIR] Remove dependent data flow variables after receiver reassignment
2021-12-21 19:10:37 +03:00
Dmitriy Novozhilov
8a58e98530
[FE 1.0] Support proper DUPLICATE_LABEL_IN_WHEN reporting for deprecated complex boolean expressions
...
^KT-50385
^KT-39883
2021-12-21 16:36:20 +03:00
Dmitriy Novozhilov
eb753eac83
[FE 1.0] Report DUPLICATE_LABEL_IN_WHEN on proper branches
...
^KT-50385 Fixed
2021-12-21 16:36:19 +03:00
Mikhail Glukhikh
1938438fa1
FIR: save/restore tower data contexts during resolve jumps
...
#KT-50278 Fixed
2021-12-21 10:45:36 +00:00
Mikhail Glukhikh
25f30cb3a9
FIR: add resolve test for potential local scope problems
2021-12-21 10:45:34 +00:00
Anastasia.Shadrina
ea33da3a8d
[FE] Fix: do not report ambiguous label if label map is empty
2021-12-21 10:41:46 +03:00
Vyacheslav Gerasimov
f7a9065b75
Build: Use intellij maven repo instead of downloaded IDEA
...
#KTI-82
2021-12-16 21:48:23 +03:00
Vyacheslav Gerasimov
bc2f0936bd
Build: Rename commonDep -> commonDependency
2021-12-16 21:48:19 +03:00
Simon Ogorodnik
bb13583862
FIR: Rename stub type for builder inference
2021-12-15 22:23:13 +03:00
Simon Ogorodnik
26b158bded
FIR: Update test-data (Delegate inference)
2021-12-15 22:23:12 +03:00
Mikhail Glukhikh
a4df0aaa7d
FIR: Add test
2021-12-15 22:23:08 +03:00
Mikhail Glukhikh
2338281889
FIR: Add test for get class + let in delegation
2021-12-15 22:23:07 +03:00
Simon Ogorodnik
11ec23e5dc
FIR: Make synthetic type variables fix to self-stub type if no info
2021-12-15 22:23:05 +03:00
Simon Ogorodnik
52145e0623
FIR: Respect nullability when substituting stub types
2021-12-15 22:23:02 +03:00
Mikhail Glukhikh
40a2837b4c
FIR: Update test-data (Delegate inference)
2021-12-15 22:23:02 +03:00
Simon Ogorodnik
b45b624945
FIR: Fix integrating DeclaredUpperBound positions in builder inference
2021-12-15 22:23:01 +03:00
Simon Ogorodnik
2e69f7732c
FIR: Add more tests for delegate inference
2021-12-15 22:22:57 +03:00
Mikhail Glukhikh
4d9e919f7e
FIR: preliminary refactoring of delegate resolve
2021-12-15 22:22:51 +03:00
Mikhail Glukhikh
a19495cb26
FIR: add test with resolve problem in delegate
2021-12-15 22:22:50 +03:00
Anastasia.Shadrina
343a860553
[FE] Make OverloadChecker take CR into account
2021-12-14 15:19:42 +03:00
Mikhail Glukhikh
df50a8141f
FirCallCompleter: unwrap definitely not-null type properly
...
#KT-50180 Fixed
2021-12-13 16:24:59 +03:00
Ivan Kochurkin
f68c8f8f01
[FIR] Fix visibility issues with private members within inner and anonymous scopes ^KT-49992 Fixed
2021-12-09 12:31:24 +00:00
Dmitry Petrov
1fd0dec5e7
FE KT-47939 callable references to functional interface constructors
...
Allow callable references to Kotlin 'fun interface' constructors.
Prohibit callable references to Java SAM interface constructors.
2021-12-08 14:12:33 +03:00
Ilmir Usmanov
bb53ba4a2e
Enable delegation by interface for inline classes in old FE
...
#KT-27435
2021-12-08 00:11:54 +01:00
Victor Petukhov
7475d26902
[FE 1.0] Implement checker to detect changed resolve for progressions and ranges due to the start of implementing Collection<T>
...
^KT-49276 Fixed
2021-12-07 18:48:27 +03:00
Mikhael Bogdanov
a2395ec8bb
Additional diagnostics for @JvmDefaultWithCompatibility
2021-12-06 14:20:25 +01:00
Anastasiya Shadrina
4d3035e2f7
[Parser] Do not support local contextual declarations
2021-12-03 20:22:17 +03:00
Dmitriy Novozhilov
1f0b62b25f
[FIR] Add smartcasts from == if equals is from Any
...
^KT-49127 Fixed
2021-12-03 14:19:25 +03:00
Anastasiya Shadrina
2b30c1eb5d
[FE] Do not change original semantics in LabelResolver
2021-12-02 20:25:00 +03:00
Anastasiya Shadrina
a70036c945
[Tests] Add a test with type parameter as a context receiver
2021-12-02 20:24:58 +03:00
Anastasiya Shadrina
752bc299f1
[FE, Tests] Passing context(A, B) where context(B, A) expected
2021-12-02 20:24:56 +03:00
Anastasiya Shadrina
ac27fda965
[FE] Report ambiguity when label can refer to multiple receivers
2021-12-02 20:24:44 +03:00
Anastasiya Shadrina
7ab9b68ad5
[FE] Move type-related checks to TypeResolver
2021-12-02 20:24:41 +03:00
Anastasiya Shadrina
3a9cf042d7
[Tests] Fix FirDiagnosticTestSpecGenerated and FirIdeSpecTest
2021-12-02 20:24:33 +03:00
Anastasiya Shadrina
b3591e77be
[FE] Prohibit explicit @ContextFunctionTypeParams usage
2021-12-02 20:24:20 +03:00