Dmitriy Novozhilov
7f02d57d88
[FIR] Correctly detect super type in delegated constructor call
2020-04-17 12:37:29 +03:00
Mikhail Zarechenskiy
4ffcbc0c2f
[NI] Properly support UnsafeVariance annotation
...
#KT-38134 Fixed
#KT-34433 Fixed
#KT-31823 Fixed
2020-04-16 13:55:47 +03:00
Juan Chen
a1e0e8b0e7
[FIR] Handle receiver types of extension methods when computing maximally specific types.
...
Test case (from testPrimitiveReceiver):
fun Short.foo() = 3
fun Int.foo() = 4
1::foo
2020-04-15 11:16:33 +03:00
Dmitriy Novozhilov
f7dc06a772
[FIR] Approximate integer constants in lhs of callable reference
2020-04-15 11:13:01 +03:00
simon.ogorodnik
276c393141
[FIR] Support captured type parameters in java symbol provider
2020-04-13 20:26:19 +03:00
simon.ogorodnik
0e21ac8ed2
[FIR] Apply BAD testData changes after type parameters support
2020-04-13 20:26:18 +03:00
simon.ogorodnik
132c8ee210
[FIR] Apply GOOD testData changes after type parameters support
2020-04-13 20:26:18 +03:00
Ilya Chernikov
acc5633811
[NI] Fix inference of lambda with receiver when wrapped...
...
in when/if or another lambda.
#KT-37419 fixed
2020-04-13 14:50:49 +02:00
Mikhail Zarechenskiy
a7b959b88b
Fix delegated property resolve with intermediate ID provideDelegate
...
#KT-37406 Fixed
2020-04-09 13:34:29 +03:00
simon.ogorodnik
f573719cc1
[FIR] Fix missing receiver type if anonymous function without label
2020-04-08 14:56:17 +03:00
Dmitriy Novozhilov
8a2b39d647
[FIR] Add checking receivers of callable references
2020-04-08 10:38:45 +03:00
Mikhail Zarechenskiy
86fd4da567
[UAST] Fix mapping types containing type aliases
...
#KT-27935 Fixed
2020-04-08 01:25:14 +03:00
Denis Zharkov
81d9cf76f2
FIR: Add java.io.Serializable as supertypes to built-in classes
2020-04-07 17:54:55 +03:00
Mads Ager
03fb49bb38
[JVM_IR] Improve debugging behavior of inline functions
...
Specifically, this commit improves the stepping behavior of the IR
backend around functions with defaults.
- Improved line numbers in the default handler itself for better
stepping when inlined.
- Improved source information on default arguments
- Improved test coverage of stepping behavior in old and IR backends.
Improves the stepping behaviour around inline methods with default
arguments. In particular, we now accurately step through the
evaluation of default arguments, but do _not_ spuriously show the exit
from the $default handler.
2020-04-07 16:52:45 +02:00
Ilya Gorbunov
8194652793
Allow placing Suppress on a type parameter
...
#KT-12448
2020-04-03 19:36:37 +03:00
Mikhail Glukhikh
036b6c63f6
[FIR] During resolve, set correctly property reference type in delegate
2020-04-03 13:18:47 +03:00
Dmitriy Novozhilov
3190793b62
[FIR] Add incoming edges to local class's property initializers
2020-04-03 10:08:19 +03:00
Victor Petukhov
164f25937f
NI: take into account an extension function annotation during CST calculation
2020-04-02 15:28:35 +03:00
Victor Petukhov
f8d72f5dd9
NI: improve lambdas completion – look at all postponed arguments during resolution lambdas by additional conditions
...
^KT-36819 Fixed
^KT-36069 Fixed
2020-04-02 15:28:11 +03:00
Denis Zharkov
9abe669443
FIR: Fix resolution for invokes on class qualifiers
2020-04-02 12:10:50 +03:00
Mikhail Glukhikh
630adb34db
[FIR] Don't provide receiver as value in delegated constructor call
2020-03-31 20:28:24 +03:00
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
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
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
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
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