Commit Graph

32471 Commits

Author SHA1 Message Date
Denis Zharkov 84eb009c29 Refine stubs generation for special built-ins
Do not generate stub if declaration has the same signature

 #KT-12909 Fixed
2016-06-30 20:12:34 +03:00
Denis Zharkov 5c34b27ea9 Fix stub generation for special built-ins
Do not generate stubs if there is no special bridge in the current class
- there are already Kotlin super class in hierarchy
- special bridge has the same signature as method itself

 #KT-11915 Fixed
2016-06-30 20:12:34 +03:00
Alexander Udalov c07d0d48d3 Fix KCallable#callBy to JvmStatic companion object members
#KT-12915 Fixed
2016-06-30 19:41:47 +03:00
Nikolay Krasko e2bcdf8b9c Postpone counting fqName for anonymous classes (KT-12645)
#KT-12645 Fixed
2016-06-30 15:54:59 +03:00
Alexander Udalov 8357f3021e Do not report errors on fake elements in call checkers
#KT-12875 Fixed
2016-06-29 22:03:36 +03:00
Alexander Udalov 95291cdc18 Minor, move some checkers to more appropriate places 2016-06-29 22:03:35 +03:00
Alexander Udalov ff72348105 Report error on protected setter call from super's companion
#KT-12847 Fixed
2016-06-29 22:03:35 +03:00
Alexander Udalov 77bb691d4e Rename SymbolUsageValidator -> ClassifierUsageChecker
Also validateTypeUsage -> check
2016-06-29 22:03:34 +03:00
Alexander Udalov 89730dfbc3 Move SymbolUsageValidator#validatePropertyCall to CallChecker 2016-06-29 22:03:33 +03:00
Alexander Udalov d599d87978 Drop SymbolUsageValidator#validateCall in favor of CallChecker#check 2016-06-29 19:21:07 +03:00
Alexander Udalov 260689eb8c Invoke call checkers where symbol usage validators are called
The change in componentAccess.kt is a minor regression that should be addressed
later
2016-06-29 19:21:06 +03:00
Alexander Udalov 4a05c749b5 Support smart casts for functions of local variable delegates 2016-06-29 19:21:06 +03:00
Alexander Udalov 70a994b135 Drop resolution of deprecated plus/minus/get/set conventions
Also remove the corresponding quick fix
2016-06-29 19:21:05 +03:00
Alexander Udalov 291f1f6c3a Remove obsolete errors related to 'invoke' called on extension 2016-06-29 19:21:04 +03:00
Alexander Udalov 6ba32ed624 Refactor CallChecker and subclasses
Encapsulate everything that is needed in checkers into CallCheckerContext. Pass
an instance of this context instead of BasicCallResolutionContext to checkers.

Also pass an instance of the element to report errors on: this is useful
because before this, every checker had its own way of determining where should
the error be reported on. Some of them, for example, were not doing anything if
Call#calleeExpression returned null, which is wrong, see operatorCall.kt

 #KT-12875 Open
2016-06-29 19:20:00 +03:00
Alexander Udalov f6f825e0dc Minor, extract validatePropertyCall out of SymbolUsageValidator#validateCall
BasicExpressionTypingVisitor#checkLValue is the only place where it's used.
There's no ResolvedCall instance for the setter call (only for the property
itself), that's why this special method is needed
2016-06-29 19:19:59 +03:00
Alexander Udalov d7d2780666 Drop SymbolUsageValidator.Composite, use validators similarly to call checkers
Also fix warnings in DeprecatedSymbolValidator, DelegatedPropertyResolver and
elsewhere
2016-06-29 19:19:58 +03:00
Alexander Udalov e94fd8f777 Make infix & operator checkers implement CallChecker
Instead of SymbolUsageValidator
2016-06-29 19:19:57 +03:00
Yan Zhulanow bb083a51cc KT-12895, EA-84877: Fix NoSuchMethodError thrown when saving a Kotlin file.
newOutputStreamSupplier() is deprecated and was deleted in Guava 18.
2016-06-29 17:52:25 +03:00
Nikolay Krasko 51a2abdbc2 Minor: remove outdated comment 2016-06-29 16:16:32 +03:00
Nikolay Krasko eee45e91ce Add more tests for PropertyAccessorDescriptor.isDeafult() usages 2016-06-29 16:16:31 +03:00
Nikolay Krasko c936b3f3e0 Don't fail in setup because of access restricted exception 2016-06-29 16:16:30 +03:00
Kirill Rakhman 0320bd8184 Formatter: Remove spaces before question mark in nullable types (KT-12830)
#KT-12830 Fixed
2016-06-29 16:15:59 +03:00
Alexey Andreev 9a50e91cd8 KT-12893: fix another potential issue (could not reproduce) 2016-06-29 14:44:44 +03:00
Michael Bogdanov 476c1ec264 Compile android tests against jdk 6 2016-06-29 12:14:01 +03:00
Alexey Andreev 3a3e7bb814 KT-12893: when opening Kotlin compiler settings while kotlinc.xml does not specify which module kind to use, fallback to default value ("plain").
Fix #KT-12893
2016-06-29 12:02:26 +03:00
Michael Bogdanov a8af654a20 Exclude 'immutableRemove.kt' test from Android tests 2016-06-29 09:33:42 +03:00
Michael Bogdanov 3b419e8ba3 Fix for KT-11964: No TABLESWITCH in when on enum bytecode if enum constant is imported
#KT-11964 Fixed
2016-06-29 09:32:45 +03:00
Alexey Sedunov 81ec18e1fc Minor: Fix test data 2016-06-28 20:58:58 +03:00
Denis Zharkov efe718602a Support type aliases in incremental compilation
#KT-12871 Fixed
2016-06-28 16:22:08 +03:00
Denis Zharkov f1363cbf88 Fix visibility checks for constructor call based on type alias
Constructor is invisible iff. either underlying constructor or corresposing type alias is invisible

 #KT-12888 Fixed
