Commit Graph

34079 Commits

Author SHA1 Message Date
Alexey Tsvetkov 8a5df120a5 Ensure java is forced to compile when kotlin is compiled incrementally
Previously java compilation was not forced when there were only
removed kotlin files.
2016-09-05 14:51:49 +03:00
Alexander Udalov cb209074d3 Minor, add regression test on incomplete code with callable reference
#KT-13685 Fixed

(cherry picked from commit c8b30d3310c990193414d7f82bedd50189e0109c)
2016-09-05 13:13:57 +03:00
Nikolay Krasko 67f353903e Show lint diagnostics even if there're errors in the file (KT-12022)
It also affects working with KotlinChangeLocalityDetector. Right after error is fixed in local context file is still reported as having errors and diagnostics are not counted.

 #KT-12022 Fixed
2016-09-02 13:41:24 +03:00
Nikolay Krasko 795fef20d7 Don't highlight declaration with WRAPPED_INTO_REF
Leave highlighting only for usage. This may allow to make highlighting more local and lazy.
Java follows the same rules for "Implicit anonymous class parameter".
2016-09-02 13:41:24 +03:00
Nikolay Krasko f797d53343 Precheck method is called main in RunConfiguration check 2016-09-02 13:41:24 +03:00
Nikolay Krasko 9a54aa99fa Drop kotlin-bare-plugin (KT-11859) 2016-09-02 13:41:24 +03:00
Nikolay Krasko 4a0f14b64b Minor: toString() for NONE filter 2016-09-02 13:41:24 +03:00
Nikolay Krasko 52dd02fe08 Make changes in super call lambda not cause out-of-block modification (KT-13474)
#KT-13474 Fixed
2016-09-02 13:41:24 +03:00
Nikolay Krasko 64d511566e Test that out-of-block behaviour conforms running the analyze of the nearest expression
Mark as exceptions cases with field initialize expression and body of class init for now
2016-09-02 13:41:24 +03:00
Nikolay Krasko ec6780b49c Use AtomicLong for modification stamp 2016-09-02 13:41:24 +03:00
Nikolay Krasko 82bcd8192b Re-highlight only single function after local modifications 2016-09-02 13:41:24 +03:00
Nikolay Krasko 043502f836 Minor: remove warnings and refactoring 2016-09-02 13:41:24 +03:00
Dmitry Petrov e0cdad30e4 KT-13181 Unresolved reference when referencing a type alias from a different module
Add corresponding resolution code.
2016-09-02 10:18:23 +03:00
Dmitry Petrov 6428a7655d KT-13422 Type alias for Java exception class can be used as an object in 'throw' expression
Report NO_COMPANION_OBJECT for type aliases.
2016-09-02 10:18:22 +03:00
Mikhail Glukhikh c7f87e655c Build fix (ConvertLambdaToReferenceIntention) 2016-09-01 18:45:42 +03:00
Stanislav Erokhin 9fa6fb213b Potential fix for some random errors about "cannot choose between equals invoke functions". 2016-09-01 18:01:56 +03:00
Stanislav Erokhin bebc75c8ef Set reference target and report custom error instead unresolved reference for cases: interface, generic parameter, object + invoke, class without companion.
#KT-2787 Fixed.
2016-09-01 18:01:55 +03:00
Stanislav Erokhin eb6f444c19 Minor. rename context -> candidateFactory 2016-09-01 18:00:23 +03:00
Stanislav Erokhin 0072d6004a Refactoring: rename TowerContext to CandidatesFactory, InvokeTowerContext to CandidateFactoryProviderForInvoke. 2016-09-01 18:00:22 +03:00
Stanislav Erokhin c910646eda Refactoring: remove name from ScopeTower. 2016-09-01 18:00:21 +03:00
Stanislav Erokhin aa5be2ec7b Refactoring remove scopeTower from TowerContext. 2016-09-01 18:00:21 +03:00
Stanislav Erokhin ddb75abe30 Rename ScopeTower to ImplicitScopeTower. 2016-09-01 18:00:20 +03:00
Stanislav Erokhin 0c60cda22a Refactoring: replace ReceiverValue to ReceiverValueWithSmartCastInfo, Receiver to DetailedReceiver 2016-09-01 18:00:20 +03:00
Stanislav Erokhin d4a2cad35c Refactoring move DataFlowValue back to frontend module. 2016-09-01 18:00:19 +03:00
Stanislav Erokhin 58fd24943d Refactor DataFlowDecorator. 2016-09-01 18:00:18 +03:00
Stanislav Erokhin 8d2d5ea211 Minor refactoring in NewKotlinTypeChecker 2016-09-01 18:00:18 +03:00
Stanislav Erokhin ea2d95fa79 Minor. Change predicate type from KotlinType to UnwrappedType. 2016-09-01 18:00:17 +03:00
Stanislav Erokhin ca6c6ae0f3 Refactoring. Move creation of functionProcessor into resolution module. 2016-09-01 18:00:17 +03:00
Ilya Gorbunov 5dc31d2614 Mock-runtime isn't available when this configurations is run on teamcity. 2016-09-01 15:07:23 +03:00
Denis Zharkov cebe67d90c Fix default value generation after suspension point
Replace coercion from VOID with call 'pushDefaultValueOnStack'

