Svetlana Isakova
e2f681c587
report type mismatch deeply on branches for if
...
in type argument inference case
2013-09-02 23:18:45 +04:00
Svetlana Isakova
99bb6f13b5
data flow info for arg may affect next argument's type for type argument inference case
2013-09-02 23:18:45 +04:00
Svetlana Isakova
27cff93ed8
use data flow info in constraint system
...
intersect data flow value possible types
add intersection type (or exact type for the most cases) as a lower bound to constraint system
always get common super type for intersection type as a result
(avoid returning it, even in error messages)
2013-09-02 23:18:45 +04:00
Svetlana Isakova
0609f61ee7
added test for nontrivial nested calls
2013-09-02 23:18:44 +04:00
Svetlana Isakova
0849798af0
report only 'The value is out of range'
...
not 'An integer literal does not conform to the expected type Int/Long'
2013-09-02 23:18:44 +04:00
Svetlana Isakova
f2746b835e
report ERROR_COMPILE_TIME_VALUE for constants instead of TYPE_MISMATCH
...
(functionality returned)
2013-09-02 23:18:44 +04:00
Svetlana Isakova
fccfa0051e
added DoubleValueTypeConstructor
...
no need to store exact value in IntegerValueTypeConstructor, it was removed
2013-09-02 23:18:43 +04:00
Svetlana Isakova
80eb45b793
process number value types properly in constraint system
...
the case when type parameter has number value types (constants) as lower bounds
should be handled specially, because upper bound for primitive number types is 'Number',
but by default we want Int (or Long)
2013-09-02 23:18:43 +04:00
Svetlana Isakova
0eed0c6c7f
extracted 'getResultingCall' method
...
rewrote 'getResultingType' in terms of it
2013-09-02 23:18:43 +04:00
Svetlana Isakova
2eadd5202d
check argument types through complete phase
...
with right data flow info
2013-09-02 23:18:42 +04:00
Mohammad Shamsi
32c34a3740
KT-3893 Fixed
...
- Added modifier check for parameters in constructors.
- Added modifier check for parameters in functions.
- Added modifier check for parameters in try/catch
2013-08-29 22:08:26 +08:00
Andrey Breslav
6cee65d74e
A test for nesting implicitly labeled calls
...
The actual error message should be "return not allowed", but due to a bug in label resolution it is "unresolved reference"
2013-08-22 17:13:08 +04:00
Andrey Breslav
55eb994502
KT-3919 Automatic labeling of lambdas by receiving functions
...
#KT-3919 Fixed
2013-08-22 14:27:01 +04:00
Andrey Breslav
a51ea10f55
No need to produce error types when RETURN_NOT_ALLOWED_EXPLICIT_RETURN_TYPE_REQUIRED is reported
2013-08-21 20:12:05 +04:00
Andrey Breslav
3f3ee378f3
Test that local return has type Nothing
2013-08-21 20:12:05 +04:00
Andrey Breslav
08625a6b2f
Local returns are only allowed with explicitly specified return types
...
This is a temporary limitation: otherwise type inference is having trouble to account for all the returned expressions.
We will fix the inference and remove the limitation
2013-08-21 20:12:04 +04:00
Andrey Breslav
4138ac4e36
Support local returns in lambdas
2013-08-21 20:12:04 +04:00
Andrey Breslav
db70087573
Labels on function literal arguments are processed properly
2013-08-21 20:12:04 +04:00
Andrey Breslav
9f90fd0938
No "unreachable code" errors when an illegal return expression is the last in a lambda
2013-08-21 20:12:04 +04:00
Andrey Breslav
3d28c4cdb2
Passing DataFlowInfo to local classes/objects
...
#KT-2835 In Progress
#KT-2225 In Progress
#KT-338 In Progress
2013-08-19 19:05:21 +04:00
Andrey Breslav
4908766813
Passing DataFlowInfo when analyzing property initializers
...
#KT-2835 In Progress
#KT-2225 In Progress
#KT-338 In Progress
2013-08-19 19:05:21 +04:00
Andrey Breslav
63c284e200
Passing DataFlowInfo to local classes/objects
...
#KT-2835 In Progress
#KT-2225 In Progress
#KT-338 In Progress
2013-08-19 19:05:20 +04:00
Natalia.Ukhorskaya
e11f130278
'annotation' keyword should be allowed only on classes
...
#KT-2785 Fixed
2013-07-25 17:00:10 +04:00
Natalia.Ukhorskaya
73000ec407
Change error message for nullable annotation member
2013-07-25 13:25:02 +04:00
Svetlana Isakova
539756ff3e
KT-3772 Invoke and overload resolution ambiguity
...
#KT-3772 Fixed
2013-07-16 20:33:08 +04:00
Evgeny Gerashchenko
5c8f87658a
Made SAM adapters final.
2013-07-12 21:09:22 +04:00
Andrey Breslav
8d65613eed
Create <out Any?> projections for raw Java types, not <*>
...
KT-3760 Internal compiler error with Java interoperability and ElasticSearch 0.90.2 (IllegalStateException, Type parameter descriptor in not initialized: T declared in ...)
#KT-3760 Fixed
EA-44150 Type parameter descriptor in not initialized. Fixed
2013-07-10 08:28:47 +04:00
Svetlana Isakova
d3e6d2d6cd
do not need to check stand-alone class object for class,
...
when it's on the left hand side of dot it is analyzed in 'getIdForImplicitReceiver' (test added)
2013-07-05 18:03:52 +04:00
Svetlana Isakova
cf5c5dba3d
KT-3189 Function invoke is called with no reason
...
prioritize tasks specially for invoke
#KT-3189 Fixed
#KT-3190 Fixed
#KT-3297 Fixed
2013-07-05 18:03:51 +04:00
Natalia.Ukhorskaya
33ddd713b7
Check annotation constructor parameter types
2013-07-04 14:37:29 +04:00
Evgeny Gerashchenko
1f2676becd
Ignoring SAM adapters when checking for unimplemented methods or methods to override.
2013-06-25 20:17:45 +04:00
Evgeny Gerashchenko
cfc99b941a
Added test for ambiguous SAM adapters within one class.
2013-06-25 20:16:20 +04:00
Svetlana Isakova
041505f5b8
report UNRESOLVED_REFERENCE_WRONG_RECEIVER
...
mentioning candidates with wrong receiver
2013-06-20 13:43:03 +04:00
Svetlana Isakova
342e9ebe7a
KT-3563 Compiler requiring java.io.File, and it's unclear why
...
#KT-3563 fixed
2013-06-20 13:43:02 +04:00
Andrey Breslav
3e8031acbd
Properly load objects nested into class objects from Java
2013-06-10 15:33:10 +04:00
Nikolay Krasko
27baad64c0
Fix recursion of checking type is supertype during resolving list of supertypes
2013-06-07 17:24:18 +04:00
Nikolay Krasko
37cd7eb1ba
Allow resolve class declarations in class objects
...
Use INACCESSIBLE_OUTER_CLASS_EXPRESSION error for marking already resolved elements
#KT-3261 Fixed
2013-06-07 17:24:17 +04:00
Svetlana Isakova
ca88a01e1d
no 'dangling function literal' check for nested calls
2013-06-06 17:20:10 +04:00
Svetlana Isakova
f41584c7ab
tests added
...
for inference for delegated properties
2013-06-06 16:31:06 +04:00
Svetlana Isakova
7e564de71a
added constraint for package level delegated property
2013-06-04 22:11:43 +04:00
Svetlana Isakova
2337f4b948
bug fix
...
do not combine receiverInfo with error selectorInfo
2013-06-04 22:11:43 +04:00
Svetlana Isakova
ecec6acde8
use explicit type of delegated property as expected
...
while resolving constraint system for delegated expression
2013-06-04 22:11:43 +04:00
Svetlana Isakova
f05f616230
KT-2422 Invalid warning "Condition is always true"
...
#KT-2422 fixed
2013-05-31 16:29:07 +04:00
Natalia.Ukhorskaya
b9e5227b58
Change String argument of property delegate method to PropertyMetadata
2013-04-30 21:47:24 +04:00
Natalia.Ukhorskaya
a9b4a342e7
Add diagnostics for get/set methods of property delegate
2013-04-30 20:08:06 +04:00
Natalia.Ukhorskaya
c58d4fd6d2
Resolve expression in property delegate
2013-04-30 20:08:04 +04:00
Natalia.Ukhorskaya
e7bf3b141f
Modify analysis for property initializer. Add errors about delegated property accessors.
2013-04-30 20:07:55 +04:00
Wojciech Lopata
59716fec9c
Cleanup in a test
2013-04-26 13:12:20 +04:00
Mikhael Bogdanov
aa2db75266
KT-3389: Local class construction results in CompilationException && KT-2873 && KT-3210
...
KT-2873: VerifyError on instantiating a local class inside a closure
KT-3210 Inline Class: CompilationException: Back-end (JVM) Internal error: wrong code generated java.lang.ArrayIndexOutOfBoundsException null
#KT-3389 Fixed
2013-04-24 13:49:47 +04:00
Alexander Udalov
fee7846c7e
LHS of callable reference can't be a type parameter
2013-04-22 17:59:31 +04:00