Commit Graph

2686 Commits

Author SHA1 Message Date
Ilya Gorbunov a12fe2c18a Do not use inline-only in java 2016-02-01 22:09:17 +03:00
Denis Zharkov 36f21932bb Approximate captured type before mapping
#KT-7415 Fixed
2016-01-29 14:36:53 +03:00
Denis Zharkov 5b0fdcb3fe Fix stack overflow caused star projection 2016-01-29 14:36:53 +03:00
Denis Zharkov 6b33e3fb67 Minor. Rename variables and add assertion 2016-01-29 14:36:53 +03:00
Alexander Udalov 2a5b4d2c83 Fix annotations on Java elements in reflection
#KT-10840 Fixed
2016-01-28 21:48:16 +03:00
Denis Zharkov e69b115d9a Remove wrong assertion 2016-01-28 08:36:24 +03:00
Denis Zharkov 11a96ee8c8 Introduce not null type parameter capability
Java nullability annotations may generate types that currently are not denotable in Kotlin:
class Java {
  void <F> foo(@NotNull F f) {}
}

Type of given value parameter should be not nullable under any substitution:
String/String?/String! because of annotation contract.

NB: Currently there is no full analogues for such types in pure kotlin
2016-01-28 08:36:23 +03:00
Denis Zharkov 08dd675fcd Minor. Drop unused property 2016-01-28 08:36:23 +03:00
Denis Zharkov 8e3bdd6a0f Minor. Rename parameter and get rid of labels 2016-01-28 08:36:22 +03:00
Denis Zharkov 6542d091ee Support generic constructors defined in Java
#KT-10686 Fixed
 #KT-10410 Fixed
2016-01-28 08:35:18 +03:00
Alexander Udalov a02d1b75b8 Mark array constructors with 'inline'
To allow non-local returns from lambdas passed to them
2016-01-28 03:10:40 +03:00
Alexander Udalov 70e847b794 Reimplement generation of intrinsic array constructors
Instead of relying on a class from the runtime (which thus cannot be deleted
from the runtime ever), rely on a class from the compiler instead. This has a
minor downside: that class is compiled by the bootstrap compiler, so if codegen
of 'for'-loops or something else used in that class changes, it won't
immediately have an effect on a local working copy (on the build server
everything will be fine because of a 2-step building process).

In the future it may make sense to just manually create all the bytecode
instructions and dump them into a MethodNode. Currently the amount of work
needed for that seems rather significant
2016-01-28 03:10:39 +03:00
Alexander Udalov 7d880f10ec Optimize getFqName calls in KotlinBuiltIns
Check the simple name first, and only then construct the full FqName, in all
'is*' methods
2016-01-28 03:10:38 +03:00
Alexander Udalov 04026dbe84 Make Array<T>(size, init) a constructor of Array
It's not marked as inline, this is why 'crossinline' was added in
jaggedArray.kt/jaggedDeep.kt. Will be fixed in the following commits
2016-01-28 03:10:37 +03:00
Alexander Udalov 18238bd6f3 Minor, drop DescriptorRendererOptions#prettyFunctionTypes 2016-01-28 03:10:19 +03:00
Alexander Udalov 9e8b6571f4 Make primitive array factory functions constructors 2016-01-28 03:10:19 +03:00
Alexander Udalov 4b03adaa57 Minor, improve AbstractLazyType#toString for debug 2016-01-28 03:10:19 +03:00
Alexander Udalov 0e481a4340 Minor, fix Array kdoc 2016-01-28 03:10:19 +03:00
Ilya Gorbunov 744a7a83f7 Cleanup RC deprecations in compiler and plugin. 2016-01-27 18:34:30 +03:00
Dmitry Petrov 9db3440e72 Fix type inference issues for 'if' and 'when'.
Use 'expectedType' (when present) as an explicit type argument for a special construct call.
Unfortunately, this approach can't be used for elvis due to other elvis-related inference hacks.
Fixes KT-10807, KT-10811.
This also affects KT-6189: now we can infer proper type for 'if'.

