Natalia Ukhorskaya
27e602133d
Small fixes after review: do not set is_pure=true for named constants refactoring
2013-12-05 15:23:41 +04:00
Natalia Ukhorskaya
e5a3518248
Parse longs with 'L' suffix. Report error if 'l' used.
2013-12-05 15:23:40 +04:00
Natalia Ukhorskaya
b6ce6c5e5a
Parse floats with 'F' or 'f' suffix
2013-12-05 15:22:01 +04:00
Natalia Ukhorskaya
e805478d6c
Get call expression type from compile time value if possible
2013-12-05 15:22:00 +04:00
Natalia Ukhorskaya
53a5264aaf
Use type from compile time value for binary expression
2013-12-05 15:21:58 +04:00
Natalia Ukhorskaya
2a023c16a9
Use type from compile time value for prefix expression
2013-12-05 15:21:55 +04:00
Natalia Ukhorskaya
9c176ddaa8
Warning for integer overflow
2013-12-05 15:21:55 +04:00
Natalia Ukhorskaya
d63f6843c8
Merge ConstantExpressionEvaluator and CompileTimeConstantResolver
2013-12-05 15:21:50 +04:00
Andrey Breslav
9efa604cff
Revert 4ca90e9c68
2013-12-05 14:04:50 +04:00
Andrey Breslav
4ca90e9c68
Proper instructions for elvis operator
...
We should not mark elvis operator unused, for the rhs may have desired side-effects
2013-12-05 13:28:41 +04:00
Andrey Breslav
6df3a3042c
Properly handle the case of backing field access qualified with 'this' reference
2013-12-05 13:28:40 +04:00
Andrey Breslav
11fcd64949
Mark expressions for correct recognition by "unreachable code"
2013-12-05 13:02:17 +04:00
Andrey Breslav
b15b075484
Tests for bug in CFA: no return in when() is now detected
2013-12-05 13:02:15 +04:00
Andrey Breslav
ec39105183
Type parameter is not an expression: no need to report 'unused expression' on it
2013-12-05 13:02:14 +04:00
Andrey Breslav
1e2eb6dfa1
Special instructions added for calls and other constructs
2013-12-05 13:00:44 +04:00
Alexander Udalov
1c3383c811
Unextend Char from Number
...
This is impossible to achieve on JVM, where java/lang/Character does not extend
java/lang/Number
2013-12-04 15:57:53 +04:00
Alexander Udalov
7af72b98fe
Resolve generic bounds of all classes prior to supertypes
2013-12-04 15:57:53 +04:00
Alexander Udalov
4cd4026174
Support empty if-statements
...
Type-check "if (...) ;" to Unit, report "implicit cast to Unit", propagate data
flow info out of its condition
#KT-2478 Fixed
2013-12-04 15:19:47 +04:00
Alexander Udalov
dfd660a8e3
Try to resolve expression as class object if resolution found an inappropriate result
2013-12-03 19:00:44 +04:00
Alexander Udalov
310a70bf84
Report a separate diagnostic on inheritance from singletons
2013-12-02 19:56:16 +04:00
Alexander Udalov
080bd42f88
Allow singletons and functions with the same name
2013-12-02 19:56:15 +04:00
Alexander Udalov
c2598faa4e
Fix class object visibility check
...
ExpressionTypingContext now has a scope for visibility checking, which isn't
replaced on replaceScope()
2013-12-02 19:56:15 +04:00
Alexander Udalov
92cdb0b6e7
Fix imports from objects
...
This almost reverts 345ecbf , since now properties are no longer created for
objects
2013-12-02 19:56:13 +04:00
Alexander Udalov
dce9fbb91c
Report a proper error on class object in enum entry or object
...
CLASS_OBJECT_NOT_ALLOWED instead of MANY_CLASS_OBJECTS
2013-12-02 19:56:13 +04:00
Alexander Udalov
2e4807856f
Don't create NamespaceType for enum entries
...
Enum entry expressions have the type of their enum, so it shouldn't be possible
to access static nested classes of enum entries from outside.
This fixes BlackBoxCodegenTestGenerated$CallableReference.testEnumNameMethod
2013-12-02 19:56:13 +04:00
Mikhael Bogdanov
606b3aa4a9
Test for local fun
2013-12-02 18:30:43 +04:00
Mikhael Bogdanov
59dbf75d80
Added test for sam
2013-12-02 18:30:43 +04:00
Mikhael Bogdanov
712dcaac91
Added tests for && and ||
2013-12-02 18:30:43 +04:00
Mikhael Bogdanov
0b2c3efc40
Inline recursion diagnostic
2013-12-02 18:30:43 +04:00
Mikhael Bogdanov
621a4002e4
Binary and unary expression support
2013-12-02 18:30:42 +04:00
Mikhael Bogdanov
1391676281
Support parenthesized, typed and labeled expressions
2013-12-02 18:30:42 +04:00
Mikhael Bogdanov
4079735bf2
Diagnostic for nullable parameter of Function type
2013-12-02 18:30:42 +04:00
Mikhael Bogdanov
d11311ec20
Test compilation fix
2013-12-02 18:30:42 +04:00
Mikhael Bogdanov
eb3edeb527
Nothing to inline diagnostic
2013-12-02 18:28:24 +04:00
Mikhael Bogdanov
f7c62fe631
Checking modality and visibility of inline function
2013-12-02 18:28:24 +04:00
Mikhael Bogdanov
87e66a6e57
Diagnostric for default
2013-12-02 18:28:24 +04:00
Mikhael Bogdanov
7329a7a9ef
Diagnostic for vararg parameters
2013-12-02 18:28:24 +04:00
Mikhael Bogdanov
558687f20f
Inline visibility checking
2013-12-02 18:28:24 +04:00
Mikhael Bogdanov
c89c465fec
Diagnostics for wrong inlinable usage
2013-12-02 18:28:24 +04:00
svtk
b178c79573
analyze function arguments after completion for unresolved and ambiguity cases
2013-11-27 14:26:36 +04:00
svtk
1bfca62592
Fixed: analyze unmapped (or with no callee) functional arguments with right context.
2013-11-22 18:58:02 +04:00
svtk
ae3331717e
Fixed: unmapped arguments should be completed as well.
2013-11-22 18:58:02 +04:00
svtk
058726a0f1
Check function arguments of nested unsuccessful calls.
2013-11-22 18:58:02 +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
9d3a7804cc
Fixed tests for labels.
...
The bug was automatically fixed by previous commit.
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
2bd4aa97c6
KT-4204 ConstraintSystem erased after resolution completion
...
#KT-4204 Fixed
2013-11-22 18:57:59 +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
Andrey Breslav
345ecbf4c0
Never import object descriptors, for they may overwrite corresponding vals
2013-11-21 13:07:39 +04:00
Alexander Udalov
6f31692996
Import nested classes both from classes and their class objects
...
It seems that this incorrect behaviour was introduced in 726bcb5
2013-11-18 19:51:29 +04:00