Commit Graph

32251 Commits

Author SHA1 Message Date
Mikhail Glukhikh 048b6b60e9 dangerousFlexibleTypeOrNull : minor refactoring
(cherry picked from commit 31e8fe5)
2016-06-21 15:22:26 +03:00
Mikhail Glukhikh 70becfbd86 Has platform type inspection is now intention-based
(cherry picked from commit 7cc6b9b)
2016-06-21 15:22:15 +03:00
Mikhail Glukhikh a68e8e0db5 Introduce additional fixes & configurable problem range for intention-based inspection
(cherry picked from commit ed23aa9)
2016-06-21 15:21:48 +03:00
Mikhail Glukhikh 2b2b937263 Specify type explicitly intention: now derived from self targeting range intention
(cherry picked from commit b09b5a9)
2016-06-21 15:20:24 +03:00
Mikhail Glukhikh 5c4b6ba8b0 Has platform type : public API only option
(cherry picked from commit a084c1d)
2016-06-21 15:20:11 +03:00
Kirill 86b70ba995 Add quickfix tests for HasPlatformTypeInspection
(cherry picked from commit af1b26b)
2016-06-21 15:20:00 +03:00
Kirill Rakhman d7bf03be46 Implement inspection for declarations with implicit platform types #KT-12310 Fixed
(cherry picked from commit 00d8c26)
2016-06-21 15:19:13 +03:00
Sergey Mashkov 1cb72169f9 KT-12512 "Different IDE and Maven plugin version" inspection is being invoked for non-tracked pom.xml files 2016-06-21 13:56:22 +03:00
Sergey Mashkov 7999dc8d01 Fix EA-83601 - ISE: PomFile.<init> 2016-06-21 13:56:17 +03:00
Sergey Mashkov 49ccfa0ec4 KT-12558 Configure Kotlin in Project: Maven: Undo could revert changes in all poms 2016-06-21 13:56:13 +03:00
Sergey Mashkov f47fd46b7a Maven: script tag injects kotlin 2016-06-21 13:56:08 +03:00
Sergey Mashkov 0250ab4ac2 KT-12568 Maven pom.xml: execution configuration: file path completion works only in some sub-elements 2016-06-21 13:56:03 +03:00
Dmitry Jemerov 75b860ab95 handle IOException from File.getCanonicalFile() (EA-83981 - NA: KotlinToJVMBytecodeCompiler.reportRuntimeConflicts)
(cherry picked from commit 765bd44)
2016-06-21 12:07:50 +02:00
Dmitry Jemerov 450caf4033 VirtualFile.getParent() is nullable (EA-84222 - NPE: DecompiledFileWritingAccessProvider.isPotentiallyWritable)
(cherry picked from commit a77f4df)
2016-06-21 12:07:39 +02:00
Dmitry Jemerov 4bc64b8014 PsiElement.getNode() is nullable (EA-84534 - NPE: DocCommentConverterKt.content)
(cherry picked from commit c3e38dd)
2016-06-21 12:07:24 +02:00
Denis Zharkov 132190a71e Minor. Optimize imports 2016-06-21 11:07:36 +03:00
Denis Zharkov fe5fe63f0a Fix visibility check for dynamic members within protected method
#KT-11857 Fixed
2016-06-21 11:07:36 +03:00
Valentin Kipyatkov 4a7a04e366 Temporarily reverted commit "Smart cast to not null should affect flexible types too" because it causes exception in compiler 2016-06-20 23:18:53 +03:00
Alexander Udalov 311301f430 Check return type when locating method in reflection
#KT-11824 Fixed
2016-06-20 21:03:51 +03:00
Pavel V. Talanov bafe8e55ce Create SyntheticMemberDescriptor interface
Implement this interface by sam adapters/constructors and use it in navigation

 #KT-11708 Fixed
2016-06-20 20:15:34 +03:00
Nikolay Krasko 4087e650aa Wrong delegation to delegation property in debugger when property defined in another module (KT-12678)
Different bytecode can be generated for delegated property and for non-delegated one. Backend inspects DELEGATED_PROPERTY_CALL to understand the property type, and expects that
this information had been already recorded into context. Frontend writes DELEGATED_PROPERTY_CALL into context during body resolve or type inference if type is not present.

Either way in debugger context it may happen that the DELEGATED_PROPERTY_CALL won't be written into context.

 #KT-12678
