Dmitriy Novozhilov
a4b53b4a20
[FIR] Fix passing flow from contracts with form returns(false) ...
2020-02-14 09:18:53 +03:00
Pavel Kirpichenkov
15d744c3da
[NI] Continue resolution after unstable smart cast on receiver
...
The old inference cosideres candidates with unstable smartcast on
receiver unsuccessful, therefore another one may be selected.
KT-36264
2020-02-13 18:02:38 +03:00
Pavel Kirpichenkov
e40ba73950
[NI] Add resolution applicability for resolved candidates with error
...
New resolution applicability is needed in cases when error is found,
but candidate still should be selected. Currently there are two cases,
when this behaviour is required:
- unstable smartcast (choose candidate with non-nullable parameter)
- unknown lambda parameter type (against non-functional expected type)
KT-36264
2020-02-13 18:02:37 +03:00
Pavel Kirpichenkov
df046683cc
Revert "[NI] Report unsafe implicit invoke accordingly to OI"
...
This reverts commit b045adf83a .
2020-02-13 16:06:40 +03:00
Pavel Kirpichenkov
b045adf83a
[NI] Report unsafe implicit invoke accordingly to OI
...
There are several issues with unsafe desugaring for convention calls.
Proper fix is not implemented here (see design proposal KT-30872).
This commit only applies the old logic in the new inference.
^KT-30695 Fixed
2020-02-13 14:49:43 +03:00
Dmitry Petrov
866f188120
Report JVM signature clashes from JVM_IR
...
Also:
* Do not rename public ABI fields
This includes backing fields for const, lateinit, @JvmField properties,
and instance fields for objects.
* FAKE_OVERRIDE declarations for static members of parent Java classes
Required to report cases when a Kotlin function accidentally overrides
Java class member.
2020-02-13 11:35:48 +03:00
Mikhail Zarechenskiy
abc5eb4740
[NI-MIGRATE-BAD] Update problematic/questionable tests
...
These tests are going to be reviewed in more detail before 1.4
2020-02-13 11:15:59 +03:00
Mikhail Zarechenskiy
319a38bd5c
[NI-MIGRATE] Update diagnostic messages
2020-02-13 11:15:59 +03:00
Pavel Kirpichenkov
572dee6835
Revert "Only create descriptors for candidates with lambda args"
...
This reverts commits:
349d07ad43
2249c223fe
Revert due to differences in test data with NI enabled
^KT-36247 Open
2020-02-12 20:52:30 +03:00
Pavel Kirpichenkov
95a8060946
[NI] Don't report uninferred type parameter error on special functions
...
Type parameters can't be specified explicitly for special constructions.
Reporting this error does not help fixing the cause of it and needlessly
reveals implementation details.
^KT-36342 Fixed
2020-02-12 17:33:42 +03:00
Denis Zharkov
9c1577092b
FIR: Fix SAM conversion for constructor calls
2020-02-12 16:05:11 +03:00
Denis Zharkov
95b4fa4b31
FIR: Support flexible types in getErasedVersionOfFirstUpperBound
2020-02-12 16:05:11 +03:00
Denis Zharkov
5a2cdfcab4
FIR: Run callable references resolution for synthetic-select calls
2020-02-12 16:05:11 +03:00
Denis Zharkov
003aea2e68
FIR: Consider abbreviation's nullability when expanding types
2020-02-12 16:05:11 +03:00
Pavel Kirpichenkov
c02dd720dc
[NI] Restore missing call checker errors in coroutine inference
...
Reported diagnostics from the call checkers didn't get to a top-level
trace, if an intermediate wrapping call was a lambda call.
Use of the top-level trace in call completer is a workaround for
the unreliable commit order of common calls' temporary traces.
^KT-33542 Fixed
2020-02-12 12:27:02 +03:00
Mikhail Zarechenskiy
0d310c0fa4
[NI] Support signed-unsigned conversions for K/Native
...
#KT-34545 Fixed
2020-02-12 10:36:45 +03:00
Mikhail Zarechenskiy
7df92cd00b
Set isOperator property for dynamic calls by convention
2020-02-12 10:36:41 +03:00
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
Dmitry Petrov
a1326d3ef5
!RENDER_DIAGNOSTICS_FULL_TEXT directive
...
Compares diagnostics rendered as text with corresponding .diag.txt file
2020-02-07 10:50:56 +03:00
Dmitry Petrov
4e6c3b6b43
Diagnostics tests with JVM backend
2020-02-07 10:50:56 +03:00
Denis Zharkov
6f6281a3f3
FIR: Support type aliases to function types in resolution
2020-02-06 13:00:29 +03:00
Svyatoslav Scherbina
5eedba3903
Add Native-specific frontend checker for @Throws
2020-02-06 11:00:31 +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
Mikhail Glukhikh
7dca4d2fee
[FIR TEST] Update test data for purely implements case (NB: broken)
...
In this case Java super type arguments should be not null, not flexible
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