Denis Zharkov
9abe669443
FIR: Fix resolution for invokes on class qualifiers
2020-04-02 12:10:50 +03:00
Ilya Gorbunov
427750ba03
Update builtins test data
2020-04-01 08:06:57 +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
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
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
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
Dmitriy Novozhilov
3acb64c536
[FIR] Add flexible default upper bound for java type parameters
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
Denis Zharkov
5539ad8ce8
FIR: Fix data-flow for jumps between members of local classes
...
First of all, note that currently ControlFlowGraphBuilder instance is fully mutable
and shared between all local classes and top-level classes in the same thread
Before this change, previous node for member of local class
was defined as lastNode
And in the case of implicit types, lastNode might be in a middle of another
local class member that is being resolved right now.
See the test:
- "a.length" expression in `bar` should be resolved because smart cast happens
before the class declaration
- "b.length" expression in `bar` should be unresolved because smart cast happens
in a different function
The latter case has been working incorrectly, the call was errorenously
resolved because "lastNode" were pointed just before "bar()" call in "foo"
2020-03-25 15:36:19 +03: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
simon.ogorodnik
5a3eefcba1
[FIR] Fix suspend functional type deserialization
2020-03-24 18:58:17 +03:00
simon.ogorodnik
4fac6d8fb5
[FIR] Fix abbreviated type deserialization
2020-03-24 18:58:17 +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
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
6ce8d661ad
[FIR] Add nullability to ILT. #KT-37639 Fixed
2020-03-20 23:11:28 +03:00
Dmitriy Novozhilov
006e1f6528
[FIR-TEST] Add test for KT-37638
2020-03-20 23:11:28 +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
Dmitriy Novozhilov
7bfe7061e7
[FIR] Add proper nullability for java enums
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
Mikhail Bogdanov
420dd0d440
Extract directive map to separate class
2020-03-19 16:45:10 +01:00
Mikhail Glukhikh
50a9313a5e
[FIR] Support some approximation of effective visibility
2020-03-19 16:56:47 +03:00
Victor Petukhov
ea59ea8aa2
NI: avoid creating useless captured types during incorporation
...
^KT-37546 Fixed
2020-03-19 12:47:03 +03:00
Dmitriy Novozhilov
39372c06cf
[FIR] Move all checkers and theirs infrastructure to separate module
2020-03-19 09:51:01 +03:00
Dmitriy Novozhilov
cc07ae96b3
[FIR-TEST] Move analysis tests to separate module
2020-03-19 09:51:01 +03:00