Commit Graph

9 Commits

Author SHA1 Message Date
Steven Schäfer 6af616d3c3 FIR: make declarations marked with 'override' implicitly open
#KT-52236 Fixed
2022-12-14 21:46:41 +00:00
pyos d66be3f82d FIR CFG: do not assume all arguments to inline funs are called in place
Only values for non-noinline, non-crossinline, functional type
parameters qualify.
2022-12-08 10:19:32 +00:00
Mikhail Glukhikh e8be9d4861 FIR: support don't use builder inference if possible
In this commit we upgrade FIR builder inference logic from
the compiler version to 1.7. FIR-based compiler now works with
"don't use builder inference" flag always ON and supports switching
the flag "use builder inference only if needed". To do it,
ContraintSystemCompleter (FIR) and KotlinConstraintSystemCompleter (FE 1.0)
are made similar with extracting some common parts into
ConstraintSystemCompletionContext.

Test status: one BB test fails after this commit (KT-49285).
Also we have a crush in DFA logic in FIR bootstrap test and somehow
questionable behavior in FIR diagnostic test. However,
two BB tests were fixed, the 3rd case from KT-49925 were also fixed.

#KT-49925 Fixed
2022-01-20 23:46:36 +03:00
Mikhail Glukhikh d2bfb7153e Add test from KT-49925 (example 3, fails yet) 2022-01-20 23:46:35 +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