Pavel V. Talanov
59f192ef90
Replace 'class object' with 'default object' in renderers and test data
...
Includes changes to decompiled text
Old syntax is used in builtins and project code for now
2015-03-06 19:36:54 +03:00
Stanislav Erokhin
57fd5cc84c
Support local return in lambda without explicit return type
2015-02-24 14:14:49 +03:00
Pavel V. Talanov
7b837e2631
Updata test data: txt files for diagnostics tests
2015-02-16 15:38:36 +03:00
Andrey Breslav
da639039bd
KT-6698 Bad class file when using a star-projection on a Java's recursive generic parameter
...
#KT-6698 Fixed
2015-02-02 19:52:00 +03:00
Evgeny Gerashchenko
897854b3dc
KT-6671 Report unused constructor parameters
...
#KT-6671 fixed
2015-01-27 22:38:27 +03:00
Svetlana Isakova
9dbcd8b55f
Approximate captured types only when necessary
2015-01-21 15:37:33 +03:00
Alexander Udalov
f3b2193afd
Delete traces of "jet" in test data and unimportant code
2015-01-13 15:02:16 +03:00
Svetlana Isakova
74a08c9747
Added tests for simple approximation (of Captured(out/in Int))
2014-12-27 00:55:26 +03:00
Svetlana Isakova
9d09a4d1b4
Fixed message for TYPE_INFERENCE_EXPECTED_TYPE_MISMATCH error
2014-12-27 00:55:26 +03:00
Svetlana Isakova
6489ff2cb6
Ignore constraint from implicit 'in Nothing'
...
From Array<T> <: Array<out Int> we may generate T >: Nothing (implicit) and T <: Int (explicit).
Without ignoring we'll infer 'Nothing' for T too often
2014-12-22 12:04:42 +03:00
Svetlana Isakova
bda5bab057
Captured type might be substituted in an opposite projection
...
out Captured (in Int) = out Int
in Captured (out Int) = in Int
2014-12-16 14:41:56 +03:00
Svetlana Isakova
1f6f607f40
Type variable with non-trivial upper bound cannot capture 'in' projection
2014-12-12 23:08:29 +03:00
Svetlana Isakova
0149e8048c
Capture notnullable type if type variable is nullable
2014-12-12 23:08:29 +03:00
Svetlana Isakova
7a5124215a
Updated test data for Array<out T> vararg type
2014-12-12 23:08:28 +03:00
Svetlana Isakova
5b4f10e698
Made vararg parameters have Array<out T> type
...
instead of simply Array<T>
#KT-1638 Fixed
#KT-2163 Fixed
#KT-3213 Fixed
#KT-4172 Fixed
#KT-5534 Fixed
2014-12-12 23:08:28 +03:00
Svetlana Isakova
a3e949674f
Preserve nullability while substituting captured types
2014-12-12 23:08:28 +03:00
Svetlana Isakova
f9d4a68c6e
KT-6320 AssertionError in ConstraintSystem(The constraint shouldn't contain different type variables on both sides: Y <: X)
...
#KT-6320 Fixed
2014-12-12 23:08:27 +03:00
Svetlana Isakova
1fb713342b
Capture types only on the top level
2014-12-12 23:08:27 +03:00
Svetlana Isakova
cd359a046c
Added captured types and approximation
...
CapturedType captures type projection while solving the constraint system.
During the substitution type containing captured types is approximated
to get rid of captured types and (for simple cases) replace them with corresponding type projections.
Note that Array<Array< CapturedType(out Int) >> is (over)approximated by Array<out<Array<out Int>>
See 'Mixed-site variance' by Ross Tate for details.
#KT-2570 Fixed
#KT-2872 Fixed
#KT-3213 Fixed
2014-12-12 23:08:27 +03:00
Denis Zharkov
654411a0b0
Refactored tests using Array constructor:
...
Some moved to tests with stdlib
Some changed to use arrayOfNulls
2014-12-11 16:04:03 +03:00
Alexander Udalov
a7b88e9485
Make CharSequence.length a function instead of property
...
And String.length as well.
This is done for JVM interoperability: java.lang.CharSequence is an open class
and has a function 'length()' which should be implemented in subclasses
somehow.
A minor unexpected effect of this is that String.length() is now a compile-time
constant (it wasn't such as a property because properties are not supported in
compile-time constant evaluation)
#KT-3571 Fixed
2014-11-27 20:38:17 +03:00
Svetlana Isakova
724f2e6e7b
KT-6081 Chained generic method calls: wrong type inference
...
#KT-6081 Fixed
2014-11-27 02:28:10 +03:00
Andrey Breslav
0eee83b6ec
Lazy logs removed
2014-11-21 18:59:45 +03:00
Svetlana Isakova
2a83053355
Updated lazy log tests
2014-11-21 14:02:45 +03:00
Svetlana Isakova
8109b1f997
DONT_CARE placeholder can be nullable after a substitution
...
Interpret it as DONT_CARE as well (not as an error type where an error was generated before)
#KT-6175 Fixed
2014-11-21 14:02:41 +03:00
Stanislav Erokhin
b7c473f59e
Update lazy.log files
2014-11-17 17:45:01 +03:00
Alexander Udalov
128c938965
Make Array.size() a function instead of a property
...
Also add a deprecated extension property to help migration. This is done to
unify getting size of arrays and collections
2014-11-17 15:02:38 +03:00
Pavel V. Talanov
d2cfcfa659
Fix test data after changes to renderer and descriptors
2014-11-14 17:09:05 +03:00
Alexander Udalov
4f0d83a7fe
Update lazy logs after field rename
2014-11-11 18:35:39 +03:00
Andrey Breslav
4892369cf4
Diagnostic tests are logging their lazy activity
2014-11-10 17:24:04 +02:00
Andrey Breslav
0e42de4e99
CHECK_TYPES injected through imports
2014-10-22 00:41:19 +04:00
Alexander Udalov
3a8ad45dec
Append newline to EOF for .txt test data files
...
Reverts and fixes 102f0d3
2014-10-21 03:18:27 +04:00
Alexander Udalov
6ddc063a76
Regenerate test data on enums
...
Now they have final equals, hashCode and compareTo
2014-10-17 21:27:24 +04:00
Andrey Breslav
e418a763db
Fix JetType.equals(): flexible types are not equal to non-flexible ones, when we store them in a HashSet
2014-10-13 15:38:15 +04:00
Svetlana Isakova
ce01c61811
Rename: auto cast -> smart cast
2014-10-01 18:52:52 +04:00
Nikolay Krasko
e796f88b38
Regenerate test data with constructed descriptors for diagnostics tests
2014-09-18 17:58:23 +04:00
Svetlana Isakova
79cec6411d
Mark only unreachable parts of element if it has reachable parts
...
like for 'return todo()' mark only 'return'
2014-06-21 12:26:33 +04:00
Andrey Breslav
851fbbc937
Test data fixed
2014-06-19 22:10:50 +04:00
Svetlana Isakova
928b28e080
Complete type inference for nested calls
...
inside non resolved invocation
2014-04-30 13:34:31 +04:00
Svetlana Isakova
4657a4b271
fixed bug in renderer for violated upper bound error
2013-12-27 16:02:16 +04:00
Svetlana Isakova
dd6940be41
added CHECK_TYPE directive to diagnostic tests
2013-12-19 13:01:05 +04:00
Svetlana Isakova
46b77f4472
don't report unnecessary smart cast on receiver
2013-12-11 19:53:50 +04:00
Svetlana Isakova
c30259dfbe
added info about smart casts to diagnostic tests
2013-12-11 19:53:50 +04:00
Andrey Breslav
11fcd64949
Mark expressions for correct recognition by "unreachable code"
2013-12-05 13:02:17 +04:00
Mikhael Bogdanov
d11311ec20
Test compilation fix
2013-12-02 18:30:42 +04:00
svtk
1a34dffb1f
Fixed inference in a simple case.
...
Try number lower bounds before upper bounds when computing a value.
2013-11-22 18:58:01 +04:00
svtk
ca1650d31d
Fixed exception from EA
...
"The constraint shouldn't contain different type variables on both sides: T <: R".
It occurred because we analyzed function literals before completion with unsubstituted (therefore wrong) expected type, and cached resulting type.
2013-11-22 18:58:01 +04:00
svtk
c1ec8cbde9
check Nothing type for all expressions not only for calls and simple names
...
(but excluding statement expressions)
2013-11-22 18:57:58 +04:00
Svetlana Isakova
af930012d5
removed stored systemWithoutExpectedTypeConstraint
...
now we can filter out constraints of special type if necessary
2013-10-16 19:51:53 +04:00
Svetlana Isakova
65e2f47bc3
try intersection of upper bounds as a suggestion
...
not each bound itself
while resolving constraint system
2013-10-16 19:51:53 +04:00