It's necessary because coercion of VOID to java/lang/Object ends with Unit instance on stack
that makes variables spilling algorithm thinking that variable is Unit

 #KT-13409 Fixed
2016-09-01 15:03:31 +03:00
Denis Zharkov 1226d8fc2c Refine 'handleResult' calls generation within coroutines
Before this change everything works just fine for 'handleResult' methods
accepting non-Unit parameters

For other cases the same coercion-to-unit strategy is in plain lambdas:
- if last statement is not Unit type, execute it, pop from the stack, then put Unit instance
- for 'return@label' (no expression) just put Unit on the stack

 #KT-13531 Fixed
2016-09-01 15:03:31 +03:00
Denis Zharkov 12dad29336 Minor. Cleanup block codegen
- Clarify variable names
- Use explicit condition 'statements.isEmpty()' instead of implicit one 'answer == null'
2016-09-01 15:03:31 +03:00
Mikhail Glukhikh 2ab553243c Convert lambda to reference: use fully qualified type names if needed #KT-13438 Fixed
(cherry picked from commit e2e761e)
2016-09-01 14:44:36 +03:00
Mikhail Glukhikh a41c4b9a0f Convert lambda to reference: flexible receiver types are handled correctly #KT-13411 Fixed
(cherry picked from commit ecad1c3)
2016-09-01 14:44:22 +03:00
Mikhail Glukhikh 863e4afc7b Convert lambda to reference: no more allowed for extension KFunction parameters #KT-13527 Fixed
(cherry picked from commit 84c4ff7)
2016-09-01 14:44:11 +03:00
Mikhail Glukhikh ec41289664 Convert lambda to reference: range reduced to a call itself #KT-13661 Fixed
(cherry picked from commit f7b5d34)
2016-09-01 14:44:00 +03:00
Alexey Sedunov a6e3aac7ca Convert to Kotlin: AbstractExpressionSelectionTest 2016-09-01 13:43:54 +03:00
Alexey Sedunov 96a2c97aa2 Convert to Kotlin: AbstractExpressionSelectionTest (rename to .kt) 2016-09-01 13:43:53 +03:00
Alexey Sedunov b0a1eca1ce Convert to Kotlin: AbstractSmartSelectionTest 2016-09-01 13:43:52 +03:00
Alexey Sedunov 1ab40f6d88 Convert to Kotlin: AbstractSmartSelectionTest (rename to .kt) 2016-09-01 13:43:51 +03:00
Alexey Sedunov f6d0fca57b Refactoring: Split KotlinRefactoringUtil2.kt to several files 2016-09-01 13:43:50 +03:00
Alexey Sedunov b6a671c45f Convert to Kotlin: KotlinRefactoringUtil2 (replace object with top-level declarations) 2016-09-01 13:43:49 +03:00
Alexey Sedunov 16b4c2c70d Convert to Kotlin: KotlinRefactoringUtil2 (prettify) 2016-09-01 13:43:48 +03:00
Alexey Sedunov fc9b28884d Convert to Kotlin: KotlinRefactoringUtil2 2016-09-01 13:43:48 +03:00
Alexey Sedunov 1f8dba9c89 Convert to Kotlin: KotlinRefactoringUtil2 (rename to .kt) 2016-09-01 13:43:47 +03:00
Alexey Sedunov f47b416f2a Minor: Temporary rename of KotlinRefactoringUtil before conversion to Kotlin (to avoid conflict with existing kotlinRefactoringUtil.kt) 2016-09-01 13:43:46 +03:00
Alexey Sedunov da273419b9 fixup! Introduce Type Parameter 2016-09-01 13:43:45 +03:00
Alexey Sedunov 2f9a911624 Introduce Type Parameter
#KT-13155 Fixed
2016-09-01 13:43:44 +03:00
Mikhail Glukhikh cd717467f0 Nested classes are no more allowed inside any anonymous objects or local classes #KT-13510 Fixed
(cherry picked from commit 5c3ec6c)
2016-08-31 19:28:13 +03:00
Mikhail Glukhikh f8039249c6 CFA: additional jumps to catch / finally generated in the end of try / before exits from try #KT-5469 Fixed
Also #KT-13612 Fixed
(cherry picked from commit 7c188b3)
2016-08-31 19:28:09 +03:00