Commit Graph

32316 Commits

Author SHA1 Message Date
Mikhael Bogdanov 6f761d4e7d Construct delegates in expression codegen, not in LocalLookup 2016-06-24 17:05:47 +03:00
Denis Zharkov 2578fc3344 Do not generate mutable collection stub methods in interfaces
#KT-12359 Fixed
2016-06-24 16:37:19 +03:00
Denis Zharkov 1780f57265 Fix mutable collection stub methods generation for corner case
The problem is that
`override fun remove(element: E): CollectionWithRemove<E>`
seems to be illegal from Java's point of view, while it's OK for JVM

These declarations have the same signature (return type is isgnored)
- override fun remove(element: E): CollectionWithRemove<E>
- override fun remove(element: E): Boolean

When we meet such declaration we choose random declaration for fake override in synthetic class
that may lead to signature clash
2016-06-24 16:37:19 +03:00
Zalim Bashorov 47e1ff34f0 JS: fix that kotlin's breakpoints don't work with JavaScript debugger
#KT-12773 Fixed
2016-06-24 15:46:30 +03:00
Yan Zhulanow 6e6c9682ec Fix KT-12173 (Kotlin Lint False Positive for "Toast created but not shown" inside SAM adapter).
(cherry picked from commit 4940d3b)
2016-06-24 15:10:19 +03:00
Yan Zhulanow 1720f8b4ff KT-12681 (Lint: run from main menu / Analyze: Kotlin inspections reports only java source)
Cause we've copied Lint diagnostics to the Kotlin project, there's no harm in making them Kotlin-only.
(cherry picked from commit 7105648)
2016-06-24 15:10:19 +03:00
Yan Zhulanow 8f75ababde KT-12674 "Calling new methods on older versions" errors for inlined constants
Inlined constants from Java should not be detected.
(cherry picked from commit b34ee4e)
2016-06-24 15:10:19 +03:00
Yan Zhulanow 206e439595 KT-12023 Kotlin Lint: Cast doesn't trigger minSdk error
Check Kotlin as/is types.
(cherry picked from commit c0db8e0)
2016-06-24 15:10:19 +03:00
Yan Zhulanow 6752df189d Make infix modifier diagnostic message more informative (KT-12589)
(cherry picked from commit 2744309)
2016-06-24 15:10:19 +03:00
Yan Zhulanow a434055b55 Load Gradle subplugin artifacts from the root project buildscript classpath as well (KT-11885)
(cherry picked from commit b54b0da)
2016-06-24 15:10:19 +03:00
Yan Zhulanow 1de05b965e KT-12015 (Kotlin Lint False Positive for Bundle.getInt())
Java approach is not sufficient here, in Kotlin receivers can be implicit.
Use Kotlin extension/dispatch receivers to figure out the receiver type for our method call.
(cherry picked from commit cdedf1d)
2016-06-24 15:10:19 +03:00
Yan Zhulanow 530ab42de6 Android Extensions: Fix KT-10969 (NullPointerException when finding view in Fragment if getView() is null)
(cherry picked from commit 80f5852)
2016-06-24 15:10:19 +03:00
Yan Zhulanow 2cd0e9c8d8 Fix EA-80764. Do not try to get the resource manager for the disposed module
(cherry picked from commit c3bd243)
(cherry picked from commit cddcf02)
2016-06-24 15:10:19 +03:00
Yan Zhulanow e0243fd568 Fix EA-82394. PsiType.getClassName() can return null. Return "<anonymous type>" in that case.
(cherry picked from commit 8be1335)
(cherry picked from commit 5101596)
2016-06-24 15:10:19 +03:00
Yan Zhulanow 1a0acf3208 Fix EA-82166. NPE. loadModel() can return null, and it's a bad idea to call methods on a null pointer.
(cherry picked from commit cf033d0)
(cherry picked from commit 37dc0ae)
2016-06-24 15:10:19 +03:00
Yan Zhulanow 001d5397c5 Fix EA-82449. Do not run Lint diagnostics if the project is already disposed
(cherry picked from commit 98b2899)
(cherry picked from commit 2179ee8)
2016-06-24 15:10:19 +03:00
Yan Zhulanow c5e0f992e5 KT-12387 Fix Performance problem with Lint in IDE
Call checkCanceled() before running Lint diagnostics (UastScanner)
(cherry picked from commit c6e328a)
(cherry picked from commit 696475e)
2016-06-24 15:10:19 +03:00
Yan Zhulanow 4ee19cce93 Fix #KT-12047 (Kotlin Lint: "Missing @JavascriptInterface on methods" does not report anything)
(cherry picked from commit 61e8e01)
(cherry picked from commit dbc54e2)
2016-06-24 15:10:19 +03:00
Yan Zhulanow d1447faf2b Fix #KT-12015 (Kotlin Lint False Positive for Bundle.getInt()).
Android firstly checks API version against the function call receiver type, so we should do the same to be consistent.
(cherry picked from commit c3d01ec)
(cherry picked from commit 5c78acc)
2016-06-24 15:10:19 +03:00
Denis Zharkov 8caee7940e Use 'Any?' instead of throwing NPE when calculating star projection type
It's a quite hacky solution, but the choice seems to be conservative, so these types can be refined later

 #KT-9597 Fixed
