Mikhail Zarechenskiy
ea5fef76d1
Fix ambiguity on reference inside blocks of special functions
...
#KT-37058 Fixed
2020-06-26 14:03:49 +03:00
Mikhail Zarechenskiy
c5a2ab2512
Callable reference adaptation should have dependency on API version 1.4
...
#KT-38069 Fixed
2020-06-26 14:03:47 +03:00
Mikhail Zarechenskiy
bc40669598
Prohibit functional interface constructor references
...
#KT-36706 Fixed
2020-06-26 14:03:47 +03:00
Mikhail Zarechenskiy
684ca5029f
Add tests for obsolete issues
...
#KT-37734 Obsolete
#KT-39824 Obsolete
2020-06-26 06:24:59 +03:00
Victor Petukhov
cbd8b58d5c
Commit trace for callable reference's LHS with reserved syntax like foo?::bar?::bar to avoid the lack of diagnostics reporting
...
^KT-35075 Fixed
2020-06-25 20:44:58 +03:00
Mikhail Zarechenskiy
a5ae1b38b0
Don't skip constraints from equations with the kind equal
...
The problem was that we didn't incorporate T == Foo into K <: Inv<out T>.
It happened because of optimisation that isn't applicable here as we
already have projection in the initial type
#KT-39777 Fixed
2020-06-24 23:36:59 +03:00
Mikhail Zarechenskiy
e7cee9c6e1
Fix coercion to Unit with equal Nothing constraint
...
#KT-39669 Fixed
2020-06-23 11:47:39 +03:00
Mikhail Zarechenskiy
a06c8786df
Fix overload ambiguity after smartcast to nullable Nothing
...
#KT-39544 Fixed
2020-06-23 11:34:19 +03:00
Mikhail Zarechenskiy
9c8e979308
Fix compatibility resolve for references with multiple outer candidates
...
#KT-39533 Fixed
2020-06-19 16:21:24 +03:00
Dmitriy Novozhilov
a317c8a803
[FIR-TEST] Update testdata due to unresolved KT-36056
2020-06-19 15:53:09 +03:00
Dmitriy Novozhilov
26458875d5
[FIR] Add checker for uninitialized properties
2020-06-19 15:53:09 +03:00
Dmitriy Novozhilov
87859b0faa
[FIR] Introduce new algorithm for building CFG for declarations
2020-06-19 15:53:00 +03:00
Mikhail Bogdanov
9c0b96af71
Report error on missed specialization in compatibility mode
...
#KT-39603 Fixed
2020-06-19 11:57:36 +02:00
Mikhail Bogdanov
477cca3c99
Add JvmDefaultWithoutCompatibility annotation
2020-06-19 11:57:35 +02:00
Mikhail Zarechenskiy
d44a7ff8f9
Add test for obsolete issue
...
The issue was fixed in df1595e
#KT-39630 Fixed
2020-06-18 13:05:42 +03:00
Mikhail Zarechenskiy
df1595e4bc
Fix SAM conversions for derived classes
...
#KT-39535 Fixed
#KT-37149 Fixed
2020-06-18 12:36:30 +03:00
Victor Petukhov
901b794af3
Use lexical scope from trace during checking suspend context if the analysis of engaged parent function isn't completed
...
^KT-39461 Fixed
2020-06-16 22:00:04 +03:00
Victor Petukhov
982cbf1148
NI: clear calls info in coroutine inference before the second analysis of += right side
...
^KT-39376 Fixed
2020-06-16 18:26:59 +03:00
simon.ogorodnik
1a7b30c13a
[FIR] Fix incorrect name in anonymous object class id
2020-06-16 00:01:06 +03:00
Dmitriy Novozhilov
d7ee168dff
[FIR] Create error candidate for completion instead of simple error reference
2020-06-15 15:32:25 +03:00
Denis Zharkov
293f78efe8
FIR: Correct capturing for type-alias bases arguments
...
NB: The test data change at testData/diagnostics/tests/typealias/noApproximationInTypeAliasArgumentSubstitution.fir.kt
is correct: see the relevant non-fir test, the call shouldn't be applicable
^KT-39008 Fixed
2020-06-11 11:31:38 +03:00
Denis Zharkov
72b09ff323
FIR: Rename FirSuperTypeScope and reuse it for type parameter type
...
It would allow ConeKotlinType.scope return FirTypeScope
and thus pulling down org.jetbrains.kotlin.fir.scopes.FirScope#processOverriddenFunctions
(See the following commits)
2020-06-11 11:31:31 +03:00
Denis Zharkov
38922a84f1
FIR: Do not create synthetic properties for non-Java accessors
...
^KT-35495 Fixed
2020-06-11 11:01:43 +03:00
Mikhail Zarechenskiy
3921a0ed70
Add test for obsolete issue
...
#KT-17341 Obsolete
#KT-32958 Obsolete
2020-06-10 16:00:23 +03:00
Mikhail Zarechenskiy
93e9d3e57d
Delay check for possibly deferred return type for reference candidate
...
This issue appeared after recently added new overload for flatMapTo.
Before that, we picked candidate returning List<T> and completed
inference, now we also check one more flatMapTo, which is here is
incorrect and as a result we go into outer scope. Outer scope contains
one property with deferred type, which introduced error about
"typechecker has run into recursive problem" even it isn't applicable
by receiver.
So, the fix is to check receiver first and only then check return
type of a candidate.
#KT-39470 Fixed
2020-06-09 17:36:58 +03:00
Dmitriy Novozhilov
802272a579
Enable ContractsOnCallsWithImplicitReceiver in 1.4
...
#KT-28672 Fixed
2020-06-09 11:21:57 +03:00
Mikhail Zarechenskiy
a086d9f7df
Update forgotten FIR test
2020-06-05 16:30:09 +03:00
Mikhail Zarechenskiy
6c5806f971
Add test for obsolete issue
...
#KT-38161 Obsolete
2020-06-05 16:30:08 +03:00
Mikhail Zarechenskiy
22b558110d
Don't apply Unit-conversion for expressions that return Nothing type
2020-06-05 15:59:31 +03:00
Mikhail Zarechenskiy
fb812301b2
Add test to preserve behaviour
...
It's important to have ambiguity in these cases to introduce overload
resolution by suspend-modifier without breaking changes in future
Relates to #KT-23610
2020-06-05 14:07:08 +03:00
Mikhail Zarechenskiy
e72401c5f4
Don't allow coercing receivers from signed to unsigned constants
2020-06-05 13:24:22 +03:00
Mikhail Zarechenskiy
bfa648972f
Introduce call checker for Unit-conversions
2020-06-05 13:24:21 +03:00
Mikhail Zarechenskiy
6b0a803d14
Allow suspend-conversion for callable references as part of adaptation
2020-06-05 13:24:21 +03:00
Mikhail Zarechenskiy
71cbe97688
Introduce Unit-conversions for simple arguments
2020-06-05 13:24:20 +03:00
Mikhail Zarechenskiy
a4af833d55
Narrow down the range for compatibility warning to callee expression
2020-06-05 13:24:19 +03:00
Mikhail Zarechenskiy
718f23b34f
Compatibility warning for references to companion via name (KT-13934)
2020-06-05 13:24:18 +03:00
Ilmir Usmanov
8cc5f2abfb
Forbid val field initialization inside EXACLTY_ONCE lambda
...
unless the lambda is inline. This way, final field will remain final.
2020-06-04 21:26:48 +02:00
Mikhail Glukhikh
88b130308d
Revert accidental test data change introduced in 0d6e3093
2020-06-04 16:34:40 +03:00
Dmitry Petrov
de25359a90
Fix stdlib compilation after updated @JvmName check
...
Previously, extension receiver type was not taken into account when
checking for @JvmName annotation applicability to possibly mangled
functions (such functions, however, were mangled).
This bug was fixed, but, unfortunately, not before such functions were
added to stdlib ('sumOf' family).
2020-06-04 12:16:28 +03:00
Jinseong Jeon
0d6e309372
FIR: construct type with actual type arguments during GetClassCall transformation
2020-06-04 10:13:37 +03:00
Denis Zharkov
55a4c40970
FIR: Fix diagnostics test data after safe-call refactoring
...
^KT-38444 In Progress
2020-06-03 10:43:37 +03:00
Dmitriy Novozhilov
164b4dd439
[FIR-TEST] Update testdata according to #KT-39340
2020-06-03 10:36:00 +03:00
Dmitriy Novozhilov
069adebf01
[NI] Fix checking for inline lambdas without candidate
...
#KT-34506
2020-06-01 23:40:32 +03:00
Victor Petukhov
8d05253369
NI: take into account effective variance during adding constraints from LHS instead of only use site variance
...
^KT-39220 Fixed
2020-06-01 17:24:49 +03:00
Mikhail Zarechenskiy
f073e34926
Update forgotten test-data
2020-06-01 15:35:24 +03:00
Mikhail Zarechenskiy
569b6eaff2
Don't issue compatibility warning for the candidates in the same group
2020-06-01 10:19:35 +03:00
Mikhail Zarechenskiy
599f520fd8
Add compatibility warning for chained sam->suspend-conversion
2020-06-01 10:19:35 +03:00
Mikhail Zarechenskiy
a5203428a4
Replace resolution error for suspend-conversion with call checker error
2020-06-01 10:19:34 +03:00
Mikhail Zarechenskiy
eaeaf3c8a3
Add compatibility warning for suspend conversions
2020-06-01 10:19:33 +03:00
Mikhail Zarechenskiy
47e6805186
Add compatibility warning for reference adaptation
2020-06-01 10:19:33 +03:00