Commit Graph

7112 Commits

Author SHA1 Message Date
Mikhail Glukhikh 771fb0ace2 Compiler warning on identical enum constant / is type entries #KT-4829 Fixed 2016-04-20 12:21:31 +03:00
Mikhail Glukhikh d7ecd12737 Minor refactoring: PatternMatchingTypingVisitor 2016-04-20 12:21:27 +03:00
Mikhail Glukhikh 5ec7b5bef0 Minor refactoring: WhenChecker 2016-04-20 12:21:22 +03:00
Dmitry Petrov 420c7a0285 KT-11111:
- override by a final inline fun is a warning
- override by a fun with reified type parameters is an error
2016-04-20 11:59:03 +03:00
Dmitry Petrov ef0f512201 java 2 kt: InlineAnalyzerExtension, convert 2016-04-20 11:59:03 +03:00
Dmitry Petrov 4c1694493a java 2 kt: InlineAnalyzerExtension, rename 2016-04-20 11:59:02 +03:00
Alexey Sedunov c21dff66aa Spring Support: Allow injection of SpEL into string literals with escape sequences
#KT-11904 Fixed
2016-04-19 20:27:26 +03:00
Yan Zhulanow 9b1402d804 Fix "No error on increment or augmented assignment when 'get' is an operator but 'set' is not" #KT-11300 2016-04-19 19:24:38 +03:00
Alexander Udalov 0494e1d258 Minor, add KtDoubleColonExpression#isEmptyLHS utility 2016-04-19 18:37:21 +03:00
Alexander Udalov fa31994442 J2K KtQualifiedExpression and subclasses: convert
Also merge KtQualifiedExpressionImpl into KtQualifiedExpression and remove
calls from subclasses
2016-04-19 18:37:20 +03:00
Alexander Udalov 093c2f63d4 J2K KtQualifiedExpression and subclasses: rename .java -> .kt 2016-04-19 18:37:19 +03:00
Alexander Udalov 9c99152126 Do not consider error results successful in '::' LHS resolution
Fixes EA-81649
2016-04-19 18:37:02 +03:00
Alexander Udalov be62caf335 Extract '::' type-checking code to DoubleColonExpressionResolver 2016-04-19 18:28:25 +03:00
Mikhail Glukhikh e60930d5ce Add variance modifier fix corrected: primary constructor parameters are taken into account 2016-04-18 13:40:50 +03:00
Natalia Ukhorskaya 070ee10872 Debugger: do not insert ambiguous imports inside codeFragments
#KT-11927 Fixed
2016-04-15 15:58:07 +03:00
Mikhail Glukhikh e806341cdc Increase visibility: make not available in case of potential exposed visibility problems (see KT-11920) 2016-04-15 15:20:35 +03:00
Mikhail Glukhikh 6acd4bc21d Refactoring: ExposedVisibilityChecker extracted from DeclarationsChecker 2016-04-15 15:20:30 +03:00
Mikhail Glukhikh ed4ccc6a19 Minor refactoring: EffectiveVisibility 2016-04-15 15:20:26 +03:00
Alexander Udalov 11d875ca17 Fix deadlock in StaticScopeForKotlinEnum
Also fix possible deadlock in ReflectionTypes

 #KT-11869 Fixed
2016-04-12 20:03:51 +03:00
Alexander Udalov 114713995f Cleanup CandidateResolver 2016-04-12 20:03:51 +03:00
Alexander Udalov 76d3246514 Fix type of member references without explicit class on LHS
Type of '::foo' for a function foo in a class A should be KFunction0<Unit>, not
KFunction1<A, Unit>. Continue to report an error in this case, to be maybe
supported in the future
2016-04-12 20:03:51 +03:00
Alexander Udalov d8263eb0b8 Assert that callable references cannot have expression on LHS 2016-04-12 20:03:51 +03:00
Stanislav Erokhin 3b41fcb5ba Refactoring. Add type safety to resolution. 2016-04-12 03:22:45 +03:00
Mikhail Glukhikh 1b2deb8a8a Message corrected for warning "some modifier is redundant because another is present" 2016-04-11 16:32:50 +03:00
Mikhail Glukhikh d79e3f322f Redundant modality modifier inspection #KT-11450 Fixed 2016-04-11 16:32:43 +03:00
Mikhail Glukhikh 8a0641a639 Warning about override / open redundancy is no more reported 2016-04-11 16:32:36 +03:00
Mikhail Glukhikh 1d83a1a97c Can be parameter inspection #KT-10819 Fixed 2016-04-11 16:32:26 +03:00
Dmitry Petrov 1f3323ed32 KT-11750 Do not report REDECLARATION on descriptors which are not available in sources. 2016-04-11 09:13:07 +03:00
Alexey Sedunov afecb09b6f Spring Support: Fix renaming of Spring bean declarations via SpEL references
#KT-11720 Fixed
 #KT-11725 Fixed
