Commit Graph

46304 Commits

Author SHA1 Message Date
Ilya Gorbunov 1a290d0c73 Refactor: make JvmMemberSignature a sealed class
Use JvmMemberSignature.asString instead of toString
2018-06-01 06:43:48 +03:00
Ilya Gorbunov 2f58539200 Refactor: allow to distinguish whether JvmMemberSignature is for field or for method
Introduce a method to create org.jetbrains.kotlin.load.kotlin.MemberSignature directly from JvmMemberSignature.
Create JvmFunctionSignature from JvmMemberSignature.
2018-06-01 06:43:48 +03:00
Ilya Gorbunov 36c658fd8b Introduce JvmMemberSignature to represent name and desc of jvm methods and fields
Return member name and desc in a class in order not to parse that information
from concatenated string when required.
2018-06-01 06:43:48 +03:00
Ilya Gorbunov eee9f8ab3f Include kotlinp tests into distTest and kotlinx-metadata-jvm tests into coreLibsTest
kotlinp tests: do not fail due to different directory separators on Windows
2018-06-01 06:43:48 +03:00
Ilya Gorbunov d86947207c Change group of kotlinx.metadata to org.jetbrains.kotlinx
Allow to override version of the resulting artifact with a property.
Setup publishing of the library when its deployment version is specified.
2018-06-01 06:43:48 +03:00
Alexey Sedunov fbb4914bfb Intentions: Fix insertion of necessary lambda parameter for run/let and apply/also conversions
#KT-22931 Fixed
2018-05-31 15:22:32 +03:00
Alexey Sedunov f17053f970 Configuration: Create absent Kotlin SDK when configuring Kotlin/JS module
#KT-24412 Fixed
2018-05-31 15:22:31 +03:00
Alexey Sedunov 924db3f23e Configuration: Fix Kotlin SDK existence check on facet configuration
#KT-24072 Fixed
2018-05-31 15:22:31 +03:00
Dmitry Petrov 7b1b557250 psi2ir: Java annotations have no primary constructor 2018-05-31 10:09:31 +03:00
Dmitry Petrov 8094cb7dc5 psi2ir: Generate external dependencies in a loop
There are some cases (superclasses, overridden methods, and so on) where
external dependencies generation can require additional external
dependencies.
2018-05-31 10:09:31 +03:00
Alexey Tsvetkov cb549cba00 Create kapt configurations before gradle script is evaluated
We cannot create kapt configurations in `KotlinGradleSubplugin.apply`,
because `apply` is invoked after a script is evaluated, so user cannot
refer to kapt configurations in script.

We cannot call `apply` before script's evaluation, because
then we might not be able to determine
if a Gradle plugin corresponding to a subplugin is appled.
For example in case of the following script:
```
apply plugin: "kotlin"
apply plugin: "kotlin-kapt"
```
subplugin's apply will exit early because Gradle plugin "kotlin-kapt"
is not applied yet, when "kotlin"'s apply is evaluated.
2018-05-30 20:24:11 +03:00
Mikhael Bogdanov 4383335168 Update @JvmDefault documentation 2018-05-30 15:24:50 +02:00
Alexander Udalov b5007c417d Minor, restructure reflection tests a little
To allow their usage in https://github.com/udalov/kotlin-obfuscation-test-app
2018-05-30 13:03:10 +02:00
Dmitry Petrov 7a2bb79777 psi2ir: Use substituted 'hashCopy' for generated data class 'hashCopy' 2018-05-30 12:02:34 +03:00
Dmitry Petrov cb301763f3 psi2ir: Fix implicit casts generation
Implicit cast from T to S is not required if
  T <: S.makeNullable()
2018-05-30 12:02:34 +03:00
Nikolay Krasko dac9036969 Remove reload(PsiFile?) usage from KotlinFieldBreakpoint 2018-05-29 21:40:32 +03:00
Nikolay Krasko 439e079c94 Minor: reformat KotlinFindUsagesProvider.kt 2018-05-29 21:40:32 +03:00
Nikolay Krasko 9c305e2431 Fix getting names representation for constructor parameters (KT-23090)
#KT-23090 Fixed
2018-05-29 21:40:32 +03:00
Nikolay Krasko c5b3092c64 Use same amount of memory for all builds and remove tasks.kt.173 2018-05-29 21:40:31 +03:00
Nikolay Krasko e6905c9b3d Refactoring: extract function for getting project 2018-05-29 21:40:31 +03:00
Alexey Sedunov 6f8e25eae7 Configuration: Restore dependency on gradle plugin in buildscript block
#KT-24671 Fixed
2018-05-29 18:07:09 +03:00
Nicolay Mitropolsky cbcc3d2e2e Test for java-keywords in light-annotations (KT-22883)
working with new source-based light annotations
2018-05-29 16:34:10 +03:00
Mikhael Bogdanov ad717d5335 Support properties in compatibility mode 2018-05-29 15:08:07 +02:00
Mikhael Bogdanov 0498c3b765 Don't copy descriptor for delegation generation
Actually source element for DEFAULT_IMPL_DELEGATION_TO_SUPERINTERFACE_DEFAULT_IMPL
  was always null cause descriptor was copies with new kind=DECLARATION.
  That causes element recalculation in DiagnosticFactory:
  element = data.classOrigin.element
  So DEFAULT_IMPL_DELEGATION_TO_SUPERINTERFACE_DEFAULT_IMPL is added to EXTERNAL_SOURCES_KINDS
