Victor Petukhov
eff5f3a242
NI: do type checking for anonymous functions not inside a call
...
^KT-38890 Fixed
^KT-38439 Fixed
2020-05-19 16:29:14 +03:00
Denis Zharkov
e1e149a062
FIR: Support coercion-to-unit semantics for callable references
2020-05-18 11:17:45 +03:00
Denis Zharkov
b691b13d8e
FIR: Add separate local scopes for blocks
2020-05-15 16:04:44 +03:00
Denis Zharkov
808355d817
FIR: Fix test data for secondary constructor delegation calls
...
They appeared, after the changes in previous commits at
org.jetbrains.kotlin.fir.resolve.transformers.body.resolve.FirExpressionsResolveTransformer#transformDelegatedConstructorCall
The idea is that dispatch receiver is available there in old FE, but additional
diagnostic should be reported on it (see KT-38813)
This change was not made intentionaly but it was the easiest way to
support new tower data elements structure and on the other side it's the
correct behavior as for old FE.
Also, if we once would prefer the previous behavior it's still not very
hard to support it
2020-05-15 16:04:44 +03:00
Denis Zharkov
f71a56e742
FIR: Fix test data after rewritten scope structure
...
Mostly, the semantics for statics/companions has been changed there
Fixed test data now is much closer to semantics of old FE
2020-05-15 16:04:44 +03:00
Denis Zharkov
687a58843f
FIR: Rewrite visibility checking
...
Unbound it from implicit receiver stack as it only needs scope structure/declaration nestedness
Semantics for protected has been changed in a way it works in old FE
NB: We should report additional diagnostic in case of CallCompanionProtectedNonStatic.fir.kt
(see KT-38814)
2020-05-15 16:04:44 +03:00
Victor Petukhov
73dec25eb1
NI: intersect DFI types before capturing
...
^KT-37887 Fixed
2020-05-14 19:54:59 +03:00
Mikhail Glukhikh
457fb09e3a
[FIR] Use tower to resolve delegated constructors, set dispatch receiver
2020-05-12 16:57:07 +03:00
Pavel Kirpichenkov
003ba1c8f5
[NI] CST: add preemptive recursion detection
...
For single super type constructor create star projection argument when types for that argument are equal to the original types.
Captured star projections are replaced with their corresponding supertypes during this check.
Skip check for `in` parameters, for which recursive cst calculation does not happen.
Adjust constant in fallback recursion condition.
^KT-38544 Fixed
2020-05-12 11:13:43 +03:00
Victor Petukhov
b49dc46e6c
NI: improve reporting errors about mismatch number of anonymous function parameters
2020-05-09 12:34:08 +03:00
Victor Petukhov
585e98a835
NI: support inferring lambda receiver type by explicit receiver of anonymous function (which is another postponed argument)
2020-05-09 12:34:06 +03:00
Ilya Chernikov
7e3dfb245b
Avoid skipping lambda argument processing in case of explicit type param
...
#KT-38691 fixed
2020-05-07 18:39:57 +02:00
Jinseong Jeon
7b01cf7b04
FIR: handle labeled super reference properly
2020-05-07 12:02:56 +03:00
Victor Petukhov
260683c20e
NI: Improve postponed arguments analysis
...
Introduce seven stages:
1) Analyze postponed arguments with fixed parameter types
2) Collect parameter types from constraints and lambda parameters' declaration
3) Fix not postponed variables for parameter types of all postponed arguments
4) Create atoms with revised expected types if needed
5) Analyze the first ready postponed argument and rerun stages if it has been analyzed
6) Force fixation remaining type variables: fix if possible or report not enough information
7) Force analysis remaining not analyzed postponed arguments and rerun stages if there are
^KT-37952 Fixed
^KT-32156 Fixed
^KT-37249 Fixed
^KT-37341 Fixed
2020-05-07 11:42:00 +03:00
Likholetov Mikhail
aa706d322d
[FIR] Support several annotation class diagnostics
2020-05-06 10:32:01 +03:00
rapturemain
02aa11a0a0
[FIR] Support for EXPOSED_TYPE_PARAMETER_BOUND
2020-04-30 12:08:43 +03:00
rapturemain
54cfd1f625
[FIR] Handle protected effective visibility relation properly
...
#KT-38401 Fixed
2020-04-29 17:25:19 +03:00
Mikhail Zarechenskiy
1a26d2e157
Fix exception during resolution of incorrect fun interface
...
#KT-37541 Fixed
2020-04-29 14:15:25 +03:00
Alexander Udalov
b77e5a21ec
Report error if fun interface method has JVM name getFunctionDelegate
...
This is needed so that it wouldn't clash with the corresponding member
from the kotlin/jvm/internal/FunctionAdapter interface, which all fun
interface wrappers will implement to get proper equals/hashCode. The
workaround is to rename the fun interface method.
#KT-33455
2020-04-29 12:15:50 +02:00
Alexander Podkhalyuzin
6372c01e49
Added missing specificity comparator to FIR
...
This is required to correctly resolve overloading in cases when we
need to find most specific alternative in Java between int and Integer.
2020-04-28 17:34:42 +03:00
rapturemain
49593d308c
[FIR] Add EXPOSED_SUPER_(CLASS/INTERFACE) checker
2020-04-27 13:00:49 +03:00
Nick
96238cbe1f
[FIR] Support diagnostic QUALIFIED_SUPERTYPE_EXTENDED_BY_OTHER_SUPERTYPE
2020-04-24 16:48:28 +03:00
Mikhail Glukhikh
57b4a54766
[FIR] Calculate effective visibility inside anonymous object properly
...
#KT-38432 Fixed
2020-04-23 13:57:27 +03:00
Ilya Kirillov
1a90866ce1
FIR: handle member scope for anonymous objects
...
#KT-37120 fixed
2020-04-23 10:38:41 +03:00
Mikhail Zarechenskiy
cb975bde7c
Add test for questionable chained fun -> suspend conversion
2020-04-22 16:10:45 +03:00
Mikhail Zarechenskiy
ac642cf175
Support suspend conversion in callable reference adaptation
...
#KT-15917 In Progress
2020-04-22 16:10:45 +03:00
Mikhail Zarechenskiy
537a59d6ca
Introduce basic suspend conversion in FE
...
#KT-15917 In Progress
2020-04-22 16:10:44 +03:00
Denis Zharkov
fa3b3e7a9a
FIR: Fix false positive INAPPLICABLE_INFIX_MODIFIER
2020-04-21 09:48:03 +03:00
Denis Zharkov
7612f37c85
FIR: Prohibit calling singletons' constructors
2020-04-21 09:48:03 +03:00
Mikhail Glukhikh
4b819aa028
Remove incorrect comment from old FE diagnostic test
2020-04-20 18:40:48 +03:00
Mikhail Glukhikh
790a517fa3
[FIR TEST] Add bad test data (submitted KT-38400)
2020-04-20 18:33:40 +03:00
Nick
c4b7ac994b
[FIR] Support diagnostic ABSTRACT_SUPER_CALL
2020-04-20 18:33:40 +03:00
rapturemain
8960829c01
[FIR] Cast error on the element name instead of the whole body
2020-04-20 17:27:16 +03:00
Mikhail Glukhikh
4c639a840d
[FIR] Apply bad test data (protected eff. visibility related, KT-38401)
2020-04-20 17:27:11 +03:00
rapturemain
6d63de01ac
[FIR] Fix effective visibility calculation & relevant test data
2020-04-20 17:25:26 +03:00
Mikhail Glukhikh
96d8b0bea3
FIR: make KFunctionX derived from KFunction
2020-04-20 17:05:37 +03:00
Mikhail Glukhikh
aada7bfe51
FIR: handle suspend functions in callable reference resolve properly
2020-04-20 17:05:31 +03:00
Mikhail Zarechenskiy
befa1e114c
Add tests for obsolete issues
...
#KT-38092 Obsolete
#KT-38179 Obsolete
#KT-35105 Obsolete
#KT-36696 Obsolete
#KT-36947 Obsolete
#KT-37337 Obsolete
#KT-37309 Obsolete
#KT-37727 Obsolete
#KT-37735 Obsolete
#KT-37853 Obsolete
#KT-37920 Obsolete
#KT-37709 Obsolete
#KT-37706 Obsolete
2020-04-20 04:10:37 +03:00
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