Commit Graph

36724 Commits

Author SHA1 Message Date
Mikhail Glukhikh 60fcdeb5ee Test added: suppress on function reference #KT-15839 Obsolete 2017-01-24 14:59:53 +03:00
shiraji d9ec8a92f2 KT-15553 Support compile constant for "Copy concatenation text to clipboard"
#KT-15553 Fixed
2017-01-24 14:33:52 +03:00
Kirill Rakhman 909007d984 Add inspection for private primary constructors in data classes
Fixes #KT-15709
2017-01-24 14:08:05 +03:00
mglukhikh f64345634b WHEN_ENUM_CAN_BE_NULL_IN_JAVA is no more reported after smart cast to not-null #KT-15201 Fixed 2017-01-24 13:51:15 +03:00
mglukhikh b53ebd115b Pattern matching: work-around for smart cast target type instability #KT-14705 Fixed 2017-01-24 13:51:14 +03:00
Alexey Andreev bc0550d7b7 JS: don't report about inline modifier on inline extension fun to external class 2017-01-24 12:27:02 +03:00
Alexey Andreev 0ca2ae7279 JS: regenerate Kotlin JS bindings from IDL files with new rules 2017-01-24 12:27:01 +03:00
Alexey Andreev 36d2a91057 JS: prevent IDL2K from generating @nativeGetter/@nativeSetter annotations, generate inline extension function with asDynamic() instead 2017-01-24 12:27:01 +03:00
Alexey Andreev c1838d423b JS: transfer all empty statement simplifications RedundantLabelRemoval to EmptyStatementElimination, so that empty statements can be eliminated everywhere, not in labeled blocks only. 2017-01-24 12:26:21 +03:00
Alexey Andreev ac0df8eef9 JS: when recursive local function does not capture variables, give it name from top-level scope. See KT-15770 2017-01-24 12:25:23 +03:00
Alexander Udalov 70d2296e61 Update public API dump after adding KPropertyN.getDelegate 2017-01-24 10:59:44 +03:00
Ilya Gorbunov a603de8bd7 Ensure string to number conversion fails on empty and blank inputs.
#KT-4497
2017-01-24 07:22:58 +03:00
Ilya Gorbunov 4018d10bf6 Deprecate parseInt and parseFloat. Replace deprecated usages in tests.
#KT-4497
2017-01-24 07:22:51 +03:00
Ilya Gorbunov 4e5e14c9a0 Provide string-to-number conversions in JS and common stdlib.
Relates to #KT-8286
#KT-4497 Fixed
2017-01-24 07:20:57 +03:00
Mikhail Zarechenskiy 2cac6a9e7d Improve inference on generics for callable references
#KT-10711 Fixed
 #KT-12802 Fixed
 #KT-12964 Fixed
 #KT-15439 Fixed

Analyze callable references in `dependent` mode, then complete them with
respect to expected types
2017-01-24 02:15:26 +03:00
Anton Bannykh 07bb7ef4d3 JS: extension lambdas translated same as local lambdas (KT-13312 fixed) 2017-01-23 20:09:36 +03:00
Dmitry Petrov 5021be351d KT-15878 Extension shadowed by member shouldn't be reported for infix/operator extensions when member is non-infix/operator 2017-01-23 16:46:43 +03:00
Sergey Mashkov 98075c17c9 kotlin-test: extract from JS library, convert to multiplatform 2017-01-23 15:43:02 +03:00
Alexey Sedunov c264de5795 Project Settings: Expose API version setting in Kotlin compiler configuration UI 2017-01-23 15:16:14 +03:00
Alexey Sedunov 57c27299dd JPS: Use facet configuration to determine if module should be compiled to JS 2017-01-23 15:16:12 +03:00
Alexey Sedunov 7b12a66b21 Kotlin Facet: Warn about libraries configured for non-current platform
#KT-15628 Fixed
2017-01-23 15:16:11 +03:00
Alexey Sedunov 597068a704 Kotlin Facet: Import API version from Maven
#KT-15772 Fixed
2017-01-23 15:16:10 +03:00
Alexey Sedunov fc9b001ccd Kotlin Facet: Use project settings by default
#KT-15624 Fixed
2017-01-23 15:16:09 +03:00
Alexey Sedunov b35eba0621 Kotlin Facet: Annotate CompilerSettings properties with @JvmField to make them available for copyBean()
#KT-15621 Fixed
 #KT-15623 Fixed
2017-01-23 15:16:08 +03:00
Roman Elizarov 07dc937e2e typo if start/createCoroutine docs fixed 2017-01-23 14:25:04 +03:00
Zalim Bashorov 76a20fc104 Minor: fix copyright in polyfills.js 2017-01-23 14:14:16 +03:00
Zalim Bashorov 4f36e9af08 Minor: remove extra comment block with copyright 2017-01-23 14:14:15 +03:00
Zalim Bashorov cd04e794ee KJS: class MathClass -> object Math 2017-01-23 14:14:13 +03:00
Zalim Bashorov cb210b6c78 KJS: fix stub consistency test which was broken after JsonClass was renamed and transformed to object
`kotlin.js.Console` is used instead of `kotlin.js.JSON` to avoid problems on case-sensitive filesystems since right now we also have `kotlin.js.Json` (will be removed later)
2017-01-23 14:13:58 +03:00
Mikhail Glukhikh b7fb45f36e DFA: only stable values or qualified with stable receiver can be bound in x = y #KT-15792 Fixed 2017-01-23 13:38:24 +03:00
Mikhail Glukhikh 905e67e713 Data flow information: take language version into account while processing safe calls and bound values #KT-14350 Fixed 2017-01-23 13:38:24 +03:00
Alexander Udalov ebd577e52a Introduce KProperty{1,2}.getExtensionDelegate
These two functions are supposed to fix an inconvenience in the design of
KProperty{1,2}.getDelegate for extension properties, where you have to pass an
instance of the extension receiver which is going to be completely ignored

 #KT-8384 Fixed
