Commit Graph

5698 Commits

Author SHA1 Message Date
Alexey Sedunov 5bc2a4b14c Create From Usage: Do not keep semantic information in quickfix instances directly as it leads to memory leaks 2015-07-28 23:24:22 +03:00
Alexey Sedunov 7dc430e50b Pull Up: Support super-interfaces 2015-07-28 18:48:35 +03:00
Alexey Sedunov 1a09741c0a Pull Up: Move property initializers 2015-07-28 18:48:33 +03:00
Alexey Sedunov 39ff3c3000 Pull Up: Initial support
#KT-7330 Fixed
2015-07-28 18:48:29 +03:00
Alexey Sedunov 3c36795984 Refactoring: Extract JetClassOrObject.getOrCreateBody() function 2015-07-28 18:48:26 +03:00
Mikhail Glukhikh d6406d8d4a Annotation repetition checking with a pair of tests, some old tests changes 2015-07-28 17:13:32 +03:00
Dmitry Jemerov 978fb2c1cf don't go outside of file when trying to find enclosing element for declaration 2015-07-27 11:43:12 +02:00
Sergey Mashkov 0453368990 Better main function recognition and tests
fix vararg main
2015-07-24 17:20:40 +03:00
Sergey Mashkov 8457b53f8b Better main function recognition and tests 2015-07-24 17:20:40 +03:00
Pavel V. Talanov 273e69c02c Refactor: Pass buitlins into IntegerValueTypeConstant and IntegerValueTypeConstructor 2015-07-24 13:47:59 +03:00
Pavel V. Talanov 0bed8bb7d4 Minor: Inject builtins into OverloadingConflictResolver 2015-07-24 13:47:57 +03:00
Pavel V. Talanov 4599c962f0 Refactor: make OverloadingConflictResolver and ResolutionResultsHandler components instead of singletons 2015-07-24 13:47:57 +03:00
Pavel V. Talanov 1559c53007 Minor: Inject builtins into DataFlowAnalyzer 2015-07-24 13:47:56 +03:00
Pavel V. Talanov 78f55583f0 Minor: CompileTimeConstantUtils, builtins are not needed to check for string type 2015-07-24 13:47:55 +03:00
Pavel V. Talanov 7203a7833a Minor: Inject builtins in ControlFlowAnalyzer 2015-07-24 13:47:55 +03:00
Pavel V. Talanov 99e8ba1947 Get rid of static function ConstantExpressionEvaluator.evaluateToConstant 2015-07-24 13:47:53 +03:00
Pavel V. Talanov 6698b3b070 Refactor: get rid of static ConstantExpressionEvaluator.evaluate function
Move ArgumentTypeResolver.getLastElementDeparenthesized to JetPsiUtil
2015-07-24 13:47:52 +03:00
Pavel V. Talanov 8cc9739f72 Refactor: Pass TargetPlatform instead of configurator, hide DynamicTypesSettings inside configurator 2015-07-23 16:15:38 +03:00
Pavel V. Talanov 84b8ed00c5 Refactor: Move TargetPlatform to frontend, make it expose platform dependant resolve services
AdditionalCheckerProvider -> PlatformConfigurator which operates directly on container
2015-07-23 16:15:35 +03:00
Pavel V. Talanov b452c20cc2 Minor: Remove unused references to AdditionalCheckerProvider 2015-07-23 16:15:31 +03:00
Pavel V. Talanov 3227ae5577 Inject non-context dependent CallCheckers instead of getting them from context 2015-07-23 16:15:28 +03:00
Pavel V. Talanov 2885da8993 Remove AdditionalTypeChecker from context, inject into points of usage 2015-07-23 16:15:18 +03:00
Pavel V. Talanov be98c4f96d DataFlowUtils -> DataFlowAnalyzer and make it a component 2015-07-23 16:15:13 +03:00
Pavel V. Talanov 985336d6cc Remove SymbolUsageValidator from contexts 2015-07-23 16:15:10 +03:00
Pavel V. Talanov b75779b425 Inject SymbolUsageValidator into CallExpressionResolver 2015-07-23 16:15:01 +03:00
Pavel V. Talanov a75b80c70d Inject declarations checkers into ModifiersChecker 2015-07-23 14:43:08 +03:00
Pavel V. Talanov f5878eddd4 Refactor ModifiersChecker to be more component-like
A couple of minor prettifications
2015-07-23 14:42:34 +03:00
Mikhail Glukhikh f551d64ea2 Refactoring: AnnotationTarget / AnnotationRetention renamed to KotlinTarget / KotlinRetention
(for not clashing with the same built-in classes)
2015-07-22 19:01:25 +03:00
Zalim Bashorov 679d5fe496 Introduce UsageCollector 2015-07-21 22:27:27 +03:00
Zalim Bashorov df4f43267b Provide location parameter in delegations 2015-07-21 22:27:26 +03:00
Zalim Bashorov 41449c107e Location.NOWHERE -> UsageLocation.NO_LOCATION 2015-07-21 22:27:25 +03:00
Zalim Bashorov e2e3520c3d Add location parameter to JetScope::getClassifier 2015-07-21 22:27:25 +03:00
Zalim Bashorov 0f92036353 Add location parameter to JetScope::getFunctions 2015-07-21 22:27:25 +03:00
Zalim Bashorov f79155df97 Add location parameter to JetScope::getProperties 2015-07-21 22:27:24 +03:00
Stanislav Erokhin 9e36e5a8b1 Not store call to resolutionResultsCache in INDEPENDENT mode 2015-07-21 21:50:27 +03:00
Stanislav Erokhin f802d79305 Minor. move method 2015-07-21 21:50:27 +03:00
Pavel V. Talanov 4e0d2bc23c CompileTimeConstantUtils: use getConstant instead of evaluate
Hacky way to avoid passing builtins into this code
2015-07-21 20:52:43 +03:00
Pavel V. Talanov 855e3d2bf4 Inject ConstantExpressionEvaluator in BasicExpressionTypingVisitor via ExpressionTypingComponents 2015-07-21 20:52:42 +03:00
Pavel V. Talanov b4825ada69 Refactor ExpressionTypingVisitorDispatcher
Inject in in ExpressionTypingServices
2015-07-21 20:52:41 +03:00
Dmitry Petrov 6437a4bdc6 Support overload ambiguity resolution for callable references by expected type.
Resolve callable references taking into account expected callable types.

