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
Mikhail Glukhikh
d024045638
Data flow values for Elvis / parenthesized expressions, smart casts on them
2015-12-11 15:17:29 +03:00
Mikhail Glukhikh
745a3aeeac
Accurate representation of smart casts on complex expressions
2015-12-11 15:17:25 +03:00
Mikhail Glukhikh
7cd867b936
DFA: take into account if / else and when expression assignments #KT-10002 Fixed
...
Also #KT-7479 Fixed
2015-12-11 15:17:22 +03:00
Mikhail Glukhikh
c73f01927a
'sealed' is now not 'final' by default + related code changes #KT-10266 Fixed
2015-12-09 19:19:04 +03:00
Dmitry Jemerov
e97e82d119
use terms "lambda expression" and "anonymous function" instead of "function literal" and "function expression"
2015-12-09 13:55:40 +01:00
Mikhail Glukhikh
57b3bc0496
Regression: getPredictableNullability for unnecessary safe call check #KT-10276 Fixed
2015-12-08 11:23:35 +03:00
Mikhail Glukhikh
5c9e55f3fb
DFA bug fix: assignment of unstable to stable uses predictable type set (see test)
2015-12-08 10:13:38 +03:00
Mikhail Glukhikh
2e73bcb3a6
DFA bug fix: assignment of unstable to stable uses predictable nullability (see test)
2015-12-08 10:13:34 +03:00
Mikhail Glukhikh
5729855e4f
Type parameter as result type: more precise expected type definition #KT-5385 Fixed
...
Tests for KT-5385 KT-10223 KT-7800 KT-7817 + something related
2015-12-04 19:00:24 +03:00
Mikhail Glukhikh
fe04cc513b
Original type is taken into account when intersecting possible types in resolve #KT-10232 Fixed
2015-11-30 19:09:44 +03:00
Mikhail Glukhikh
8788d8e2d5
Call chains: receiver data flow info is dropped for extensions with nullable receiver #KT-10056 Fixed
2015-11-27 20:23:25 +03:00
Mikhail Glukhikh
9a6d4c32c5
More accurate handling of "always null" for receivers
2015-11-25 18:26:15 +03:00
Mikhail Glukhikh
89e56093a2
Limit "always null" scope: only for !!, is and dot; senseless comparison rolled back; "smart constant" information for nulls #KT-10029 Fixed
2015-11-25 18:26:08 +03:00
Dmitry Petrov
da90c21284
Warn about comma-separated conditions in when without argument.
...
See KT-5143.
2015-11-25 15:39:23 +03:00