2016-06-28 16:22:08 +03:00
Pavel V. Talanov 1b416a674d ChangeLog, minor: make usages of quotes and backticks more consistent 2016-06-28 16:08:10 +03:00
Pavel V. Talanov a6b1abf8d4 Minor: fix typos in ChangeLog 2016-06-28 16:08:08 +03:00
Pavel V. Talanov 5a2cd11c78 Update Changelog for 1.0.3 2016-06-28 16:08:06 +03:00
Alexey Sedunov b83902a8b5 Rename: Update references to facade class when renaming file via matching top-level class
#KT-11903 Fixed
(cherry picked from commit a1d9a25)
2016-06-28 15:07:39 +03:00
Alexey Sedunov 932892243c Line Markers: Filter out irrelevant declarations before resolving in KotlinTestRunLineMarkerContributor
#KT-12647 Fixed
(cherry picked from commit cceeaeb)
2016-06-28 15:07:37 +03:00
Alexey Sedunov 068a120600 Rename: Constraint search scope of parameter declared in a private member
#KT-9649 Fixed
(cherry picked from commit fa144b0)
2016-06-28 15:07:36 +03:00
Alexey Sedunov 746b8895e2 Rename: Disable JavaMemberByKotlinReferenceInplaceRenameHandler for synthetic properties referenced from Kotlin code
#KT-9168 Fixed
(cherry picked from commit dfebdaf)
2016-06-28 15:07:34 +03:00
Alexey Sedunov 7a584e876b Rename: Support automatic test renaming for facade files
#KT-10578 Fixed
(cherry picked from commit 35050f4)
2016-06-28 15:07:32 +03:00
Alexey Sedunov f9d28bf76d Override/Implement: Prefer not-nullable return type when overriding Java method without nullability annotation
#KT-12381 Fixed
(cherry picked from commit 2b87f8e)
2016-06-28 15:07:31 +03:00
Alexey Sedunov 542f8d9fd2 Move: Support quoted package names
#KT-12411 Fixed
(cherry picked from commit 95239e5)
2016-06-28 15:07:30 +03:00
Alexey Sedunov 89816c5f12 References: Support implicit references to annotation method 'value'. Support Find Usages/Rename on these references
#KT-12657 Fixed
(cherry picked from commit 68d0d84)
2016-06-28 15:07:28 +03:00
Alexey Sedunov efa27e6048 Rename: Suggest renaming both property accessors with matching @JvmName when renaming one of them from Java
#KT-12759 Fixed
(cherry picked from commit 81a8e6a)
2016-06-28 15:07:25 +03:00
Alexey Sedunov 248f4c1645 Light Classes: Implement light elements for 'extends'/'implements' reference lists. Support adding/removing of super type list entries via light elements.
Fix exception on applying "Convert to class" intention to Java interface with Kotlin inheritor(s)
 #KT-11281 Fixed
(cherry picked from commit 4ec4914)
2016-06-28 15:07:24 +03:00
Alexey Sedunov 8e061c9ec1 Implement Abstract Member: Navigate to the generated declaration
#KT-12290 Fixed
(cherry picked from commit 6274c6b)
2016-06-28 15:07:23 +03:00
Alexey Sedunov 0d80bf030f Create from Usage: Fix exception in "Create class" quickfix applied to unresolved references in type arguments. Create class body when necessary
#KT-12777 Fixed
(cherry picked from commit dc90ec9)
2016-06-28 15:07:21 +03:00
Alexey Sedunov ffe4e760d7 Override/Implement: Implement JavaDoc/KDoc copying
#KT-8682 Fixed
 #KT-12735 Fixed
(cherry picked from commit f4486be)
2016-06-28 15:07:19 +03:00
Alexey Sedunov 3f09b7f9d5 Minor: Rename jetRefactoringUtil.kt -> kotlinRefactoringUtil.kt
(cherry picked from commit a841f87)
2016-06-28 15:07:17 +03:00
Alexey Sedunov 0e5a997506 Minor: Drop unused variable
(cherry picked from commit 4441323)
2016-06-28 15:07:15 +03:00
Alexey Sedunov 296c7a16d3 Copy: Filter out invalid elements to prevent PsiInvalidElementAccessException
#KT-12747 Fixed
(cherry picked from commit 4a0a440)
2016-06-28 15:07:14 +03:00