2016-04-09 21:13:21 +03:00
Alexey Sedunov 4ed1c3d448 Minor: Generify KtClassOrObject.addDeclarationXXX() 2016-04-08 21:11:25 +03:00
Alexey Sedunov f2e2220560 [RESTORED] Spring Support: Implement Spring-specific references 2016-04-08 21:11:15 +03:00
Yan Zhulanow 726bfca540 Change semantics of getObjectKeyword() function 2016-04-08 15:39:58 +03:00
Valentin Kipyatkov cdab9d5103 KT-11710 "Replace 'if' with elvis operator": incorrect code generated for 'if' expression
#KT-11710 Fixed
2016-04-07 18:50:32 +03:00
Alexander Udalov 7c90fbe4de Compute return type for property getters more safely
Do not call `isError()` on property's type right after creation of
PropertyGetterDescriptor because the property has no getter yet (it's created
but not yet stored to the property, that happens a bit later), and `isError()`
leads to computation of the delegate type, which for delegated properties
performs some complex resolution (see `VariableTypeResolver#process`) which
relies on the fact that the property already has a getter.

Since the purpose of the original change (883e2e4d) was to support a quick fix
which would add the type to a property in an expression like "val x get() =
...", check the type (or initializer) presence in the PSI instead, this is
safer and is still suitable for the quick fix.

Also fix arguments to "wrong getter type" diagnostic: previously something
useless like "expected Int, actual Int" was reported

 #KT-11809 Fixed
2016-04-07 15:35:58 +03:00
Stanislav Erokhin 187c0d4dd0 Refactoring. Change Key for TAIL_RECURSION_CALL from ResolvedCall to Call. 2016-04-06 13:55:36 +03:00
Stanislav Erokhin 516d4df834 Refactoring. Remove isSafeCall from ResolvedCall. 2016-04-06 13:55:35 +03:00
Stanislav Erokhin bf08341ee4 Refactoring. Change type of ResolvedCall#extensionReceiver from Receiver to ReceiverValue 2016-04-06 13:55:35 +03:00
Stanislav Erokhin 63a2d8a416 Refactoring. Remove receiverArgument from ResolutionCandidate. 2016-04-06 13:55:34 +03:00
Dmitry Jemerov 01b0cfb552 don't parse lines starting with @ as KDoc tags if they're inside a Markdown code fence
#KT-11789 Fixed
2016-04-05 19:48:51 +02:00
Mikhail Glukhikh 7c02a1eaad Refactoring: VarianceChecker / VarianceCheckerCore, check variance for a separate class 2016-04-05 17:47:20 +03:00
Mikhail Glukhikh 78a898651b Code cleanup: VarianceChecker 2016-04-05 17:45:51 +03:00
Pavel V. Talanov 8fe14b7ba5 KT-11765 Analyze code in anonymous initializer of inteface
#KT-11765 Fixed
2016-04-05 15:04:07 +03:00
Pavel V. Talanov 3f62b6c495 Typecheck call arguments if callee is resolved to variable
#KT-11579 Fixed
2016-04-04 21:13:22 +03:00
Stanislav Erokhin 832f468b13 KT-11733 Cannot infer type parameter in SAM with nullability annotations
#KT-11733 Fixed
2016-04-04 15:31:30 +03:00
Kirill Rakhman 2198a8c8d0 cleanup KtClassOrObject and KtClass 2016-04-04 13:45:30 +03:00
Pavel V. Talanov 781bc13941 ExceptionTracker: do not increment counter on ReenteringLazyValueComputationException
ReenteringLazyValueComputationException is in fact correct behaviour which does not indicate a problem we should try to recover from
This led to an obscure bug when resolve sessions were invalidated multiple times during light class construction (see KT-11635)
 #KT-11635 Fixed
2016-03-31 19:33:05 +03:00
Pavel V. Talanov 7de171efda Improve message clarity for WRONG_NUMBER_OF_TYPE_ARGUMENTS diagnostics
#KT-9887 Fixed
2016-03-31 16:06:48 +03:00
Denis Zharkov 92be4aee9c Prohibit protected constructor calls that are not super-calls in subtypes
#KT-11649 Fixed
2016-03-31 14:51:57 +03:00
Denis Zharkov 816f14a927 Minor. Covariantly override ClassDescriptor.original 2016-03-31 14:51:57 +03:00
Denis Zharkov 5bf336474d Respect receiver-dependent visibility when selecting smart-cast type 2016-03-31 14:51:57 +03:00