If type inference for special call failed, and we found no type errors in sub-expressions,
report TYPE_INFERENCE_FAILED_ON_SPECIAL_CONSTRUCT error.
This (and the hack above) fixes KT-10809: code no longer compiles.
2016-01-27 17:07:20 +03:00
Alexey Tsvetkov 56942930c9 Minor: remove unreachable code 2016-01-27 12:28:44 +03:00
Mikhail Glukhikh 0368631aa3 Source code fix: exposed visibility in object members 2016-01-26 19:04:04 +03:00
Yan Zhulanow 0304bd1dc1 More precise diagnostic messages about "operator modifier is not applicable" 2016-01-26 17:21:44 +03:00
Denis Zharkov f560799bb7 Support top level wildcard types
#EA-73650 Fixed
2016-01-26 16:41:29 +03:00
Ilya Gorbunov 23080f78f7 Map.getOrPut: treat nulls as missing values. 2016-01-26 11:49:18 +03:00
Ilya Gorbunov 28ab9eebbc minor: manual cleanup 2016-01-26 02:26:33 +03:00
Stanislav Erokhin aca19ed27a KT-10772 Problem with daemon on Idea 15.0.3 & 1-dev-25
# KT-10772 Fixed
2016-01-24 12:29:23 +03:00
Alexander Udalov 7981e5aa3a Increase metadata version to 1.1, hardcode incompatibility with 1.0
Add a temporary option to suppress incompatibility errors when compiling Kotlin
against current IDEA libraries until they are migrated
2016-01-23 10:00:19 +03:00
Stanislav Erokhin 30bb8d4828 Minor. Optimized enhanceSignature method 2016-01-22 22:09:33 +03:00
Stanislav Erokhin f710ba88f8 Minor. Removed TypeParameterDescriptor#getLowerBounds 2016-01-22 22:09:33 +03:00
Ilya Gorbunov 9a41e07ac0 Use IDEA 143.1960 built with master kotlin branch.
Remove tweaks required to bootstrap packages.
Restore non-star imports of kotlin.text.Charsets.
2016-01-22 22:06:22 +03:00
Denis Zharkov 6c0cd70a22 Introduce PureReifiable annotation
It prevents reporting unsafe substitution warning on expressions
like 'arrayOf(arrayOf(""))'
2016-01-22 19:17:22 +03:00
Denis Zharkov 4cf1393e81 Minor. Render annotations on type parameters 2016-01-22 19:17:22 +03:00
Denis Zharkov 70dc5b5403 Prohibit use of captured type as argument for reified parameter
#KT-8093 Fixed
2016-01-22 19:17:22 +03:00
Denis Zharkov 751f66c656 Report warning on generic type as argument for reified parameter
#KT-6484 Fixed
2016-01-22 19:17:22 +03:00
Denis Zharkov 5baa0ed4bb Minor. Rename TypeUtils.containsSpecialType -> contains 2016-01-22 19:17:22 +03:00
Denis Zharkov a5c13ce8cf Approximate projections in SAM type when creating SAM adapter
Use the same approach as Java 8 applies to function types
(see non-wildcard parametrization in §9.9 of JLS)

 #KT-6918 Fixed
2016-01-22 19:17:22 +03:00
Denis Zharkov d87b13931d Create special type for missing dependencies when resolving annotations
#KT-10748 Fixed
2016-01-22 19:17:22 +03:00
Michael Bogdanov 829978a37d Added additional parameter for default methods 2016-01-22 10:10:32 +03:00
Ilya Gorbunov 4d5ec9be3f Drop identityEquals from builtins, compiler and tests. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov 2a125ca92d Drop deprecated builtins: PropertyMetadata, progression internal utils, HiddenDeclaration and Extension annotations 2016-01-22 05:54:38 +03:00
Ilya Gorbunov 91f4cf0ebc Drop Progression<T> and its deprecated properties: start, end, increment.
Drop deprecated range extensions.
Make progression constructors private.
2016-01-22 05:54:38 +03:00
Ilya Gorbunov 6dd8470835 Drop deprecated primitive ranges and progressions: for Byte and Short 2016-01-22 05:54:38 +03:00
Ilya Gorbunov e8621cb738 Drop Range<T> interface and its extensions. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov 1129cee0ff Collect nested classes from all 4 builtin packages. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov e500e4bdf4 Obtain purely implemented interface class descriptor by its fq-name. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov e485bd4909 Fix mutability-flexible types rendering. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov 83ef48d0ac Refer to builtin names in HeuristicSignatures and j2k TypeVisitor 2016-01-22 05:54:38 +03:00
Ilya Gorbunov 346291af7b Use fq-names from KotlinBuiltins.FQ_NAMES instead of hardcoded ones. 2016-01-22 05:54:38 +03:00
Ilya Gorbunov 9c0f0cad70 Packages: move collections to kotlin.collections. 2016-01-22 05:54:38 +03:00