Commit Graph

3308 Commits

Author SHA1 Message Date
Anton Bannykh addd24955b JS: support enumValues<E>() and enumValueOf<E>("name") intrinsics. 2016-12-15 17:58:40 +03:00
Ilya Gorbunov 3bedbfae33 Move kotlin.comparisons.Comparator to kotlin package and remove the former from default imports. 2016-12-15 13:39:10 +03:00
Alexander Udalov e50b102e89 Treat absence of version in SinceKotlinInfo as infinite version
This may be needed in the future to make some declarations erroneous for all
versions of compilers
2016-12-15 11:46:18 +03:00
Alexander Udalov ede60efda5 Support SinceKotlinInfo for deserialized classes 2016-12-15 11:46:18 +03:00
Alexander Udalov 5c1adb1258 Serialize SinceKotlinInfo and SinceKotlinInfoTable 2016-12-15 11:46:17 +03:00
Alexander Udalov feeed98323 Introduce SinceKotlinInfo, load from serialized metadata
This is a way for future compilers to cause previous compilers to report
diagnostics on usages of some declarations. Diagnostic can have a message
(and/or error code), level (error, warning, or completely hide the declaration
from the resolution), and Kotlin version, since which the diagnostic should no
longer be reported
2016-12-15 11:46:17 +03:00
Stanislav Erokhin 457918a6dd Changed name resolution for dynamic extension. Added annotation DynamicExtension. 2016-12-14 21:36:26 +03:00
Mikhail Zarechenskiy 62ac91a121 Add operator 'rem' to builtIns
Also deprecate operator 'mod'
2016-12-14 15:29:00 +03:00
Mikhail Glukhikh ab72460f28 Rename: allDependentModules --> allDependencyModules 2016-12-13 19:07:07 +03:00
Mikhail Glukhikh 9ec1c5dc35 Infrastructure change: each header module now knows implementing modules list 2016-12-13 18:54:01 +03:00
Mikhail Glukhikh 57da92b862 Infrastructure change: module descriptor now knows its platform kind & its sources kind 2016-12-13 18:53:55 +03:00
Stanislav Erokhin 59efedf610 Rename platform to header. 2016-12-13 18:00:00 +03:00
Stanislav Erokhin dbe8edda5f Remove propertyDelegate and fix unused parameter checker for provideDelegate. 2016-12-12 23:14:09 +03:00
Stanislav Erokhin 9dc9fb578f Rename toDelegateFor to provideDelegate. 2016-12-12 23:14:07 +03:00
Dmitry Petrov 2ee31916c7 'createDelegate' operator renamed to 'toDelegateFor' 2016-12-12 23:13:55 +03:00
Dmitry Petrov d3ab0f066e 'createDelegate' operator declaration 2016-12-12 23:13:53 +03:00
Roman Elizarov 8affb2726f Pluggable Synthetic Objects 2016-12-12 18:43:26 +03:00
Yan Zhulanow 3f8accc2bf Kapt3: Fix '$' in function generic signatures (KT-15148) 2016-12-09 20:29:23 +03:00
Yan Zhulanow cbef0250aa Allow to turn the first parameter of a SAM-converted lambda into the receiver (KT-12848) 2016-12-09 20:01:21 +03:00
Mikhail Zarechenskiy 97ca51381a Gradual migration of operator 'mod' to 'rem'
- Introduce new 'rem' operator convention
 - Prefer 'rem()' to 'mod()' when both are available, even if mod() is a
   member, and rem() -- an extension
 - Place operator 'rem' under the language feature
2016-12-09 16:43:35 +03:00
Mikhael Bogdanov 5ffc0b36b0 Quickfix for published api 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 95a47e56f7 InlineExposed usages are changed to PublishedApi 2016-12-09 11:55:14 +01: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
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 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 7de0cfde16 Report error on pre-release top level members 2016-12-09 01:59:34 +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 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
Ilya Gorbunov c66b3b8ef9 Nullability for java.lang.ref.Reference.get 2016-12-08 20:22:17 +03:00
Ilya Gorbunov 15061ff125 Add known methods of collections and maps. 2016-12-08 20:22:17 +03:00
Ilya Gorbunov 14ec4c7acc Minor: refactor expression in signatureEnhancement for better debugging 2016-12-08 20:22:17 +03:00
Ilya Gorbunov 253a901bd3 Evolve DSL for defining enhanced nullability info for known JDK functions. Enhance nullability for java.util.Optional. 2016-12-08 20:22:17 +03:00
Alexey Andreev abca774422 Support external modifier on classes in descriptor renderer. Regenerate test data. 2016-12-08 15:41:44 +03:00
Alexey Andreev dadffebe97 Support external modifier in descriptor renderer. Update test data. 2016-12-08 15:41:43 +03:00
Alexey Andreev 7a6b510ddb Include external modifier to serialized descriptors for classes and properties 2016-12-08 15:41:40 +03:00
Alexey Andreev a7ce770cb4 Don't report error for properties and functions without body that either external by themselves or are members of external classes 2016-12-08 15:41:40 +03:00
Alexey Andreev ba2443bcb3 Add external property to class and property descriptors 2016-12-08 15:41:38 +03:00
Alexander Udalov 921694e13a Deduplicate code in JavaClassDataFinder 2016-12-08 12:20:36 +03:00
Alexander Udalov 41f2048f96 Minor, introduce DeserializedContainerSource 2016-12-07 21:46:37 +03:00
Alexander Udalov 3b18531b20 Add expectedVersion to IncompatibleVersionErrorData, move to deserialization 2016-12-07 21:46:36 +03:00
Alexander Udalov c811c1bea5 Reflection: add KAnnotatedElement.findAnnotation
#KT-12250 Fixed
2016-12-07 21:45:24 +03:00
Alexander Udalov 414daef001 Rename KotlinVersion->KotlinCompilerVersion, move to module util.runtime
Rename to avoid confusion with the recently added kotlin.KotlinVersion
2016-12-07 21:11:15 +03:00