Dmitry Savvinov
ea72c76a37
[NI] Testdata changes after fixes in error types
2017-12-07 12:49:56 +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
Denis Zharkov
527daced46
Optimize CFG for cases of simple variables
...
Parameters/vals with an immediate initializer (which we assume is a
rather common situation) do not require any kind of complicated CFA
- Unused vals can be simply determined by linear traversal of
the pseudocode
- Definite assignment is a bit more complicated: a read-instruction of val
can be considered as a safe if it's located *after* the first write in
the pseudocode. It works almost always beside the case with do/while
(see the test changed). This case will be fixed in the further commits
The test for kt897.kt will also be fixed further, all other changes
might be considered as minor as they mostly change diagnostics for
already red code
2017-10-02 10:04:16 +03:00
Mikhail Zarechenskiy
17b4874c37
Refactor FakeCallResolver, make error reporting simpler
2017-09-01 02:05:50 +03:00
Mikhail Zarechenskiy
f5cd8c7e4d
Relax name shadowing warning on parameter names
...
#KT-17611 Fixed
2017-07-07 14:19:57 +03:00
Mikhail Zarechenskiy
9847278699
Report error about invalid if as expression on the if keyword
...
#KT-14633 Fixed
2017-06-22 14:18:11 +03:00
Mikhail Zarechenskiy
adb8e60615
Fix resolve of last destructuring declaration in block
...
Last declaration in block is resolved in DEPENDENT mode because it has
influence on return type and therefore fake call for destructuring declaration
wasn't completed (see `getBlockReturnedTypeWithWritableScope`)
Now we resolve fake call for destructuring declaration in INDEPENDENT
mode as it doesn't have effect on return type
#KT-15480 Fixed
2017-05-05 21:30:38 +03:00
Mikhail Zarechenskiy
32f609ceee
Check lambda parameter for name shadowing
...
#KT-5160 Fixed
2017-04-17 17:12:44 +03:00
Mikhail Zarechenskiy
e86d52b681
Fix return type of private members that return anonymous object
...
#KT-16813 Fixed
Anonymous objects returned from private-in-file members should behave as for private class members
2017-04-17 16:21:05 +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
Dmitry Petrov
caae6ff2ec
KT-16264 Forbid usage of _ without backticks
...
Forbid underscore-only (_, __, ___, ...) names as callees and as types.
If CHECK_TYPE directive is on, filter out UNDERSCORE_USAGE_WITHOUT_BACKTICKS messages.
2017-03-29 15:47:22 +03:00
Alexander Udalov
4f36376291
Do not report KCLASS_WITH_NULLABLE_ARGUMENT_IN_SIGNATURE anymore
...
It was only reported in already erroneous cases
2017-01-18 18:21:30 +03:00
Alexander Udalov
6a352a1da7
Report error on nullable type alias in class literal
...
#KT-15736 Fixed
2017-01-18 18:21:28 +03:00
Dmitry Petrov
954204da82
KT-1560
...
Report warning on extensions shadowed by members.
2017-01-16 17:25:13 +03:00
Stanislav Erokhin
0ef1234f2e
Added special error for incorrect KClass type in signatures.
2017-01-16 05:44:46 +03:00
Denis Zharkov
6fca46a452
Allow inferring property type from its getter
...
#KT-550 Fixed
2016-11-15 09:30:13 +03:00
Denis Zharkov
4c69416f2b
Report warning on unused entities that can be renamed to _
...
Currently it's all about lambda parameters/destructuring entries
#KT-14347 In Progress
2016-10-24 10:19:25 +03:00
Denis Zharkov
dbca310d8c
Support single-underscore variable names partially
...
Currently only parameters of lambdas/function expressions
and destructuring entries are allowed
#KT-3824 In Progress
#KT-2783 In Progress
2016-10-24 10:19:25 +03:00
Valentin Kipyatkov
ec51076355
DescriptorRenderer to render annotations for all types + separate option to render annotation arguments + use it in IdeDescriptorRenderers
2016-10-11 23:38:54 +03:00
Mikhail Glukhikh
8d48b0d2a0
UNUSED_VARIABLE is now reported only for last entry of destructuring declaration (if applicable) #KT-14221 Fixed
2016-10-10 14:42:09 +03:00
Mikhail Glukhikh
e7d290f726
Refactor PSI for destructuring declarations in for: they are now children of KtParameter and not instead of it
2016-10-06 21:03:19 +03:00
Denis Zharkov
e975d32196
Implement resolution of desctructuring declarations in lambdas
...
#KT-5828 In Progress
2016-09-19 20:22:57 +03:00
Denis Zharkov
ace3655824
Minor. Rename diagnostic tests: multiDeclarations -> destructuringDeclarations
2016-09-19 20:22:57 +03:00
Alexander Udalov
090d157f86
Update test data for data classes
2016-09-15 16:45:48 +03:00
Nikolay Krasko
300e0acd27
Report RETURN_NOT_ALLOWED and RETURN_IN_FUNCTION_WITH_EXPRESSION_BODY only on the return with label (KT-13340)
...
#KT-13340 Fixed
2016-08-05 13:16:05 +03:00
Alexander Udalov
0380b6cd88
Never resolve modality of members to SEALED
2016-07-26 21:16:15 +03:00
Denis Zharkov
4725dd3028
Implement recovery for incomplete expression before declaration
...
It's needed when declarations are parsed as a part of previous expression
(see tests)
Currently we apply this kind of recovery in a conservative way,
only when declaration starts at the next line, and while
the condition could be relaxed, there's no need to do this
#KT-4948 Fixed
#KT-7118 Fixed
2016-07-15 18:59:31 +03:00
Denis Zharkov
60a0cd8cfd
Do not add error types as upper bounds in type parameter
...
#KT-10237 Fixed
#KT-11821 Fixed
#KT-8200 Fixed
2016-07-04 18:16:05 +03:00
Mikhail Glukhikh
e66acd8101
Default modality is abstract for interface. REDUNDANT_MODIFIER_FOR_TARGET applicability reduced #KT-12302 Fixed
2016-05-24 14:25:22 +03:00
Dmitry Petrov
968ed3f091
KT-5068: Introduce a special diagnostic message for TYPE_MISMATCH cases such as 'fun f(): Int = { 1 }'.
2016-05-23 09:50:41 +03:00
Dmitry Petrov
440e02016b
KT-11588 Type aliases
...
Fix diagnostic tests (renamed diagnostic message)
2016-05-20 14:17:25 +03:00
Denis Zharkov
d0acb3674a
Fix rendered testData
...
New members in enum member scope
2016-05-16 15:38:13 +03:00
Denis Zharkov
628f9050fb
Report UNUSED_EXPRESSION on anonymous functions
2016-03-23 20:11:51 +03:00
Denis Zharkov
16736e3a0e
Resolve anonymous functions in block as expression
...
#KT-7265 Fixed
2016-03-23 20:08:15 +03:00
Pavel V. Talanov
1affb05b7b
Fix typechecker in case of "for ((a, b) in) { }"
...
Fixes NDFDE
2016-03-04 16:52:34 +03:00
Alexander Udalov
1b8f934b54
Delete deprecated enum 'values' property
2016-02-19 22:28:44 +03:00
Mikhail Glukhikh
883e2e4d2b
KT-9498 extension: now type can be inferred for getter with expression body
2016-02-19 14:49:25 +03:00
Dmitry Petrov
edf6a2142b
Check local function declarations for overload conflicts.
...
In PSI unifier tests, disable errors for tests on local functions (as irrelevant).
2016-02-12 09:54:21 +03:00
Pavel V. Talanov
7c84225cc4
Fix typechecker when initializer of destructuring declaration is unresolved or missing
2016-02-04 15:08:39 +03:00
Mikhail Glukhikh
1b8f938260
Report EXPOSED_PROPERTY_TYPE on a property name only #KT-10760 Fixed
2016-01-26 19:04:13 +03:00
Mikhail Glukhikh
b1e3e1c32d
A few forgotten checks added for objects (function members effective visibility, multiple varargs) #KT-10753 Fixed
2016-01-26 19:04:08 +03:00
Ilya Gorbunov
f4822cd757
Fix testData in compiler: add collections and ranges package to fq-names.
2016-01-22 05:54:38 +03:00
Dmitry Petrov
142e85be04
Prohibit functions (and constructors) with multiple vararg parameters.
2015-12-22 10:40:41 +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
Mikhail Glukhikh
c84b22396b
Diagnostic 'final function with no body' deleted because it's redundant
2015-11-20 15:43:25 +03:00
Mikhail Glukhikh
b5610eebae
Diagnostic 'final property in interface' deleted because it's redundant
2015-11-20 15:43:22 +03:00
Mikhail Glukhikh
cd1b58f2eb
Final in interfaces: deprecation ---> error + relevant test fixes
2015-11-20 15:43:19 +03:00