2018-05-29 15:08:07 +02:00
Roman Artemev 9d2092e86d Fix visibility of @JsName-annotated symbols in stdlib-js 2018-05-29 13:57:34 +03:00
Roman Artemev 06009a532b Add test case to detect name clash in stdlib-js 2018-05-29 13:57:34 +03:00
Mikhael Bogdanov 689a492b9a Minor. Fix test data 2018-05-29 12:47:07 +02:00
Mikhael Bogdanov 23a713d46b Rollback 'Don't copy interface member on DefaultImpl delegation generation, keep kind' 2018-05-29 12:47:06 +02:00
Nicolay Mitropolsky 8e2c9358bc Uast: updates for consistency tests and fixes for missed things
we should use `sourcePsi` instead of `psi` for parents matching, because light `psi` will not be tested, and it is not enough to store only PSI as map key to match parent consistency, because some different UElements could have same sourcePsi.
2018-05-29 13:30:52 +03:00
Mikhael Bogdanov 0a26f527f2 Minor. Fix test data 2018-05-29 11:26:36 +02:00
Mikhael Bogdanov 419218b9cf Rename 'jvm-default-mode' to 'jvm-default'. Add description 2018-05-29 11:26:36 +02:00
Mikhael Bogdanov 020573ef3c Don't generate compatibility suffix twice for properties 2018-05-29 09:29:48 +02:00
Mikhael Bogdanov 60f2dbeb8a Support property accessor in compatibility mode 2018-05-29 09:29:48 +02:00
Mikhael Bogdanov 7f4bd549aa Minor. Fix rebase 2018-05-29 09:28:46 +02:00
Mikhael Bogdanov 1d6665d355 Minor. Remove hack 2018-05-28 22:15:54 +02:00
Mikhael Bogdanov b7bad2bd72 Pass accessorKind into AccessorForCallableDescriptor 2018-05-28 22:15:53 +02:00
Mikhael Bogdanov 7a649e0e74 Convert AccessorForPropertyDescriptor to Kotlin 2018-05-28 22:15:52 +02:00
Mikhael Bogdanov 6d321e7997 Rename AccessorForPropertyDescriptor.java to AccessorForPropertyDescriptor.kt 2018-05-28 22:15:51 +02:00
Mikhael Bogdanov df13d332b3 Minor. Code clean 2018-05-28 22:15:50 +02:00
Mikhael Bogdanov 15cbb68d47 Convert AccessorForCallableDescriptor to Kotlin 2018-05-28 22:15:50 +02:00
Mikhael Bogdanov 2fa521b62a Convert AccessorForFunctionDescriptor to Kotlin 2018-05-28 22:15:49 +02:00
Mikhael Bogdanov 25af7c14e3 Rename AccessorForFunctionDescriptor.java -> AccessorForFunctionDescriptor.kt 2018-05-28 22:15:48 +02:00
Mikhael Bogdanov 8f19dea4a2 Rename FieldAccessorKind to AccessorKind 2018-05-28 22:15:47 +02:00
Mikhael Bogdanov ad57ca7d2c Minor. Code clean 2018-05-28 22:15:46 +02:00
Mikhael Bogdanov 340920fe38 Support compatibility mode for @JvmDefault 2018-05-28 22:15:45 +02:00
Mikhael Bogdanov 9b718e83a9 Don't copy interface member on DefaultImpl delegation generation, keep kind
Old logic is redundant and obsolete
2018-05-28 22:15:44 +02:00
Mikhael Bogdanov 4421b41790 Skip annotation classes in $DefaultImpls method delegation logic
Annotation could be safely skipped (as already interfaces) cause
  compiler generates delegation to DefaultImpls only for classes
2018-05-28 22:15:43 +02:00
Mikhael Bogdanov 065780de4c Switch enableJvmDefault to jvmDefaultMode 2018-05-28 22:15:42 +02:00
Ilya Chernikov bacc2079ed Fix/workaround lazy lcript definition test and related scenarios 2018-05-28 22:10:56 +02:00
Ilya Chernikov 6fdb8746de Fixes after review 2018-05-28 22:10:56 +02:00