2016-06-20 16:22:04 +03:00
Valentin Kipyatkov 0bc5007147 KT-12369 Completion: pressing dot after class name should not cause insertion of constructor call
#KT-12369 Fixed
2016-06-20 16:19:02 +03:00
Valentin Kipyatkov b9719bfe82 Fixed test so that it really tests what's intended 2016-06-20 16:19:02 +03:00
Valentin Kipyatkov eb1dbfc652 KT-12669 Completion should show variant with () when there is default lambda
#KT-12669
2016-06-20 16:19:02 +03:00
Valentin Kipyatkov 962a8f9bf4 KT-12447 Don't use CompletionProgressIndicator in Kotlin plugin
#KT-12447 Fixed
2016-06-20 16:19:02 +03:00
Valentin Kipyatkov 4e16d67321 KT-12427 Completion doesn't work for "@receiver:" annotation target
#KT-12427 Fixed
2016-06-20 16:19:01 +03:00
Valentin Kipyatkov 1413a3fe63 KT-12328 Qualified function name inserted when typing before "if"
#KT-12328 Fixed
2016-06-20 16:19:01 +03:00
Valentin Kipyatkov 2ec81f44bf Fixed extension properties not completed after "get" 2016-06-20 16:19:01 +03:00
Valentin Kipyatkov 88bf7f883e No need to specially handle extensions from current file anymore (since searchScope for KotlinIndicesHelper includes current file) 2016-06-20 16:19:01 +03:00
Valentin Kipyatkov 568195bb34 Smart cast to not null should affect flexible types too 2016-06-20 16:19:00 +03:00
Denis Zharkov 5ee33e6ad5 Generate last expression in coroutine block even for Unit expected type 2016-06-19 12:50:54 +03:00
Denis Zharkov 96eb3f411d Minor. Simplify 'async' tests 2016-06-19 12:50:54 +03:00
Denis Zharkov 72eb87f5d0 Support inline suspend functions
A lot of additional work was required to support them:
- Suspension points are being identified by two markers
  instead of one pointing to suspend function call
- Approach with replacing return type of suspend function does not work anymore.
  So we decode suspension return type as an argument for begin marker
- It became necessary to perform variables liveness analysis
  (see comment in org.jetbrains.kotlin.codegen.coroutines.CoroutineTransformerMethodVisitor.spillVariables)
2016-06-19 12:50:54 +03:00
Denis Zharkov 5c3e554240 Minor. Remove redundant import 2016-06-19 12:50:53 +03:00
Denis Zharkov 99511cbf65 Minor. Replace Exception with Throwable in the root catch clause 2016-06-19 12:50:53 +03:00
Denis Zharkov e7b9564699 Support coroutine lambda parameters in JVM backend 2016-06-19 12:50:53 +03:00
Denis Zharkov 5bac2fd5c9 Make mutable continuation fields volatile 2016-06-19 12:50:53 +03:00
Denis Zharkov 1431e2a06d Fix variables spilling for coroutines
Skip variables that conflict with local variable table info
Otherwise DEX rejects generated code
2016-06-19 12:50:53 +03:00
Denis Zharkov 07dcc6c616 Support 'handleException' operator in JVM backend 2016-06-19 12:50:53 +03:00
Denis Zharkov 6795393989 Introduce 'handleException' operator and relevant checks 2016-06-19 12:50:52 +03:00
Alexander Udalov 0e881daba3 Update diagnostic tests ReadMe, explain tests with diagnostic arguments 2016-06-19 12:45:22 +03:00
Alexander Udalov 456ba79793 Consider callable reference's LHS when resolving RHS
Previous resolution sequence (static scope, nested classes scope, receiver) and
a check against type parameters only made sense when there's a type, not an
expression, on the LHS of a callable reference. Also TransientReceiver is
incorrect in such case because private-to-this visibility check only works for
ExpressionReceiver values
2016-06-19 12:45:22 +03:00
Alexander Udalov 6562a2db19 Type-check reference to property with invisible setter to KProperty
#KT-12337 Fixed
2016-06-19 12:45:22 +03:00
Ilya Gorbunov c5a208f3eb Rearrange stdlib unit tests across packages.
Rearrange JS stdlib unit tests.
2016-06-18 16:50:32 +03:00
Ilya Gorbunov d266f546f4 Remove obsolete and not relevant to stdlib tests 2016-06-18 16:50:32 +03:00
Nikolay Krasko 43407f1c74 Remove old hack: Idea doesn't expect increasing modification count during highlighting (KT-12526)
addImport() is called from ImportAllMembersIntention.isApplicableTo() and increasing modification count during highlighting ruins Idea expectations.

 #KT-12526 Fixed
2016-06-18 16:06:37 +03:00
Alexey Tsvetkov d4494d605a Exclude resources dir from surefire test search 2016-06-17 20:00:46 +03:00
Valentin Kipyatkov 1b16ff6c82 KT-11975 Invert if-condition intention does not simplify "is" expresssion
#KT-11975 Fixed
2016-06-17 18:09:07 +03:00
Alexander Udalov 3fa87fe4de Move get-protobuf later in update_dependencies
It invokes kotlinc, so should happen after the bootstrap compiler is downloaded
2016-06-17 17:23:19 +03:00
Mikhail Glukhikh 5ccbf47531 Elvis / if / when now infer error type in case of ErrorType + Nothing #KT-6665 Fixed
(cherry picked from commit 9a50a0b)
2016-06-17 16:43:24 +03:00