Mikhail Zarechenskiy
a736551c2a
Add test checking that fun isn't inherited from base interface
2020-02-12 10:36:40 +03:00
Mikhail Zarechenskiy
45bbdaf73f
Add base declaration checker for fun interfaces
2020-02-12 10:36:39 +03:00
Dmitriy Novozhilov
6735cc8937
[FIR] Implement new bound smartcast algorithm
...
#KT-36055 Fixed
2020-02-12 10:17:45 +03:00
simon.ogorodnik
d775852781
[FIR] Refactor tower resolver to coroutines
2020-02-11 19:32:07 +03:00
simon.ogorodnik
d9883067e6
[FIR] Hide primary constructor parameters from accessors
2020-02-11 18:50:51 +03:00
Mikhail Glukhikh
e3721ed406
[FIR] Implement bare type modification with known type arguments
2020-02-11 16:09:21 +03:00
Mikhail Glukhikh
dc7621a112
[FIR] Fix Java override ambiguity (Kotlin type parameter VS Java Object)
2020-02-11 16:09:20 +03:00
victor.petukhov
b8aacf0786
Fix test data around flexibility after ae39d748e4
2020-02-10 19:23:57 +03:00
Mikhail Glukhikh
9a80850700
[FIR] Fix Kotlin-Java supertype recursion problem
2020-02-10 18:51:34 +03:00
Mikhail Glukhikh
cc0e39ebca
[FIR] Support synthetic property setters
2020-02-10 18:51:34 +03:00
Ilya Chernikov
2249c223fe
Only create descriptors for candidates with lambda args
...
#KT-36247 fixed
2020-02-10 14:21:02 +01:00
Victor Petukhov
ae39d748e4
NI: Try to solve constraint system with another flexibility from a type variable if couldn't solve
...
^KT-36254 Fixed
2020-02-10 12:31:42 +03:00
Dmitriy Novozhilov
abfd87411d
[FIR-TEST] Mute failing tests with java kotlin supertypes cycle
2020-02-10 10:54:05 +03:00
Dmitriy Novozhilov
5ceb68f19f
[FIR-TEST] Update some testdata
2020-02-10 10:54:04 +03:00
Mikhail Glukhikh
c34d2f9daa
[FIR] Fix signature calculation in JvmMappedScope
2020-02-07 13:04:21 +03:00
Mikhail Glukhikh
a8e89a6390
[FIR] Fix various corner cases in DFA
2020-02-07 13:03:43 +03:00
Denis Zharkov
6f6281a3f3
FIR: Support type aliases to function types in resolution
2020-02-06 13:00:29 +03:00
Mikhail Glukhikh
0fa98ed635
[FIR] Discriminate abstract members when resolving on super
2020-02-05 11:19:23 +03:00
Mikhail Glukhikh
71b0840ef9
[FIR] Implement super resolve as a particular tower resolver case
2020-02-05 11:19:19 +03:00
Pavel Kirpichenkov
75d57c7d3f
Update pattern for finding diagnostics in diagnostic tests
...
Also use updated diagnostic pattern in TreesCompareTest.
In rare cases diagnostic was cut too early on !> characters,
that were a part of diagnostic parameter:
<!DIAGNOSTIC("Type<DefinitelyNotNullTypeArgument!!>")!>
2020-02-04 17:49:18 +03:00
Denis Zharkov
23e9a0c861
FIR: Force processing postponed arguments nested in lambdas
...
See the call-site of processAllContainingCallCandidates in getOrderedNotAnalyzedPostponedArguments
2020-02-04 16:24:01 +03:00
Mikhail Glukhikh
64c7ab1302
[FIR] Fix lambda resolve in independent context
2020-02-04 15:00:12 +03:00
Mikhail Glukhikh
22068dd6ad
[FIR TEST] Update test data due to hardened receiver check (NB: broken)
...
In particular, nullable invoke extension call and some smart casts
are broken here
2020-02-03 16:45:21 +03:00
simon.ogorodnik
645602b675
[FIR] Fix data-flow after while loops
2020-02-03 16:45:20 +03:00
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
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