Mikhail Glukhikh
91b432b4a1
[FIR] Java super-type arguments are now handled as flexible
2020-02-03 16:45:19 +03:00
Mikhail Glukhikh
aeb6f35571
Support nullable callable references in FIR resolve
2020-02-03 16:45:19 +03:00
simon.ogorodnik
34e6649d31
[FIR] Harden check of argument type properly
...
Before this commit, nullable argument could match not null parameter.
Now we require also correct nullability that breaks some cases
2020-02-03 16:45:18 +03:00
Pavel Kirpichenkov
517688e163
[NI] Revise variance calculation method for completion mode
...
Before fix only one level of type arguments was used to determine variance of type variable to find out direction requirements.
This incorrect in general case, because outer variance affects subtyping deductions, for example:
Inv<Out<A>> <: Inv<Out<B>> => A <: B; B <: A, despite A and B are in covariant position if only one level is considered
^KT-36233 Fixed
2020-01-31 17:59:11 +03:00
Denis Zharkov
47ecaa5b06
FIR: Fix scope intersection types
...
Otherwise overload resolution ambiguity is reported in the test
2020-01-30 17:12:50 +03:00
Denis Zharkov
d28e1f156a
FIR: Fix capturing of flexible types
2020-01-30 17:12:50 +03:00
Denis Zharkov
ac2b5beb4e
FIR: Optimize SupertypeComputationSession::breakLoops
2020-01-30 17:12:50 +03:00
Mikhail Glukhikh
2bb5740f47
[FIR] Resolve ambiguities in Java static scopes
2020-01-30 16:28:08 +03:00
Mikhail Zarechenskiy
4c8905b00f
Add forgotten test file for FIR
...
After ac69c287ec
2020-01-30 16:09:22 +03:00
Pavel Kirpichenkov
736f5e365c
[NI] Create error type for CST of error types
...
KT-36092 Fixed
2020-01-30 15:24:42 +03:00
Mikhail Zarechenskiy
ac69c287ec
[NI] Don't treat last labeled return expression in lambda specially
...
#KT-36251 Fixed
2020-01-30 15:11:27 +03:00
Dmitriy Novozhilov
f8c8925fd6
[FIR] Support DFA analysis of postponed lambdas. Add more kinds of edges of CFG
...
#KT-36248
#KT-35724 Fixed
2020-01-30 14:38:02 +03:00
Pavel Kirpichenkov
832064305f
[NI] Set correct applicability for unknown lambda parameter diagnostic
...
Unknown lambda parameter should not change resolve.
So the new diagnostic should not have error status; othrewise candidates with lower priority but more specific expected type may be chosen.
KT-34335 Fixed
See also KT-36264
2020-01-30 13:52:18 +03:00
Pavel Kirpichenkov
eec039f5a2
[NI] Report error about unknown parameter type of lambda argument
...
KT-34335
2020-01-30 13:52:12 +03:00
Mikhail Glukhikh
e43a57bdee
[FIR] Do not process constructors in super-type scopes
2020-01-29 15:58:04 +03:00
Mikhail Zarechenskiy
e42f16c95c
[NI] Fix construction of common system for builder inference
2020-01-29 11:43:15 +03:00
Mikhail Zarechenskiy
e3b6104489
[NI] Map vararg to Array if it's resolved against type variable
...
While this behavior is questionable, it's consistent with OI and can
be changed in future
#KT-36201 Fixed
2020-01-29 11:43:14 +03:00
Mikhail Zarechenskiy
35f6810b58
[NI] Do not incorporate constraints that are needed only for nullability
2020-01-29 11:43:13 +03:00
Mikhail Glukhikh
3f95ac341c
[FIR] Implement SAM candidates discrimination
2020-01-29 11:09:28 +03:00
Ilya Gorbunov
cef81e11b7
Do not generate JS tests for experimental coroutines support
...
#KT-36083
2020-01-29 09:12:40 +03:00
Denis Zharkov
c295f2dc25
FIR: Reimplement implicit types calculator
...
Make it works through a single component tracking computation status
instead of storing it in the nodes
2020-01-28 17:03:50 +03:00
Dmitriy Novozhilov
57a1342aac
[FIR] Fix creating DefinitelyNotNullTypes
...
Also fix substitutions to them
2020-01-28 14:14:21 +03:00
Dmitriy Novozhilov
7d8363d6aa
[FIR] Use Function<R> as super type for all FunctionNtypes
2020-01-28 14:14:20 +03:00
Victor Petukhov
f7626d6474
Exclude reporting IMPLICIT_NOTHING_AS_TYPE_PARAMETER warning for suspend lambdas
...
^KT-36101 Fixed
2020-01-27 18:12:58 +03:00
Ilya Chernikov
a37ec5a062
[minor] "fix" fir testdata for KT-32792 & KT-34857
2020-01-27 13:24:49 +01:00
Mikhail Glukhikh
f949b48b4a
[FIR] Swap priority of kotlin libraries / built-ins #KT-35948 Fixed
2020-01-27 13:21:54 +03:00
Ilya Chernikov
9623b0eedb
Report error instead of assertion when property is used as operator
...
#KT-34857 fixed
2020-01-27 10:10:44 +01:00
Ilya Chernikov
a1acb4afaf
Return correct PSI expression for EmptyLabeledReturn
...
Fixes diagnostic reporting for appropriate constraint error
#kt-32792 fixed
2020-01-27 10:10:44 +01:00
Mikhail Glukhikh
7721eaab23
[FIR] Transform qualified access / callable refs type arguments properly
2020-01-27 00:34:17 +03:00
Mikhail Glukhikh
14204a842a
Refactoring & clarification: implement new FIR tower resolver
2020-01-27 00:34:16 +03:00
Victor Petukhov
5c6e710013
Revert "Workaround an inliner problem upon which the compiler code itself stumbled ^KT-35856 Fixed"
...
This reverts commit 59175912
2020-01-24 16:41:22 +03:00
Ilya Gorbunov
39078342ee
Remove mod function deprecation tests
...
#KT-26654
2020-01-23 19:28:23 +03:00
Ilya Gorbunov
b1766b167f
Remove mod function usage from tests
...
#KT-26654
2020-01-23 19:28:23 +03:00
Pavel Kirpichenkov
78c9bbcc0d
[NI] Soften restictions on using Nothing as proper constraint for full call completion
...
Consider lower `Nothing` constraint non-proper only if there is a dependant not analyzed postponed atom.
Early completion to `Nothing` provides data flow info for smart casts.
KT-35668 Fixed
2020-01-23 19:12:01 +03:00
Mikhail Zarechenskiy
f1d9177112
[NI] Fix issue with returning non-deparenthesized lambdas from labmdas
...
#KT-36080 Fixed
2020-01-23 18:56:02 +03:00
Mikhail Zarechenskiy
6b07ef42dd
[NI] Update testdata for NI after switching language versions
2020-01-23 18:56:01 +03:00
Mikhail Zarechenskiy
7bd7db839d
[NI] Fix adapting arguments for callable references with receivers
...
#KT-35912 Fixed
2020-01-23 18:56:00 +03:00
Leonid Startsev
43858e8169
Do not include annotations and KDoc into NO_EXPLICIT_VISIBILITY_IN_API_MODE report range
...
Rename positioning strategy to better reflect its behavior.
#KT-36021 fixed.
2020-01-23 17:05:51 +03:00
Dmitriy Novozhilov
14cf7a3d16
[NI] Add collecting forgotten type variables from callable references
...
#KT-35959 Fixed
2020-01-23 14:30:28 +03:00
Pavel Kirpichenkov
c5893913f3
[NI] Remove lambda coersion to Unit in case of error return type(s)
...
Coersion to Unit from error type leads to misleading type mismatches:
"expected <expected lambda return type> found Unit", despite no user-provided Unit / empty lambda.
These diagnostics were collected, but not reported before, and that had been disguising the issue for a while.
KT-34729 Fixed
2020-01-23 13:18:50 +03:00
Pavel Kirpichenkov
3a98c84105
[NI] Make behaviour of anonymous functions consistent with lambdas
...
Fix completion of anonymous functions with expression body without expected type.
Premature completion led to losing type info from outer calls.
Also report type mismatches on empty lambda expressions.
KT-34729 In progress
2020-01-23 13:18:49 +03:00
Mikhail Glukhikh
2086c34cb9
[FIR] Fix callable references to fields / parameters / etc.
...
Before this commit, only references to functions & properties
were possible, now fields & parameters are also supported
2020-01-23 12:32:40 +03:00
Mikhail Glukhikh
c37394ec83
[FIR] Count alias reference with type arguments as qualifier w/out value
2020-01-23 12:32:40 +03:00
Mikhail Glukhikh
e39df5bb91
[FIR] Support type aliases in double colon expression resolver
2020-01-23 12:32:40 +03:00
Mikhail Glukhikh
84c8697720
[FIR] Do not build synthetics for static or Unit returning get
2020-01-23 12:32:40 +03:00
Mikhail Glukhikh
69ecbd93a9
[FIR] Fix type alias handling in qualifier position
2020-01-23 12:32:39 +03:00
Mikhail Glukhikh
e644edfe84
[FIR] Handle unresolved callable references more correctly
2020-01-23 12:32:39 +03:00
Mikhail Glukhikh
5eb0c83965
[FIR] Fix failing tests
2020-01-23 10:12:15 +03:00
Abduqodiri Qurbonzoda
1203df7405
Deprecate floating point to integral types lesser than Int #KT-30360
2020-01-22 23:27:35 +03:00
Dmitriy Novozhilov
72cb0de705
[FIR-TEST] Update testdata
2020-01-22 14:49:23 +03:00