2016-06-24 10:23:16 +03:00
Ilya Gorbunov 71476d5d43 Minor: remove unused commonArgs 2016-06-23 22:47:47 +03:00
Ilya Gorbunov 7c5c4610e8 Rename -jdk compiler option to -jdk-home (jdkHome), add jdk path validation. 2016-06-23 22:47:45 +03:00
Ilya Gorbunov 13016cae93 Add tests for 'jdk' compiler option for CLI, maven and gradle. 2016-06-23 22:46:07 +03:00
Ilya Gorbunov 644df89dc9 CLI: Allow to specify JDK for classpath building with '-jdk' compiler argument.
Maven: support jdk parameter linked to kotlin.compiler.jdk property.
Gradle: support jdk compiler option.
2016-06-23 22:46:07 +03:00
Ilya Gorbunov 1157e052ee Maven: support languageVersion parameter, linked to property kotlin.compiler.languageVersion. 2016-06-23 22:46:07 +03:00
Ilya Gorbunov 848599e940 Maven and Gradle tests for jvmTarget parameter. 2016-06-23 22:46:07 +03:00
Ilya Gorbunov 3f3a3820b8 Maven: support jvmTarget parameter in Maven, linked to property kotlin.compiler.jvmTarget.
Gradle: support jvmTarget compiler option.
2016-06-23 22:46:07 +03:00
Alexander Udalov 1ebcd193a2 Add release notes for 1.0.2-1 2016-06-23 17:37:43 +03:00
Pavel V. Talanov 5d31d6d98d REPL: call 'toString()' for returned values explicitly and correctly report exceptions
#KT-12389 Fixed
2016-06-23 16:12:03 +03:00
Pavel V. Talanov 8ac40d7401 Refactor Repl: use sealed class to represent line result 2016-06-23 16:12:01 +03:00
Pavel V. Talanov 17832e10e7 Refactor ReplInterpreter and ReplFromTerminal classes
Drop some of the exception reporting code
2016-06-23 16:11:50 +03:00
Pavel V. Talanov 246409d033 J2K ReplFromTerminal: rename file 2016-06-23 15:58:07 +03:00
Pavel V. Talanov 35c56431b3 J2K ReplFromTerminal, convert code 2016-06-23 15:58:05 +03:00
Stanislav Erokhin 7c2825b397 KT-12623 Fixed ISE: Type parameter ... not found for public fun ...
#KT-12623 Fixed
Also EA-72653 fixed.
2016-06-23 02:03:24 +03:00
Alexander Udalov 3eeccb407e Simplify and fix createReflectionTypeForCallableDescriptor
Previously its call sites needed to determine if the receiver type should be
ignored (e.g. if the reference is to static member or nested class constructor,
or if it's a bound reference), and 3 of 4 callers did it incorrectly. Simplify
this by passing the DoubleColonLHS instance everywhere.

Also rename it to createKCallableTypeForReference

 #KT-12738 Fixed
 #KT-12751 Fixed
 #KT-12799 Fixed
2016-06-22 21:35:57 +03:00
Alexander Udalov 6cc10aa226 Minor, move utilities form CallableReferencesResolutionUtils.kt closer to usages 2016-06-22 21:35:57 +03:00
Alexander Udalov 80bf6e1bee Refactor CallableReferencesResolutionUtils.kt
Get rid of trace & reportOn parameters of
createReflectionTypeForCallableDescriptor: move the two checks that required
them to DoubleColonExpressionResolver and combine with other checks into a
single function that checks the validity of the referenced symbol. This also
makes these checks reported only once when invalid expressions are passed as
function arguments (previously they were also reported from
getResolvedCallableReferenceShapeType).

Also inline getReflectionTypeForCandidateDescriptor after this, and refactor
its usages
2016-06-22 21:35:57 +03:00
Alexander Udalov cf630e01db Minor, refactor "is KProperty" checks in ReflectionTypes 2016-06-22 21:35:57 +03:00
Alexander Udalov e68de436bb Allow data classes to inherit from other classes
#KT-10330 Fixed
2016-06-22 21:35:57 +03:00
Stanislav Erokhin 065c4e19ec Add debug info for EA-79267 - (T is not T) assert: TypeCheckingProcedure.checkSubtypeForTheSameConstructor 2016-06-22 19:42:09 +03:00
Stanislav Erokhin ad285d5ca2 KT-11679 Fixed exception at ResolvedCallImpl.getArgumentMapping()
#KT-11679 Fixed
Also fixed EA-75913 EA-78908
2016-06-22 19:42:09 +03:00
Stanislav Erokhin 7389d412a5 Fixed visibility check on a property with private setter of the subclass
#KT-3689 Fixed
2016-06-22 19:42:08 +03:00
Pavel V. Talanov f607bdebd3 Update Changelog for 1.0.3-eap-58 2016-06-22 14:18:08 +03:00
Pavel V. Talanov 0d52a20a46 Add Kotlin "Tips of the day"
Content from https://youtrack.jetbrains.com/issue/DOC-4026
2016-06-22 14:17:56 +03:00
Pavel V. Talanov b750f20718 Update changelog for 1.0.3 2016-06-22 14:17:44 +03:00
Pavel V. Talanov 585440b3bd Minor, changelog: add 1.0.4 section 2016-06-22 14:17:03 +03:00
Mikhail Glukhikh bd8c7577e1 Replace explicit parameter with it : correct handling of it from outer lambda #KT-12437 Fixed
(cherry picked from commit cb8fe96)
2016-06-21 22:24:54 +03:00
Mikhail Glukhikh b44c94a887 Fix for EA-81477 : correct handling of a property without initializer (but with e.g. getter)
(cherry picked from commit 4e2d35a)
2016-06-21 22:24:44 +03:00
Mikhail Glukhikh 5b328e9042 Can be parameter inspection: delete only particular modifiers (e.g. no vararg) #KT-12768 Fixed
(cherry picked from commit d4116b5)
2016-06-21 22:24:27 +03:00
Mikhail Glukhikh 4abcc278fd Can be constructor property: comment saver introduced to retain comments; unbound comments now added before, not after
(cherry picked from commit 886cf21)
2016-06-21 22:23:23 +03:00