2017-01-23 12:25:36 +03:00
Alexander Udalov 78f2515e95 Introduce KProperty{0,1,2}.getDelegate
#KT-8384 In Progress
2017-01-23 12:25:35 +03:00
Alexander Udalov f1cd2ee6fd Introduce PropertyDescriptor.isDelegated, write new flag to metadata
#KT-8384 In Progress
2017-01-23 12:25:34 +03:00
Alexander Udalov 76fc3b40d5 Do not consider Kotlin compiler as library in runtime versions checker
Otherwise because there's no Kotlin-Version in its manifest, it's regarded as a
1.0 runtime library which conflicts with 1.1 libraries
2017-01-23 11:30:53 +03:00
Dmitry Petrov e31e12474f KT-15844
Property with type inferred from getter could access primary constructor parameters inside the getter
(which is incorrect, and caused problems in compilation).
Fix scopes for property descriptor resolution.
'getScopeForMemberDeclarationResolution' in AbstractLazyMemberScope should always return member declaration resolution scope.
Two scopes are required, because both property initializer and property accessors should see property type parameters.
2017-01-23 10:22:34 +03:00
Denis Zharkov 2edcd369a8 Fix inference issue with Stream.collect
See doNotCaptureSupertype test for clarification:
When resolving b.collect(toList()) we're building a common system with
two variables T and R.

The problem was that when introducing the constraint
C<T, Inv<T>> <: C<in String, R> we then were seeing the constraint
T <= in String, and add the constaint T=Captured(in String)

That lead to R=Inv<T>=Inv<Captured(in String)>, and after approximation
R=Inv<in String>, that is not the desirable result (Inv<String> suits here)

But the root problem was that we add captured constaint when projection was from supertype,
that seems to be wrong, and for example Java doesn't do that in the similar situation.

 #KT-11259 Fixed
2017-01-22 13:29:08 +03:00
Alexander Udalov a18720154c Fix diagnostic test data 2017-01-21 12:59:01 +03:00
Alexander Udalov fc637eb420 Change runtime component from "Core" to "Main"
This is needed to allow the old compiler have the new runtime libraries in the
classpath. See the previous commit for a more elaborate explanation
2017-01-21 12:57:15 +03:00
Alexander Udalov 139d37cfd0 Support "Main" component in JVM runtime version consistency checker
The point here is to disable the "checkNotNewerThanCompiler" check because it
breaks a real life use case of compiling with an old compiler against the new
runtime library (that may come implicitly as a transitive dependency of another
library). However, to keep the possibility of restoring this check in the
future without backporting the needed changes into the old branches, we now
only perform this check for the "Core" runtime components, and all other checks
-- for "Core" and "Main" runtime components. In the follow-up commit, we change
the runtime component of our libraries to "Main". If we decide we need the
"checkNotNewerThanCompiler" behavior in the future, we can change the runtime
component to "Core", effectively restoring this check in the old compilers
2017-01-21 12:57:14 +03:00
Alexander Udalov 7b4e826650 Enable JVM runtime version consistency checker in 1.1 2017-01-21 12:57:14 +03:00
Ilya Gorbunov 3a1ed41436 Create deprecated MutableList.sort extensions to guide how to replace them.
#KT-15790 Fixed
2017-01-21 03:14:42 +03:00
Dmitry Petrov 6e2ebaa300 KT-12846 Forbid vararg of type 'Nothing' and 'Nothing?' 2017-01-20 17:50:19 +03:00
Mikhail Glukhikh 1f573bb115 EA-92388: Fix of exception in import action creation 2017-01-20 17:39:14 +03:00
Mikhael Bogdanov 818773b7e2 Updated android test configuration 2017-01-20 13:16:58 +01:00
Mikhael Bogdanov da1b8a02ed Exclude builtins members mapped to java default methods from delegation 2017-01-20 13:16:58 +01:00
Dmitry Petrov 03a697a707 Prohibit renaming operator to another operator on import. 2017-01-20 13:01:39 +03:00
Mikhail Glukhikh 9625c32527 Exhaustive when on sealed trees implemented #KT-13130 Fixed
Also #KT-13227 Fixed
2017-01-20 11:04:54 +03:00
Ilya Gorbunov 3d7bcbdff9 Minor: add two cases for Map.getOrDefault test
Relates to #KT-15610
2017-01-19 22:33:20 +03:00
Ilya Gorbunov 3ec48ab244 Add kotlin.comparisons package to default imports. 2017-01-19 18:21:14 +03:00