This affects call resolution procedure (resolve 'foo' in for 'foo(::bar)') similar to the approach used for function literals:

* During "shape arguments" phase of call resolution, callable references are resolved in independent context without expected type. If the callable reference is ambiguous, its shape type is a function placeholder type without parameter types and return type information. Otherwise, it is a reflection type for the resolved function or property. Upper-level call is resolved without taking into account ambiguous callable references.

* During "complete call" phase of call resolution, resolve callable reference arguments to actual descriptors (if possible), and update constraint system for the given call accordingly.

 #KT-6982 Fixed
 #KT-5780 Fixed
2015-07-21 18:33:15 +03:00
Dmitry Jemerov 6bf934b472 code cleanup: frontend module 2015-07-21 16:20:51 +02:00
Valentin Kipyatkov 14b63759a9 Added comment 2015-07-21 16:00:10 +03:00
Mikhail Glukhikh 94a00540be Targeting / retention for a set of standard annotations, some inapplicable annotation checks replaced with target check, some fixed tests 2015-07-21 15:36:53 +03:00
Denis Zharkov 3ec00114c0 Check type of elvis with expected type info
#KT-6713
2015-07-21 15:16:06 +03:00
Valentin Kipyatkov 0d09c55bac JetPackageDirective made not JetExpression 2015-07-21 08:36:36 +03:00
Valentin Kipyatkov fac55b60fa Lazy computation of smart cast types for receivers in call resolve 2015-07-21 08:32:52 +03:00
Valentin Kipyatkov 4a8adacedd Changed policy for properties from methods like "getURL()"" 2015-07-21 08:32:50 +03:00
Valentin Kipyatkov 23cfe88b71 KT-8530 Synthetic properties doesn't work with smart casts
#KT-8530 Fixed
2015-07-21 08:32:50 +03:00
Ilya Ryzhenkov eb97005cb5 Avoid creating SimpleResolutionContext in ConstantExpressionEvaluator to updateNumberType 2015-07-20 20:58:20 +03:00
Ilya Ryzhenkov 84236992cb Replace Injected properties with constructor parameters when it doesn't cause cycles 2015-07-20 20:58:19 +03:00