Commit Graph

35822 Commits

Author SHA1 Message Date
Alexey Andreev ecb498717a JS: rework diagnostics names. Prohibit external inner classes (see KT-14027) 2016-12-09 15:13:08 +03:00
Alexey Andreev cf8161507c JS: prohibit private members of external classes (see KT-14029) 2016-12-09 15:13:08 +03:00
Alexey Andreev 212b9f37b3 JS: get rid of external extension functions and properties in stdlib 2016-12-09 15:13:08 +03:00
Alexey Andreev 3882bf7564 JS: prohibit native (external) extension properties and functions. See KT-13896 2016-12-09 15:13:07 +03:00
Alexey Andreev cf25e17209 JS: add tests that emulates promises and wraps them in coroutines, using suspend functions outside of controller 2016-12-09 14:56:21 +03:00
Alexey Andreev 060f08a8dd JS: add support of interceptResume function in coroutine controller 2016-12-09 14:56:20 +03:00
Alexey Andreev 9eff193ea4 JS: support stack unwinding convention in coroutines 2016-12-09 14:56:20 +03:00
Alexey Andreev bdda04243d JS: support new coroutine convention (see KT-15058) 2016-12-09 14:56:19 +03:00
Alexey Andreev bf74400776 JS: re-enable coroutine tests for JS backend 2016-12-09 14:56:19 +03:00
shiraji 44ca45123d KT-15142 Remove redundant calls of the conversion method wrongly shown for Any?.toString
#KT-15142 Fixed
2016-12-09 14:33:55 +03:00
Mikhael Bogdanov 18cb734c58 Do not mangle internal @PublishedApi functions 2016-12-09 11:55:16 +01:00
Mikhael Bogdanov 5ffc0b36b0 Quickfix for published api 2016-12-09 11:55:16 +01:00
Mikhael Bogdanov f4259c5f82 Added deprecation for protected call within inline functions 2016-12-09 11:55:16 +01:00
Mikhael Bogdanov 00e2463014 Effective visibility refactoring: calculate parent decriptor lazily, support checkPublishedApi flag 2016-12-09 11:55:15 +01:00
Mikhael Bogdanov 7af327c567 Added 'checkPublishedApi' to effective visibility checker 2016-12-09 11:55:15 +01:00
Mikhael Bogdanov 038065e827 Updated NON_PUBLIC_CALL_FROM_PUBLIC_INLINE diagnostic to support @PublishedApi 2016-12-09 11:55:15 +01:00
Mikhael Bogdanov 7ea29d3397 Wrong @PublishedApi usage diagnostic 2016-12-09 11:55:15 +01:00
Mikhael Bogdanov 58263c46cc Compatibility validator update 2016-12-09 11:55:15 +01:00
Mikhael Bogdanov 95a47e56f7 InlineExposed usages are changed to PublishedApi 2016-12-09 11:55:14 +01:00
Alexey Andreev 0f813d5cfe JS: fix compiling stdlib tests in JS 2016-12-09 12:04:32 +03:00
Alexey Andreev cc819928de JS: prevent Any.equals from mangling 2016-12-09 12:04:31 +03:00
Alexey Andreev a2d45153ba JS: prohibit dynamic on RHS of in and !in operators (see KT-6579) 2016-12-09 12:03:52 +03:00
Alexey Andreev fc6eaa015f JS: prohibit using more than one argument in indexed access with dynamic receiver (see KT-6580) 2016-12-09 12:03:51 +03:00
Mikhael Bogdanov 627dd66ed5 New ieee754 arithmetic, Fix for KT-14651: Floating point comparisons shall operate according to IEEE754 2016-12-09 09:48:46 +01:00
Mikhael Bogdanov f9b40585cd Partial fix for KT-14989: Missed null check for platform type 2016-12-09 09:46:38 +01:00
Alexander Udalov 88f0c32b2c Treat binaries with version 1.1.2 as pre-release
Metadata version is 1.1.2 since the start of Kotlin 1.1 EAP. Because the
pre-release flag was not written to class files compiled with 1.1 EAP, there's
no other way to figure out that they're pre-release except than to look at the
metadata version. This assumes that the version will be advanced to 1.1.3 once
Kotlin 1.1 is released
2016-12-09 01:59:37 +03:00
Alexander Udalov 513ebb9729 Suggest to use "-Xskip-metadata-version-check" on incompatible classes in classpath 2016-12-09 01:59:36 +03:00
Alexander Udalov 830d2f6603 Do not fail when deserializing incompatible metadata
Catch all exceptions when deserializing metadata with an incompatible version
to prevent the compiler from failing on discovering incompatible classes on the
classpath. Note that this is not the perfect solution: any invariant may be
broken in the incompatible metadata and it may result in a later exception
2016-12-09 01:59:36 +03:00
Alexander Udalov 789483e1eb Remove old mechanism of metadata version error reporting 2016-12-09 01:59:36 +03:00
Alexander Udalov b943ed26f3 Report incompatible metadata version error correctly
Similarly to pre-release classes, load metadata for the class anyway and allow
the resolution to select it as the result and prohibit its usage in the end
with the special diagnostic reported in MissingDependencyClassChecker
2016-12-09 01:59:36 +03:00
Alexander Udalov d204fa91cc Use "-Xskip-metadata-version-check" to load pre-release classes 2016-12-09 01:59:35 +03:00
Alexander Udalov 7de0cfde16 Report error on pre-release top level members 2016-12-09 01:59:34 +03:00
Alexander Udalov 11f975fe89 Add classifier usage checker for missing dependency classes
This has no effect for the original use case of mock class descriptors
(unresolved classes used in libraries), but is necessary for pre-release
classes in case the compiler is a release, because such classes end up in scope
and can be the result of the resolution
2016-12-09 01:59:33 +03:00
Alexander Udalov 4e99349f1f Write "pre-release" flag to class files, do not allow usages in release 2016-12-09 01:59:33 +03:00
Alexander Udalov 1342743001 Add KotlinVersion.IS_PRE_RELEASE and a flag to kotlin/Metadata 2016-12-09 01:59:33 +03:00
Ilya Gorbunov 3e69820907 Fix ClosedComparableRange.contains implementation, add docs. 2016-12-08 22:13:02 +03:00
Ilya Gorbunov 8ec2a2e6fe Add NaN-propagation in coerceIn(ClosedComparableRange<Double>) 2016-12-08 22:13:00 +03:00
Ilya Gorbunov ea77673dde Reimplement coerceIn to range with new range functions: lessThanOrEquals. 2016-12-08 20:50:26 +03:00
Ilya Gorbunov d60fc7d9a8 Introduce ClosedComparableRange interface which inherits ClosedRange to provide special comparison operation for double and float. 2016-12-08 20:50:11 +03:00
Ilya Gorbunov 5773594412 Reimplement ClosedRange.contains extensions to call interface contains method. 2016-12-08 20:50:07 +03:00
Ilya Gorbunov 4721dcd07c Add specialization overloads for Float.rangeTo and Double.rangeTo to resolve them statically. 2016-12-08 20:49:10 +03:00
Ilya Gorbunov 5765031209 Adjust Range.contains optimization for double and float ranges according to #KT-4481
#KT-5044 #KT-4481
2016-12-08 20:47:27 +03:00
Ilya Gorbunov d91f3cba0b Add additional invariant to check in Range.contains optimization tests.
Change expectations for double and float ranges according to #KT-4481
 #KT-5044 #KT-4481

