Mikhail Glukhikh
e43a57bdee
[FIR] Do not process constructors in super-type scopes
2020-01-29 15:58:04 +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
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
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
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
Dmitriy Novozhilov
72cb0de705
[FIR-TEST] Update testdata
2020-01-22 14:49:23 +03:00
Dmitriy Novozhilov
9684ff7071
[FIR] Don't create smartcasts to error types
2020-01-22 14:49:23 +03:00
Dmitriy Novozhilov
384a094193
[FIR] Unbound aliased variables in DFA more carefully
2020-01-22 14:49:23 +03:00
Dmitriy Novozhilov
d7c85406fb
[FIR-TEST] Mute some failing tests according to changes in DFA
2020-01-22 14:49:22 +03:00
Dmitriy Novozhilov
9bc62fc34d
[FIR-TEST] Mute test due to incorrect invoke desugaring
2020-01-22 14:49:22 +03:00
Dmitriy Novozhilov
5f639dd2ae
[FIR-TEST] Update testdata of old frontend tests
2020-01-22 14:49:22 +03:00
Alexander Udalov
5321a6af33
Forbid spread operator in signature-polymorphic calls
...
#KT-35226 Fixed
2020-01-21 15:57:35 +01:00
Dmitriy Novozhilov
5cb7cf040a
Update some testdata according switching compiler to 1.4
2020-01-20 16:41:46 +03:00
Pavel Kirpichenkov
cb0b44273d
[NI] Check stub types in result type
...
An uninferred parameter stub may leak through calculation of CST(Inv<Uninferred Stub>, Nothing) into a result type.
A stub type in the result type means a type error. So we can afford recalculating
CST with stub-containing types filtered out, since its an error anyway.
This prevents stub types leakages and helps with reporting type error diagnostics.
KT-35914 Fixed
KT-35943 Fixed
2020-01-20 11:11:31 +03:00
Mikhail Zarechenskiy
58c235e722
Set up tests for fun interfaces for JVM backend for now
2020-01-17 19:37:48 +03:00
Mikhail Zarechenskiy
76a78fe918
FIC: render fun before interfaces in descriptor renderer
2020-01-17 19:37:48 +03:00
Mikhail Zarechenskiy
8350cf7d14
FIC: rename FunctionConversion -> FunctionalConversion
2020-01-17 19:37:47 +03:00
Mikhail Zarechenskiy
b98d8bd7c1
Regenerate tests after rebase on master, add FIR tests
2020-01-17 19:36:11 +03:00
Mikhail Zarechenskiy
fc32e8b017
FIC: Add synthetic constructors for fun interfaces aka explicit FIC
2020-01-17 19:36:05 +03:00
Mikhail Zarechenskiy
0f242a9931
FIC: Support conversions for suspend functions
2020-01-17 19:36:04 +03:00
Mikhail Zarechenskiy
f43769c50d
FIC: Add diagnostic tests
2020-01-17 19:36:03 +03:00
Mikhail Zarechenskiy
c71c1d45c6
FIC: Make SAM conversions also for fun interfaces, add base test
2020-01-17 19:36:01 +03:00
Mikhail Zarechenskiy
55935cc98a
FIC: introduce language feature, modifiers checks and basic tests
2020-01-17 19:36:00 +03:00
Victor Petukhov
437a26684d
NI: Prefer nullable lower bound to flexible one when substitution of type variable is performed and remember flexibility of type parameters based on flexibility of its upper bounds
...
^KT-32435 Fixed
2020-01-17 19:16:09 +03:00
Mikhail Zarechenskiy
4f74515508
[NI] Fix CST calculation for covariant type projections
2020-01-16 17:18:20 +03:00