Ilya Chernikov
46a7c706e1
Fixes and refactorings after review
2016-08-11 09:11:11 +02:00
Ilya Chernikov
9f18ad606a
Fix exception on incompatible resolver class - #EA-86599
2016-08-11 09:11:11 +02:00
Ilya Chernikov
c9441bd7b3
Update template(s) provider interface to support multiple templates, rename it appropriately
2016-08-11 09:08:40 +02:00
Mikhail Glukhikh
687698da9a
Do not report USELESS_CAST when casting null to nullable (special case)
2016-08-10 12:23:02 +03:00
Mikhail Glukhikh
8d537d294a
Minor: imports removed, formatting
2016-08-10 12:22:58 +03:00
Mikhail Glukhikh
098520de64
CAST_NEVER_SUCCEEDS: do not report when casting nullable to nullable #KT-260 Fixed
2016-08-10 12:22:53 +03:00
Alexey Sedunov
8a9a3285de
Introduce Variable: Skip leading/trailing comments inside selection
...
#KT-13054 Fixed
2016-08-10 11:45:33 +03:00
Mikhail Glukhikh
729de536de
Rewrite slice error removed for LEAKING_THIS #KT-13371 Fixed
...
Also EA-86478 fixed
(cherry picked from commit 5ac3126)
2016-08-09 10:28:40 +03:00
Mikhail Glukhikh
13e64c18d9
Correct CFA order for enums: first own members, then entries, and at last companion object members #KT-6054 Fixed
...
(cherry picked from commit 94d3b4c)
2016-08-09 10:28:27 +03:00
Mikhail Glukhikh
0c98231f53
Report UNINITIALIZED_VARIABLE also for qualified object property #KT-12809 Fixed
...
(cherry picked from commit 7b2857f)
2016-08-08 17:48:08 +03:00
Mikhail Glukhikh
35446037bb
UNINITIALIZED_ENUM_ENTRY compiler warning introduced #KT-2349 Fixed
...
(cherry picked from commit 76ac6d1)
2016-08-08 17:47:56 +03:00
Mikhail Glukhikh
b7ed68db05
CFA: No more UNRESOLVED_CALL for object / enum entry qualifiers
...
(cherry picked from commit 4b09de8)
2016-08-08 17:47:40 +03:00
Mikhail Glukhikh
962c2e5dd2
ControlFlowInformationProvider: convert to Kotlin
...
(cherry picked from commit a1394bc)
2016-08-08 17:45:52 +03:00
Mikhail Glukhikh
16cf6379c1
ControlFlowInformationProvider.java --> ControlFlowInformationProvider.kt
...
(cherry picked from commit 28bb9ea)
2016-08-08 17:45:41 +03:00
Nikolay Krasko
bfb4c48785
Minor: rename variables
2016-08-05 16:46:25 +03:00
Nikolay Krasko
300e0acd27
Report RETURN_NOT_ALLOWED and RETURN_IN_FUNCTION_WITH_EXPRESSION_BODY only on the return with label (KT-13340)
...
#KT-13340 Fixed
2016-08-05 13:16:05 +03:00
Mikhail Zarechenskiy
7679e49b25
Do not generate properties for script parameters if there is template definition
2016-08-04 15:19:15 +03:00
Natalia Ukhorskaya
6a04cd39b2
Debugger: allow to evaluate kotlin expressions in java files
...
#KT-7549 Fixed
If the context is inside PsiJavaFile, get list of all local variables available in current frame (this logic was removed in 29778311e8 01.12.2015 Drop unnecesary logic about additional context for lambda in debugger). For each variable create KtProperty inside top-level KtFunction in KtFile and set it as contextElement for KtCodeFragment. This file should have all imports from PsiJavaFile. We do not create properties on top-level because they will be highlighted as top-level vals/vars.
2016-08-03 17:51:49 +03:00
Ilya Chernikov
1248230c69
Fix after review, add logging for scripting-specific behavior
2016-08-03 09:51:40 +02:00
Ilya Chernikov
f73b8e80be
Fixes after review
2016-08-03 09:51:40 +02:00
Ilya Chernikov
df64736192
Refactor script dependnecies template and resolver interfaces:
...
- get rid of obsolete interfaces and annotations
- rename actual resolver interface to ScriptDependenciesResolver
- make ScriptDependenciesResolverEx interface compatible with the one from 1.1-M01 to be able to support both on the provider side
- add possibility to override file patter in the script template provider
- construct resolver lazily, if possible
2016-08-03 09:51:40 +02:00
Ilya Chernikov
8024367915
Move KotlinScriptDefinitionFromTemplate to separate file...
...
leaving only interfaces in the scriptTemplate.kt. It could now be extracted into the separate lib if necessary.
2016-08-03 09:51:40 +02:00
Ilya Chernikov
c73ab6c0a1
Fix pathlist comparison - fixes too frequent caches updates
2016-08-03 09:51:40 +02:00
Ilya Chernikov
31d9da3d4f
Update resolver interface - make it return Future and add message reporter function +
...
plus minor fixes
2016-08-03 09:51:40 +02:00
Ilya Chernikov
5117ecb817
Collect annotations lazily
2016-08-03 09:51:40 +02:00
Ilya Chernikov
3b1e7494b8
Change dependencies resolver API - it gets message reporter and returns Future now
2016-08-03 09:51:40 +02:00
Pavel V. Talanov
500554e58c
Clarify API so that it's possible to get single KotlinScriptExternalDependencies per script file
2016-08-03 09:51:40 +02:00
Ilya Chernikov
59712d4bf8
Implement updatable dependencies index with usage API in the environment for using in REPL
2016-08-03 09:51:40 +02:00
Ilya Chernikov
210a37e08c
Support for multiparam dependency annotations (with reservations)
...
Due to missing feature (#KT-13106) it works either with single argument
or with all named arguments.
2016-08-03 09:51:40 +02:00
Ilya Chernikov
5900cad8b3
Add possibility to pass script dependency resolver directly rather than via definition annotation
...
This may help to reduce dependencies in certain situations
2016-08-03 09:51:40 +02:00
Mikhail Glukhikh
b7fd41844d
Wrap with safe let call handles qualified calls correctly #KT-13262 Fixed
...
(cherry picked from commit 7044348)
2016-08-01 12:24:38 +03:00
Mikhail Glukhikh
f309021c9f
KT-11425: convert !a.equals(b) to a != b
...
(cherry picked from commit 56c7786)
2016-08-01 12:23:07 +03:00
Stanislav Erokhin
19e4dbc37c
Refactoring. Move functionTypeResolveUtils.kt to resolution module.
2016-07-29 17:53:11 +03:00
Stanislav Erokhin
df461d6e7f
Refactoring. Remove supertype TowerContext from class InvokeTowerContext.
2016-07-29 17:53:11 +03:00
Stanislav Erokhin
2c2f105c5d
Do not add receiver for function expression by expected type.
2016-07-29 17:53:10 +03:00
Dmitry Petrov
a08e70879f
KT-13161 java static methods call not working for typealias
...
Introduce special qualifier for type aliases with member scope
containing static class members only.
2016-07-28 17:38:36 +03:00
Mikhail Glukhikh
6e391854a0
Data flow values refactoring: removed DataFlowValue.kind.isStable, renamed DataFlowValue.isPredictable -> DataFlowValue.isStable
2016-07-28 15:14:48 +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
e515d7f773
Data flow analysis: unnecessary assignment removed (related to complex expressions)
2016-07-27 16:24:36 +03:00
Mikhail Glukhikh
1c9f08e986
Data flow values: STABLE_COMPLEX_EXPRESSION kind is removed, no use cases exist for them
2016-07-27 16:24:32 +03:00
Mikhail Glukhikh
c7af3f7865
Data flow values: more accurate handling of postfix ++ and --
2016-07-27 16:24:27 +03:00
Mikhail Glukhikh
692623cb55
Cleanup: smart casts of safe call receiver applied (do NOT cherry-pick to 1.0.X)
2016-07-27 16:24:18 +03:00
Stanislav Erokhin
f3be1b8f1f
Add assertion for variable as function call with explicit type parameters.
2016-07-27 13:17:15 +03:00
Mikhail Glukhikh
b56e84d47f
Cast never succeeds: special 'Nothing' / 'Nothing?' case
...
(cherry picked from commit 63435b4)
2016-07-27 10:52:13 +03:00
Mikhail Glukhikh
b88282c0fc
Suppress CAST_NEVER_SUCCEEDS removed from source code
...
(cherry picked from commit d448a92)
2016-07-27 10:51:30 +03:00
Mikhail Glukhikh
a902c4901a
CAST_NEVER_SUCCEED: replace subtyping check with subclassing check #KT-13206 Fixed
...
(cherry picked from commit 5fc797a)
2016-07-27 10:51:13 +03:00
Alexander Udalov
0380b6cd88
Never resolve modality of members to SEALED
2016-07-26 21:16:15 +03:00
Alexander Udalov
d945c33d5e
Move some members from OverrideResolver to OverridingUtil
2016-07-25 15:55:31 +03:00
Alexander Udalov
475fb6e8a7
Simplify OverrideResolver#filterOverrides
...
- move source vs binary equivalent call filtering hack to
ResolutionResultsHandler (see c4778bfe5a for
the original commit introducing this behavior)
- rewrite the algorithm so that it doesn't need noDuplicates in the beginning:
modulo the hack above whish is only needed in ResolutionResultsHandler,
descriptor equivalence is checked anyway in OverrideResolver#overrides
2016-07-25 15:55:31 +03:00
Alexander Udalov
a6faab834d
Move OverrideResolver#generateOverridesInAClass to CollectionStubMethodGenerator
...
Also simplify substantially
2016-07-25 15:55:31 +03:00