Custom 'rangeTo' might be unoptimized, but still 'in' should not diverge from 'contains'.
2016-12-08 20:47:25 +03:00
Ilya Gorbunov f5cc53c157 Provide ComparableRange specializations for Double and Float.
#KT-4481
2016-12-08 20:47:24 +03:00
Ilya Gorbunov 1aad82bbaf Allow to specify generated function visibility, add capacity rank of primitive type 2016-12-08 20:47:22 +03:00
Ilya Gorbunov e4ab3f3b93 Fix rendered descriptors in test data after enhancing signatures. 2016-12-08 20:34:59 +03:00
Ilya Gorbunov eaf64fb225 MapTest: Uncomment cases that pass now, add more cases. 2016-12-08 20:34:57 +03:00
Ilya Gorbunov 459c5fed8c Tweak checks and type parameter heuristics in LazyJavaClassDescriptor.getPurelyImplementedSupertype to support cases of UnaryOperator and BinaryOperator enhancements. 2016-12-08 20:34:55 +03:00
Ilya Gorbunov c3921d1e40 Docs: improve code formatting in PurelyImplements docs, fix MutableList fq-name in example. 2016-12-08 20:34:54 +03:00
Ilya Gorbunov f66b4201d1 Refactor FakePureImplementationsProvider to use single map 2016-12-08 20:34:52 +03:00