Pavel Kirpichenkov
0abe3a6c39
[NI] Report not-a-class LHS error for callable reference arguments
...
^KT-37531 Fixed
2020-03-31 12:04:01 +03:00
Pavel Kirpichenkov
a416fde814
[NI] Move abstract class instantiation check to call checkers
...
This way the check works for callable reference arguments.
Also candidate applicability during resolution does not change compared to the old inference.
^KT-37530 Fixed
2020-03-31 12:04:01 +03:00
anastasiia.spaseeva
0397470b85
[Spec tests] Update tests with spec version 0.1-313
2020-03-30 19:12:55 +03:00
Victor Petukhov
218c13efc5
[FIR] Remove links to spec sentences during comparison fir and old front-end test data
2020-03-30 11:15:55 +03:00
anastasiia.spaseeva
5986ffae1e
[Spec tests] Add tests for expressions and statements
2020-03-30 11:15:53 +03:00
victor.petukhov
f62901d7d9
[Spec tests] Actualize spec tests
2020-03-30 11:15:52 +03:00
victor.petukhov
2dbce2cc41
[Spec tests] Link diagnostic tests for when expression with Kotlin specification
2020-03-30 11:15:52 +03:00
Mikhail Glukhikh
d8bc29e6c6
[FIR] Eliminate obsolete NO_SUPERTYPE diagnostic from builder
2020-03-27 18:24:50 +03:00
Nick
b38d30bab0
[FIR] Support several super-related diagnostics
2020-03-27 18:24:50 +03:00
Mikhail Glukhikh
c1b9fdd2f3
Fix diagnostic test data to be consistent with FIR test data
2020-03-27 16:46:59 +03:00
Mikhail Glukhikh
7bfd354a77
Don't report UNUSED_PARAMETER in main from object #KT-37718 Fixed
2020-03-27 16:46:59 +03:00
Mikhail Glukhikh
b27152f903
Replace some FIR syntax errors with more proper diagnostics
2020-03-27 16:46:59 +03:00
Mikhail Glukhikh
2f63c8a46a
[FIR] Enhance diagnostic DSL to be able to use concrete factories
...
Before this commit, things like DiagnosticFactory0<KtDeclaration>
were effectively unusable.
2020-03-27 16:46:58 +03:00
Dmitriy Novozhilov
a1d81aa15f
[FIR-TEST] Fix diff between FIR and old FE testdata
2020-03-27 16:39:02 +03:00
FenstonSingel
b7d8e879a6
[FIR] Support 4 diagnostics for pairs of modifiers
...
In particular, this commit includes:
* Attempt to abstract access to FirSourceElement via FirModifier
* Add more visit functions to DeclarationCheckersDiagnosticComponent
* Add messages+factories for 4 modifier-related errors and warnings
* Introduce FirModifierChecker
2020-03-27 12:34:29 +03:00
Dmitriy Novozhilov
48fb279721
[FIR] Add constraint to flexible type for declared argument for java parameter
2020-03-27 10:17:12 +03:00
Pavel Kirpichenkov
e39b69839b
[NI] Make constraint check for type variables with complex dependency
...
Additional check for trivial constraints is needed to make lambda
analysis before outer variable fixation to Nothing(?)
^KT-37627 Fixed
2020-03-26 17:06:37 +03:00
Leonid Startsev
2bda31ac38
Exclude annotation properties in 'explicit visibility' api mode check
...
#KT-37432 fixed
2020-03-25 19:41:52 +05:00
Denis Zharkov
d869ae7826
FIR: Make resolution logic for local classes the same as for top-level
...
Run different phases through common transformers sequentially
It should make code more reusable and may help with avoid common bugs
2020-03-25 15:36:17 +03:00
Denis Zharkov
cdd7e41891
FIR: Support proper implicit return type computation for local classes
2020-03-25 14:53:34 +03:00
Dmitriy Novozhilov
2c37627b15
[FIR] Add unified diagnostics for psi and light tree
2020-03-25 11:35:43 +03:00
simon.ogorodnik
f83c20065d
[FIR-test] Unmute passing tests, mostly fir2ir
2020-03-24 18:58:19 +03:00
Pavel Kirpichenkov
adf3351a8b
[NI] Don't skip constraints with projections during variable fixation
...
Those constraints are only restored for variable fixation stage because of the
influence on pefrormance.
^KT-37650 Fixed
^KT-37380 Fixed
2020-03-24 16:13:49 +03:00
Pavel Kirpichenkov
dc18c62dbc
[NI] Filter out type variable from its dependencies
...
Don't take into account complex variable dependency on itself when determining fixation status.
^KT-37621 Fixed
2020-03-24 12:49:18 +03:00
Mikhail Zarechenskiy
ec4d9d2f1f
[NI] Prefer between two complex variables one with proper lower bounds
...
This reverts commit d4d35bb766 .
2020-03-24 11:13:55 +03:00
Mikhail Zarechenskiy
191fb02bf6
[NI] Consider intersection type with number type as Nothing
...
Currently, only for "in": In<in Int & A> == In<in Nothing> == In<*>
#KT-37302 Fixed
2020-03-23 16:39:21 +03:00
Nick
abcd6bd528
[FIR] Support diagnostic SUPER_IS_NOT_AN_EXPRESSION
2020-03-23 15:14:06 +03:00
Mikhail Zarechenskiy
d4d35bb766
Revert "[NI] Prefer between two complex variables one with proper lower bounds"
...
This reverts commit ced8a92629 .
2020-03-22 17:16:22 +03:00
Dmitriy Novozhilov
5f9f01fe4e
[FIR] Implement new completion mode calculator
...
Note that `testDelegates` now fails due to KT-37638 and
`testSimpleIn` fails due to problems with type parameters
of inner classes
2020-03-20 23:11:28 +03:00
Dmitriy Novozhilov
ea02855ba6
[FIR] Fix type arguments and substitution for flexible types
2020-03-20 23:11:28 +03:00
Mikhail Zarechenskiy
ced8a92629
[NI] Prefer between two complex variables one with proper lower bounds
...
#KT-37554 Fixed
2020-03-20 15:44:53 +03:00
Victor Petukhov
3b892fe31e
NI: exclude reporting of an unsafe call diagnostic for implicit invoke after safe call in cases when invoke has type parameters (make NI and OI consistent)
...
^KT-37579 Fixed
2020-03-19 19:27:25 +03:00
Victor Petukhov
ea59ea8aa2
NI: avoid creating useless captured types during incorporation
...
^KT-37546 Fixed
2020-03-19 12:47:03 +03:00
pyos
72b80ef158
Detect inline cycles faster
...
E.g. in the following code
fun x() {}
inline fun f() { x(); g() }
inline fun g() { x(); f() }
the old implementation of inline cycle detection bailed out after
generating 3 calls of x() in each function, while the new one stops
after 2. In other words, code generation for a single function is no
longer reentered.
2020-03-19 08:13:19 +01:00
Vyacheslav Gerasimov
bcefa68df0
Always checkout/checkin text files with lf endings
...
Different line endings on linux/windows prevents gradle from reusing
build cache since endings make task inputs completely different between
systems
2020-03-18 22:33:15 +03:00
Dmitriy Novozhilov
2b986194fb
[FIR] Add desugaring of array assignments and resolve of it
...
#KT-37516 Fixed
2020-03-18 11:31:53 +03:00
Denis Zharkov
a2e7b6d20e
FIR: Do not add "field" to accessor of a property with receiver
2020-03-18 10:22:10 +03:00
Denis Zharkov
e1312a752a
FIR: Allow a field override another field with the same name
2020-03-17 16:33:48 +03:00
Denis Zharkov
7203499b7a
FIR: Fix visibility check for protected within a companion
2020-03-17 16:33:48 +03:00
simon.ogorodnik
4844a90788
[FIR] KT-37453: Type argument mapping
...
#KT-37453 Fixed
2020-03-16 21:41:59 +03:00
Dmitriy Novozhilov
1b479c49a8
[FIR] Fix exhaustiveness checking for conditions with equals to object
...
#KT-37488 Fixed
2020-03-16 17:04:28 +03:00
Dmitriy Novozhilov
820da6edaa
[FIR] Don't set up expected type for function body
2020-03-16 17:04:28 +03:00
Victor Petukhov
b1c4b5f51b
NI: Analyze lambdas which are return arguments of another lambda
...
^KT-36044 Fixed
2020-03-12 23:29:09 +03:00
Ilya Chernikov
84a0e39956
Skip duplicates removal on constraints simplification
...
It is already coveren on addition. Speeds up inference a bit.
2020-03-12 08:02:46 +01:00
Ilya Chernikov
70c89a28e1
Stop subtyping constraint search if equality constraints for...
...
all not fixed type vars are found
#KT-35626 fixed
2020-03-12 08:02:45 +01:00
Ilya Chernikov
2727507d18
Fix diagnostic inferred type calculation for null in some cases
...
#KT-36222 fixed
2020-03-12 08:02:45 +01:00
Pavel Kirpichenkov
04f9a03796
[NI] Fix isNullableType for definitely not null type parameter
...
Consider type parameter with nullable bound not null
if it is inside of a definitely not null type.
2020-03-11 13:55:25 +03:00
Pavel Kirpichenkov
88ae9bc7d5
minor: rename test
2020-03-11 13:55:24 +03:00
Leonid Startsev
01108d595c
Fix broken test data from 5d73550b
2020-03-11 12:25:13 +03:00
Alexander Udalov
d668808b44
Migrate Experimental->RequiresOptIn in project sources
2020-03-10 12:07:15 +01:00