Commit Graph

36682 Commits

Author SHA1 Message Date
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
shiraji ad9bf1626f Fix the problem with ConvertPrimaryConstructorToSecondaryIntention for enum #KT-15406 Fixed 2017-01-19 17:57:33 +03:00
Alexey Andreev 245f23e7c2 JS: fix translation of references to external nested classes in files marked with @JsModule. See KT-15797 2017-01-19 16:30:57 +03:00
Dmitry Petrov 5fc8208504 KT-13355: fix Kotlin compilation. 2017-01-19 16:09:29 +03:00
Dmitry Petrov b36e3bc083 KT-13355
An overridden abstract member with a more specific "return type" than an overridden concrete member
should be explicitly overridden even if the class in question can have abstract members.
2017-01-19 16:09:29 +03:00
Dmitry Petrov f89de02ff0 OverrideResolver: convert to Kotlin & cleanup. 2017-01-19 16:09:29 +03:00
Dmitry Petrov 7f2085b4e4 OverrideResolver: .java -> .kt 2017-01-19 16:09:29 +03:00
Denis Zharkov bbb5d4eb0f Fix 1.0-compatibility mode for JDK dependendent built-ins
Do not report UNSUPPORTED_FEATURE if there is no overridden descriptors
E.g. in case of property accessors
2017-01-19 15:20:57 +03:00
Ilya Gorbunov 7696d20adf Deprecate moved reflection 1.1 api with ERROR 2017-01-19 14:07:17 +03:00
Alexey Andreev af1b7c49b4 JS: insert dummy initializers for property that initialized on init block or in secondary constructors. See KT-8211 2017-01-19 13:20:24 +03:00
Alexey Andreev a927770935 JS: fix scope of function generated for primary constructor. See KT-15678 2017-01-19 13:09:59 +03:00
Alexey Andreev daac24b62e JS: prohibit referencing noImpl property from non-external declarations. See KT-15306 2017-01-19 13:09:06 +03:00
Alexey Andreev 199790276b JS: prohibit dynamic values as handlers of property delegates. Prohibit delegation of classes by dynamic values. See KT-15283 2017-01-19 13:07:58 +03:00
Alexey Andreev a4b2abc7d5 JS: prohibit spread operator and destructuring declaration in dynamic values. See KT-15283 2017-01-19 13:07:57 +03:00
Alexey Andreev 31d0e0b7c4 JS: prohibit .. operation on dynamic type. See KT-15184 2017-01-19 13:07:56 +03:00
Alexey Andreev e6be418dd3 JS: prevent optimizer from removing access to dynamic property access. See KT-15278 2017-01-19 13:07:56 +03:00
Mikhael Bogdanov e1bec0df2e Proper generate interval for catch block variable; Fix for KT-15646: InconsistentDebugInfoException when stepping over throw
#KT-15646 Fixed
2017-01-19 09:33:10 +01:00
Denis Zharkov 4ab6b6954d Fix false positive "Null can not be a value of a non-null type"
Inferred type of receiver of orElse  is Optional<T & Any>
Generic descriptor is orElse(E!): E!
Substituted descriptor is orElse(T): T , and that is the problem.

Seems that E!  => (T & Any)!  gets expanded to just T  or T & Any , however it should be expanded to
(T & Any) .. (T & Any)?  => T & Any .. T & Any

T & Any is NotNullTypeParameter(T)

The problem is that (T & Any)?  is expanded to T & Any,
that is seems to be wrong.

 #KT-15236 Fixed
2017-01-19 10:20:35 +03:00
Denis Zharkov 5d4f51d9b6 Refine 1.0-compatibility mode for JDK dependent members
- calls must be prohibited iff they refer to some additonal built in member
- override must be prohibited iff all of the overridden descriptors are additional

Other usages were able to be successfully compiled by 1.0.x

Solution with @Deprecated(level=Error) doesn't work properly, because
deprecation propagates to overridden, thus call 'java.util.ArrayList<String>().stream()'
becomes invalid, while it was correct in 1.0.x

 #KT-15794 Fixed
