Denis Zharkov
55a4c40970
FIR: Fix diagnostics test data after safe-call refactoring
...
^KT-38444 In Progress
2020-06-03 10:43:37 +03:00
Mikhail Glukhikh
c1b9fdd2f3
Fix diagnostic test data to be consistent with FIR test data
2020-03-27 16:46:59 +03:00
FenstonSingel
b7d8e879a6
[FIR] Support 4 diagnostics for pairs of modifiers
...
In particular, this commit includes:
* Attempt to abstract access to FirSourceElement via FirModifier
* Add more visit functions to DeclarationCheckersDiagnosticComponent
* Add messages+factories for 4 modifier-related errors and warnings
* Introduce FirModifierChecker
2020-03-27 12:34:29 +03:00
Victor Petukhov
3b892fe31e
NI: exclude reporting of an unsafe call diagnostic for implicit invoke after safe call in cases when invoke has type parameters (make NI and OI consistent)
...
^KT-37579 Fixed
2020-03-19 19:27:25 +03:00
Ilya Chernikov
70c89a28e1
Stop subtyping constraint search if equality constraints for...
...
all not fixed type vars are found
#KT-35626 fixed
2020-03-12 08:02:45 +01:00
Mikhail Glukhikh
8884cbe415
Introduce FIR_IDENTICAL for FIR vs old frontend tests #KT-36879 Fixed
2020-03-05 09:39:40 +03:00
Mikhail Zarechenskiy
4542f3b720
[NI] Finish analysis for coerced last lambda expressions if needed
2020-02-17 10:29:45 +03:00
Pavel Kirpichenkov
ba25b0faaf
[NI] Report unsafe invoke properly for flexible types
...
`isNullable` check returns `true` for flexible types,
which leads to false positive unsafe invoke error, when
receiver for invoke's property is flexible.
^KT-30695 Fixed
2020-02-14 18:06:35 +03:00
Pavel Kirpichenkov
b161839092
[NI] Report unsafe implicit invoke accordingly to OI
...
This reverts commit df046683cc .
KT-30695
2020-02-14 18:06:34 +03:00
Ilya Chernikov
6356807997
Reapply "Only create descriptors for candidates with lambda args"
...
#KT-36247 fixed
A lot of testdata changed because significanly less (error) descriptors
are created for unresolved types, so diagnostics became different.
2020-02-14 11:41:30 +01: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
simon.ogorodnik
d775852781
[FIR] Refactor tower resolver to coroutines
2020-02-11 19:32:07 +03:00
Mikhail Glukhikh
14204a842a
Refactoring & clarification: implement new FIR tower resolver
2020-01-27 00:34:16 +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
Mikhail Glukhikh
a54ef3e427
FIR invoke resolve: remove redundant candidates
2019-12-27 09:57:36 +03:00
Mikhail Glukhikh
0c88ecdc56
FIR resolve: introduce builtInExtensionFunctionReceiverValue
...
This commit allows us to distinguish extension lambda receivers
from simple extension receivers thus fixing some resolve problems.
2019-12-27 09:57:36 +03:00
Mikhail Glukhikh
de50f8aef3
FIR resolve: add partial support of extension lambda calls
...
Here we introduce ONLY_IMPLICIT_RECEIVER tower level
to support extension lambda calls on local variables,
and soften extension receiver checks to make such extensions visible & applicable.
Also here we try to map arguments twice for functional types
2019-12-27 09:57:36 +03:00
Mikhail Glukhikh
a8a50fa657
Fix raw FIR building with parenthesized expression as selector
2019-12-27 09:57:34 +03:00
Mikhail Zarechenskiy
ae1630f376
[NI] Don't discriminate Nothing-type from resulting ones
...
^KT-32106 Fixed
2019-12-25 14:59:04 +03:00
Dmitriy Novozhilov
2536fa0cd5
[FIR-TEST] Add new testdata generated after changes in previous commit
2019-12-12 16:11:46 +03:00
Mikhail Zarechenskiy
a83225218f
[NI] Fix checks for infix/operator conventions
2019-09-20 17:56:06 +03:00
Dmitriy Novozhilov
e46f552a8d
[NI] Update testdata in diagnostic tests
2019-05-06 11:36:20 +03:00
Mikhail Zarechenskiy
30aee3bfb6
[NI] Update test data
2018-11-23 17:30:37 +03:00
Mikhail Glukhikh
f3555daa60
Report UNUSED_PARAMETER on main parameter in 1.3+ #KT-26999 Fixed
2018-10-25 19:10:39 +03:00
Mikhail Zarechenskiy
397cc4f772
[NI] Support implicit invoke calls on parenthesized receivers
2018-04-20 13:06:21 +03:00
Mikhail Zarechenskiy
694f5690f9
[NI] Improve diagnostic about unresolved receiver for many candidates
2018-02-14 14:58:05 +03:00
Dmitry Savvinov
816d89e393
[NI] Improved testdata after changes in applicabilities
...
This commits introduces testdata changes, where NI behaviour strictly
improved, after several previous fixes.
For some tests, just WITH_NEW_INFERENCE directive was added. It
indicates, that some of previous commits first introduced error in that
test, and then some other commit fixed it (netting no overall testdata
change). It is preferrably to keep those annotations until we will
migrate to NI completely, to prevent unexpected regressions.
2017-12-07 12:49:56 +03:00
Mikhail Zarechenskiy
8757298994
Add diagnostics to test data from NI
2017-11-29 02:54:26 +03:00
Mikhail Zarechenskiy
a71238bf94
Place !WITH_NEW_INFERENCE directive to diagnostics test data
2017-11-29 02:53:49 +03:00
Mikhail Zarechenskiy
3fed4e6dc7
Improve diagnostic for unresolved reference when function expected
...
#KT-10657 Fixed
2017-07-07 14:20:02 +03:00
Mikhail Glukhikh
7a53b2f4c8
Introduce UNUSED_ANONYMOUS_PARAMETER for anonymous functions
...
It is not reported for 1.0 language version because
renaming to _ is not possible. It has weak warning severity
So #KT-8813 Fixed
So #KT-16875 Fixed
2017-04-04 14:23:30 +03:00
Mikhail Glukhikh
d08d8af407
USELESS_ELVIS_RIGHT_IS_NULL : build fix (add to different files in DiagnosticsTestGenerated), do not report if USELESS_ELVIS already exists
...
(cherry picked from commit c71b656)
2016-08-23 16:26:54 +03:00
Denis Zharkov
d0acb3674a
Fix rendered testData
...
New members in enum member scope
2016-05-16 15:38:13 +03:00
Alexander Udalov
1b8f934b54
Delete deprecated enum 'values' property
2016-02-19 22:28:44 +03:00
Stanislav Erokhin
210c9ab3db
Minor. Added regression tests for: KT-3927, KT-9522, KT-10036, KT-7440, KT-9682, KT-9808, KT-9517, KT-9810, KT-9345.
2016-01-25 19:13:32 +03:00
Stanislav Erokhin
298a075381
Minor. removed functions which declared in Standard.kt from diagnostic testdata.
...
Removed declaration for functions: TODO, run, with, apply, let.
2016-01-25 19:13:31 +03:00
Mikhail Glukhikh
6157ebe3b8
Separate UNSAFE_IMPLICIT_INVOKE_CALL diagnostics introduced (see KT-8252)
2016-01-15 17:22:54 +03:00
Stanislav Erokhin
39b6637c7c
Fix exception from InvokeProcessor when we get invoke from extension function type.
2015-12-11 17:01:04 +03:00
Alexander Udalov
239502368a
Update test data for tower resolution algorithm
...
- locals win
- unary calls to plus/minus are not supported in favor of unaryPlus/unaryMinus
- unqualified nested classes are temporarily reported as unresolved
- function without receiver win against extension function
- explicit import win against star import
2015-12-11 17:01:02 +03:00
Mikhail Glukhikh
c8b50eec1e
Enum.values: deprecation (warning) --> deprecation (error)
2015-12-11 11:11:42 +03:00
Mikhail Glukhikh
dc60c62781
Enum.values is now deprecated but Enum.values() is no more deprecated
2015-11-23 17:29:36 +03:00
Stanislav Erokhin
a3b11f4214
Created warning for KT-9805
...
#KT-9805 In Progress
2015-11-11 01:26:20 +03:00
Stanislav Erokhin
77411b2181
Allowed call value with extension function type as simple function type.
2015-10-31 10:01:07 +03:00
Denis Zharkov
1c02231cda
Regenerate rendered descriptors after transforming Enum.values to property
2015-10-17 17:46:16 +03:00
Stanislav Erokhin
7d7d37719b
Forbidden old invokeExtension convention.
2015-10-17 14:45:53 +03:00
Mikhail Glukhikh
f8a356747e
Stdlib rename: 'name' and 'ordinal' are now properties in Enum, same name functions are deprecated
2015-10-14 20:40:13 +03:00
Mikhail Glukhikh
4e91f2ffb7
'open' + 'private' and 'abstract' + 'private' are now incompatible for functions and properties #KT-9324 Fixed
2015-09-29 13:05:11 +03:00
Yan Zhulanow
6db9344659
Fix compiler tests
2015-09-25 19:20:20 +03:00
Michael Nedzelsky
bc5c9065d2
fix tests in org.jetbrains.kotlin.checkers
2015-09-08 02:04:32 +03:00