Mikhail Glukhikh
cd717467f0
Nested classes are no more allowed inside any anonymous objects or local classes #KT-13510 Fixed
...
(cherry picked from commit 5c3ec6c)
2016-08-31 19:28:13 +03:00
Mikhail Glukhikh
f8039249c6
CFA: additional jumps to catch / finally generated in the end of try / before exits from try #KT-5469 Fixed
...
Also #KT-13612 Fixed
(cherry picked from commit 7c188b3)
2016-08-31 19:28:09 +03:00
Mikhail Glukhikh
6a9d058db4
UNUSED_VALUE is now reported on expression only if this expression is unused in all (e.g. finally) branches #KT-9825 Fixed
...
(cherry picked from commit aac8e94)
2016-08-31 19:28:00 +03:00
Mikhail Glukhikh
25eefdb6ec
Pseudocode label now cannot be bound to a non-owning pseudocode #KT-13555 Fixed
...
Also EA-77641 Fixed
(cherry picked from commit 07643ce)
2016-08-25 10:32:04 +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
shiraji
a3f131d6c6
KT-13521 Warning right part of "expression ?: null" is useless
...
#KT-13521 Fixed
2016-08-23 01:10:10 +09:00
Mikhail Glukhikh
ac3dfd93bd
More correct handling of compile time constant types #KT-13421 Fixed
2016-08-18 14:42:16 +03:00
Mikhail Glukhikh
ae856e834a
Store map (Call to KotlinType) for SMARTCAST slice #KT-13426 Fixed
...
Also EA-86848 Fixed
2016-08-17 16:09:45 +03:00
Mikhail Glukhikh
cbcef67d82
KT-13426: store map from ImplicitReceiver into KotlinType for implicit receiver smart casts
2016-08-17 16:09:34 +03:00
Ilya Gorbunov
d943079557
Exception typealiases rendering in test output
2016-08-17 12:40:50 +03:00
Michael Bogdanov
7325baa06a
Fix for KT-13374: CompilationException: Inline function call with anonymous object implementing an interface by delegation
...
#KT-13374 Fixed
2016-08-16 10:47:01 +03:00
Alexander Udalov
7b8ee5fba1
Add test case for obsolete issue
...
#KT-13172 Fixed
2016-08-15 19:41:47 +03:00
Alexander Udalov
bd88b0941d
Fix incorrect unsupported error on synthetic extension call on LHS of ::
...
#KT-13271 Fixed
2016-08-15 19:41:47 +03:00
Stanislav Erokhin
85a951db52
Fixed exception AssertionError: Illegal resolved call to variable with invoke
...
#KT-13330 Fixed
#KT-13349 Fixed
2016-08-15 19:24:17 +03:00
Mikhail Glukhikh
1c5c6506ce
Report of UNINITIALIZED_ENUM_COMPANION also for implicit receivers #KT-11769 Fixed
2016-08-12 15:06:43 +03:00
Mikhail Glukhikh
04f71bccf2
KT-11769 case with companion function call: error is now detected if companion receiver is stated explicitly
2016-08-12 15:06:38 +03:00
Mikhail Glukhikh
6cf90cfc4e
Fix for SOE in VarianceChecker #KT-13401 Fixed
2016-08-11 13:04:58 +03:00
Mikhail Glukhikh
d21061ff60
CAST_NEVER_SUCCEEDS: some type alias tests (1.1 only!)
2016-08-10 12:23:09 +03:00
Mikhail Glukhikh
687698da9a
Do not report USELESS_CAST when casting null to nullable (special case)
2016-08-10 12:23:02 +03:00
Mikhail Glukhikh
098520de64
CAST_NEVER_SUCCEEDS: do not report when casting nullable to nullable #KT-260 Fixed
2016-08-10 12:22:53 +03:00
Mikhail Glukhikh
30fd22499b
Test data fix (after cherry-pick from 1.0.4)
2016-08-09 10:32:15 +03:00
Mikhail Glukhikh
b668206aa7
Minor: test comment, relevant to KT-13322
...
(cherry picked from commit 7606b1d)
2016-08-09 10:28:49 +03:00
Mikhail Glukhikh
729de536de
Rewrite slice error removed for LEAKING_THIS #KT-13371 Fixed
...
Also EA-86478 fixed
(cherry picked from commit 5ac3126)
2016-08-09 10:28:40 +03:00
Mikhail Glukhikh
13e64c18d9
Correct CFA order for enums: first own members, then entries, and at last companion object members #KT-6054 Fixed
...
(cherry picked from commit 94d3b4c)
2016-08-09 10:28:27 +03:00
Alexander Udalov
1bc7b4e363
Fix test data
2016-08-08 21:48:10 +03:00
Mikhail Glukhikh
0c98231f53
Report UNINITIALIZED_VARIABLE also for qualified object property #KT-12809 Fixed
...
(cherry picked from commit 7b2857f)
2016-08-08 17:48:08 +03:00
Mikhail Glukhikh
35446037bb
UNINITIALIZED_ENUM_ENTRY compiler warning introduced #KT-2349 Fixed
...
(cherry picked from commit 76ac6d1)
2016-08-08 17:47:56 +03:00
Mikhail Glukhikh
b7ed68db05
CFA: No more UNRESOLVED_CALL for object / enum entry qualifiers
...
(cherry picked from commit 4b09de8)
2016-08-08 17:47:40 +03:00
Alexander Udalov
de68d96236
Minor, add test for obsolete issue
...
#KT-12843 Obsolete
2016-08-08 15:42:52 +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
Stanislav Erokhin
2c2f105c5d
Do not add receiver for function expression by expected type.
2016-07-29 17:53:10 +03:00
Dmitry Petrov
a08e70879f
KT-13161 java static methods call not working for typealias
...
Introduce special qualifier for type aliases with member scope
containing static class members only.
2016-07-28 17:38:36 +03:00
Mikhail Glukhikh
4f7d8e34b0
Data flow values: initializers for local variables are now stored as "bound values" with inherited nullability #KT-6840 Fixed
2016-07-27 16:24:50 +03:00
Mikhail Glukhikh
c7af3f7865
Data flow values: more accurate handling of postfix ++ and --
2016-07-27 16:24:27 +03:00
Mikhail Glukhikh
7c66f632ca
Receiver smart casts: additional test for a?.b() when b is invokable property
2016-07-27 16:24:23 +03:00
Mikhail Glukhikh
b56e84d47f
Cast never succeeds: special 'Nothing' / 'Nothing?' case
...
(cherry picked from commit 63435b4)
2016-07-27 10:52:13 +03:00
Mikhail Glukhikh
a902c4901a
CAST_NEVER_SUCCEED: replace subtyping check with subclassing check #KT-13206 Fixed
...
(cherry picked from commit 5fc797a)
2016-07-27 10:51:13 +03:00
Alexander Udalov
0380b6cd88
Never resolve modality of members to SEALED
2016-07-26 21:16:15 +03:00
Alexander Udalov
b72293883d
Fix algorithm of determining modality for fake overrides
...
Previously we inferred "open" if there was at least one open member in the
hierarchy. However, that's not correct when that member is overridden by
another member in the hierarchy which is abstract. This led to incorrect code
being accepted by the front-end, and an exception during the bridge generation
#KT-12467 Fixed
2016-07-26 21:16:15 +03:00
Alexander Udalov
9be219b69c
Check presence of dispatch receiver parameter in modifier checks
...
Also fix typo in "inapplicable infix" diagnostic message
2016-07-22 18:13:39 +03:00
Alexander Udalov
9ab8da2ef9
Fix type of reference to protected var
...
#KT-12982 Fixed
2016-07-22 11:05:19 +03:00
Alexander Udalov
00f1415ed7
Fix "rewrite at slice LEXICAL_SCOPE" during callable reference resolution
...
Following the TODO in CallableReferencesResolutionUtils.kt, delete the
suspicious scope and use the new resolution process with the qualifier which
was obtained after the resolution of LHS. However, by default the tower
resolution algorithm also considers each qualifier as a class value as well,
which would be wrong here because resolution of LHS as a "value" happens
earlier in DoubleColonExpressionResolver and with slightly different rules. To
avoid that, do not mix in the "explicit receiver" scope tower processor when
creating processors for callable reference resolution.
Also delete unused functions and classes related to deleted scope, refactor
Scopes.kt
#KT-8596 Fixed
2016-07-22 11:05:19 +03:00
Alexander Udalov
7b59864ed9
Refine double colon LHS resolution if expression is an object
2016-07-22 11:05:19 +03:00
Alexander Udalov
5a6237b357
Refactor resolution of double colon expression LHS
...
Try resolving the LHS only when it looks (PSI-wise) like it could represent a
type element. This, for example, allows "illegal selector" error to be reported
on weird expressions like '""?.""::class'.
Also remove expression text from the "illegal selector" diagnostic, it's not
needed and can screw up the error message if the text is too big
2016-07-22 11:05:19 +03:00
Mikhail Glukhikh
5a2f34b351
Deduct x != null from x?.y is NotNullType
2016-07-21 21:15:34 +03:00
Mikhail Glukhikh
11f50186fa
x?.y != null and x?.call() != null provoke now x != null, a set of tests #KT-2127 Fixed
2016-07-21 21:15:19 +03:00
Mikhail Glukhikh
dbbc4ec281
Array<Subtype> can be now cast to Array<Supertype(?)> without CAST_NEVER_SUCCEEDS #KT-6391 Fixed
...
(cherry picked from commit 2629d55)
2016-07-21 20:16:06 +03:00
Mikhail Glukhikh
90e5e561e3
KT-6391: Arrays with same erased types counted as cast-compatible now
...
(cherry picked from commit 9e6f4bf)
2016-07-21 20:15:55 +03:00
Stanislav Erokhin
6556cde329
Introduce new type checker.
2016-07-21 16:07:16 +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