2017-01-19 10:20:35 +03:00
Dmitry Petrov b9f9894310 KT-15677 KT-15775
Update parser & descriptor renderer to handle parenthesized types and function types properly.
Resolve annotations in parenthesized types.

AnnotationsImpl.isEmpty() returned false for targeted annotations only
(e.g., 'fun @receiver:Ann C?.foo()').
Properly keep track of targeted annotations.
2017-01-19 09:53:17 +03:00
Ilya Gorbunov a429992e81 Do not generate headers for JS-only functions. 2017-01-18 22:16:49 +03:00
Łukasz Wojtów be15dea6b5 Fix typo 2017-01-18 21:51:31 +03:00
Ilya Gorbunov ed9b9d972c Make 'add' function abstract in AbstractMutableSet in JVM 2017-01-18 20:07:24 +03:00
Mikhail Glukhikh b6443eed9e Data flow information: stable complex expressions introduced back for brackets / elvis / if / when #KT-13468 Fixed
This reverts commit e515d7f773 and
also commit 1c9f08e986

(cherry picked from commit 9fa155b)
2017-01-18 18:54:08 +03:00
Mikhail Glukhikh 86bc49558d Tests for KT-13468 / KT-13765
(cherry picked from commit 2e4c0b4)
2017-01-18 18:53:55 +03:00
Nikolay Krasko ffc1624484 Stop using idea isNullOrEmpty function (KT-15786)
#KT-15786 Fixed
2017-01-18 18:36:19 +03:00
Alexander Udalov 4f36376291 Do not report KCLASS_WITH_NULLABLE_ARGUMENT_IN_SIGNATURE anymore
It was only reported in already erroneous cases
2017-01-18 18:21:30 +03:00
Alexander Udalov d02404b07b Report error on expression of nullable type in class literal
#KT-15740 Fixed
2017-01-18 18:21:29 +03:00
Alexander Udalov 6a352a1da7 Report error on nullable type alias in class literal
#KT-15736 Fixed
2017-01-18 18:21:28 +03:00
Zalim Bashorov 284b9d2ba6 KJS: make deep copy of additional arguments before expose them in KotlinFunctionIntrinsic 2017-01-18 14:43:33 +03:00
Zalim Bashorov ca2930600a KJS: introduce $kotlin_test_internal$ to expose some helper functions in the tests 2017-01-18 14:42:40 +03:00
Zalim Bashorov bbd69a05dc KJS: make JSON object and allow to pass null to stringify methods 2017-01-18 14:41:22 +03:00
Zalim Bashorov 1b09fa29fb Fix maven build 2017-01-18 14:40:57 +03:00
Zalim Bashorov 8cf44e9f36 KJS: increase ABI version 2017-01-18 14:40:56 +03:00
Zalim Bashorov cfba99c704 KJS: remove unused polyfill String.prototype.contains 2017-01-18 14:40:55 +03:00
Zalim Bashorov 264e319487 KJS: type -> kind 2017-01-18 14:40:54 +03:00
Zalim Bashorov 70423e8129 KJS: remove obsolete classIndex 2017-01-18 14:40:51 +03:00
Zalim Bashorov be694d53ef KJS: trait -> interface 2017-01-18 14:40:50 +03:00
Zalim Bashorov c6f0d0fa59 KJS: split kotlin_* files to several files 2017-01-18 14:40:49 +03:00
Zalim Bashorov d635d7859e KJS: remove obsolete kotlin.modules 2017-01-18 14:40:48 +03:00
Zalim Bashorov 3ef1321841 KJS: implement throw* functions in Kotlin 2017-01-18 14:40:47 +03:00
Zalim Bashorov 6f56079f7e KJS: add external declaration for parseFloat; remove obsolete safeParseInt and safeParseDouble 2017-01-18 14:40:46 +03:00
Zalim Bashorov d0c7c8022e KJS: remove obsolete functions from kotlin_lib.js 2017-01-18 14:40:44 +03:00