Mikhail Glukhikh
adbece82ef
Clear DF info for variables assigned in 'try' #KT-17929 Fixed
2017-05-26 15:39:27 +03:00
Mikhail Glukhikh
0fd70df681
Add tests for KT-17929
2017-05-26 15:39:25 +03:00
Dmitry Neverov
cd24adac32
Detect redundant 'is' check
...
#KT-14187 Fixed
2017-05-15 11:24:35 +03:00
Mikhail Zarechenskiy
7541a3754d
Move SAM constructors to synthetic scope
2017-05-05 21:30:35 +03:00
Mikhail Glukhikh
56e633e345
CFA: detect captured writes more precisely
...
So #KT-14381 Fixed
So #KT-13597 Fixed
Also refactors captured writes detection inside DFA
2017-05-02 19:59:23 +03:00
Mikhail Zarechenskiy
7f287a4230
Support warning about useless cast on safe cast
...
#KT-13348 Fixed
2017-04-10 12:48:09 +03:00
mglukhikh
4700936f66
DFA: count null comparison as identity comparison #KT-16538 Fixed
...
+ minor parameter refactoring
2017-03-24 17:33:42 +03:00
Mikhail Glukhikh
b7fb45f36e
DFA: only stable values or qualified with stable receiver can be bound in x = y #KT-15792 Fixed
2017-01-23 13:38:24 +03:00
Mikhail Glukhikh
905e67e713
Data flow information: take language version into account while processing safe calls and bound values #KT-14350 Fixed
2017-01-23 13:38:24 +03:00
Mikhail Glukhikh
b6443eed9e
Data flow information: stable complex expressions introduced back for brackets / elvis / if / when #KT-13468 Fixed
...
This reverts commit e515d7f773 and
also commit 1c9f08e986
(cherry picked from commit 9fa155b)
2017-01-18 18:54:08 +03:00
Mikhail Glukhikh
86bc49558d
Tests for KT-13468 / KT-13765
...
(cherry picked from commit 2e4c0b4)
2017-01-18 18:53:55 +03:00
Alexander Udalov
c1eebacd55
Do not render declarations from other modules in diagnostic tests
...
Because PackageViewDescriptor may consist of several package fragments from
different modules (see LazyPackageViewDescriptorImpl#fragments), we now filter
out fragments from irrelevant modules before rendering them into the .txt
2016-11-25 20:50:21 +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
Valentin Kipyatkov
41ee06ec96
Use parameter names in DescriptorRenderer
2016-10-11 23:38:49 +03:00
Alexander Udalov
090d157f86
Update test data for data classes
2016-09-15 16:45:48 +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
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
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
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
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
Nikolay Krasko
eee45e91ce
Add more tests for PropertyAccessorDescriptor.isDeafult() usages
2016-06-29 16:16:31 +03:00
Mikhail Glukhikh
422ea4c6cb
KT-12152 : constructor consistency: handle open property accessing
2016-06-03 09:45:45 +03:00
Mikhail Glukhikh
6b945ba103
Regular checkType() is now called during condition analysis, TYPE_MISMATCH_IN_CONDITION removed #KT-11998 Fixed
2016-04-27 18:12:28 +03:00
Denis Zharkov
b94baede38
Minor. Fix rendered Throwable member scope
2016-04-25 17:41:08 +03:00
Mikhail Glukhikh
a830d80dac
Values equality no more provides guarantee for their types equality (for open types or types with overridden equals) #KT-11280 Fixed
2016-03-15 11:01:39 +03:00
Mikhail Glukhikh
96a7febd09
Smart cast is performed now inside 'x as? Type ?: return' safe as / elvis combination #KT-10992 Fixed
2016-03-02 10:07:33 +03:00
Mikhail Glukhikh
17593e4ef6
Call completer: safe call with nullable receiver has nullable return type #KT-11007 Fixed
2016-02-13 10:48:07 +03:00
Ilya Gorbunov
5361f6e941
Make Throwable properties message and cause open.
...
#KT-5587 Fixed
2016-02-08 18:10:46 +03:00
Denis Zharkov
8df05c6c4c
Refine 'isMoreSpecific' calculation
...
Choose member with better visibility, it's needed for proper calculation
of types intersection member scope
#KT-10481 Fixed
2016-02-02 15:26:49 +03:00
Mikhail Glukhikh
ed8ccdc15a
Take into account data flow info changes for special call (if/when/elvis/!!) arguments #KT-10824 Fixed
...
Smart casts on complex expressions look as no more possible
2016-01-28 19:30:20 +03:00
Mikhail Glukhikh
5062ce2804
Regression: correct smart cast from Type? to Type!
2016-01-28 17:08:15 +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
Stanislav Erokhin
d7438d9f2b
Add mock runtime to diagnostic tests.
...
Mock runtime contains function from file Standard.kt
2016-01-25 19:13:30 +03:00
Mikhail Glukhikh
e9af4d25d0
Handling of try / catch / finally with 'Nothing' in all catch blocks #KT-10735 Fixed
2016-01-22 16:37:22 +03:00
Mikhail Glukhikh
366ab508e1
Data flow analysis: assignment of null makes variable effectively of type 'Nothing?'
2016-01-22 16:37:10 +03:00
Mikhail Glukhikh
859059d714
Bug fix: jump out of a loop inside if condition
2016-01-22 16:37:07 +03:00
Mikhail Glukhikh
3106a8508a
Front-end and back-end test for KT-7801
2016-01-22 16:37:00 +03:00
Mikhail Glukhikh
7ac55cefcb
Extra test with smart cast to 'T'
2016-01-22 16:36:57 +03:00
Dmitry Petrov
f371e67ce8
PatternMatchingTypingVisitor:
...
rewrite type inference for 'when' using special constructs.
This fixes several type inference issues for 'when':
KT-9929, KT-9972, KT-10439, KT-10463
along with some other diagnostics-related issues.
2016-01-22 10:41:55 +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
Alexander Udalov
078a53e6a0
Minor, add regression test for KT-10444
...
#KT-10444 Obsolete
2016-01-17 16:28:22 +03:00
Mikhail Glukhikh
0f80df7b2e
initialDataFlowInfoForArguments introduced in CallExpressionResolver methods #KT-10175 Fixed
2016-01-15 17:22:42 +03:00
Stanislav Erokhin
3d44471659
KT-10483 Missing smart cast on variable in variable as function call
...
#KT-10483 Fixed
2015-12-25 20:13:08 +03:00
Denis Zharkov
b4bb92d136
Fix overload resolution ambiguity for types intersection
...
There are two different forms of types intestion:
1. Type parameters with multiple bounds
2. Smart casts
The problem was that when member scope of type intersection contained
effective duplicates and that lead to overload resolution ambiguity in
strange cases like `x.hashCode()`
For first type we do effectively the same thing as when building member
scope for class extending several interfaces: group all descriptors by
both-way-overridability relation and then choose most-specific in each
group.
For smart casts we do basically the same thing but with special
treatments:
1. From all descriptors that _equal_ to most specific we choose
the one that works without smartcast if possible (i.e. we choose first from candidates list)
2. If smart-cast value seems to be unstable we use only member scope
of receiver type + all descriptors from smart cast possible types
that has incompatible signature. If we'd include all of them and
choose one as more specific, and it would lead to false
SMART_CAST_IMPOSIBLE (see test unstableSmartCast.kt)
#KT-3996 Fixed
#KT-10315 Fixed
2015-12-15 16:18:31 +03:00
Mikhail Glukhikh
6fb871a088
A set of additional tests for complex expressions DFA
2015-12-11 15:17:37 +03:00