Commit Graph

46828 Commits

Author SHA1 Message Date
Nikolay Krasko 87f4d0c5a4 Move "Copy Current File As Diagnostic Test" action to internal (KT-25164)
#KT-25164 Fixed
2018-06-28 16:02:14 +03:00
Nikolay Krasko c68284030d Check files is valid before searching for children (EA-113417) 2018-06-28 16:02:14 +03:00
Alexander Udalov 8c8d0eefbb Relocate package org.jetbrains.kotlin in kotlinx-metadata-jvm
To prevent clashes in scenarios where it's used together with the Kotlin
compiler (e.g. in annotation processing)

 #KT-24945 Fixed
2018-06-28 14:39:53 +02:00
Mikhail Zarechenskiy 173bcd90df Simplify lexer rule for typed integers 2018-06-28 13:32:10 +03:00
Mikhael Bogdanov e149cbe852 Mute failed jvm ir tests 2018-06-28 12:26:41 +02:00
Mikhael Bogdanov a10c06eb4d Regenerate ir tests with JVM_IR target 2018-06-28 12:26:41 +02:00
Mikhail Zarechenskiy dc7678a700 Use smartcast info that related to call in change signature quick fix
There is an inconsistency on how we record smartcasts in old and new
 inference, but we definitely should use all possible information about
 smartcasts in quick-fixes

 #KT-25144 Fixed
2018-06-28 13:14:18 +03:00
Nicolay Mitropolsky 698096f13e Uast: fix for creating an UClass for invalid object-literals (EA-122644, KT-20056) 2018-06-28 10:29:47 +03:00
Alexey Tsvetkov 25e6b76238 Build: disable jar compression for local builds
This speeds ups jar creation twice, which is significant for local
incremental builds when jar creation can dominate compilation time.

Changes in stripMetadata are required because putting entry from not-stripped
jar caused failures when compression was disabled (because size and crc
are actually changed during metadata removal; don't know why it works
with compression).
2018-06-27 23:56:26 +03:00
Alexey Tsvetkov 3dc38fe2f8 Build: enable Java incremental compilation for local builds 2018-06-27 23:56:26 +03:00
Alexey Tsvetkov c73657b38d Build: disable incremental compilation for non-TC build
This should bring small performance improvements for CI builds
(since they are not incremental anyway).
2018-06-27 23:56:26 +03:00
Nico Mandery 5c16633175 fix typos in documentation of JsQualifier annotation (#1733) 2018-06-27 19:34:27 +03:00
Lucas Smaira 5820656aae Find Kotlin class with alternative resolve enabled
Kotlin run configurations are failing non-deterministically in Android
Studio due to not finding the class while in dumb mode (while AS invokes
Gradle build or in indexing after that).

Fix that by finding class in KotlinRunConfiguration with alternative
resolve enabled.
2018-06-27 16:38:44 +03:00
Vyacheslav Gerasimov abd3ac4e96 UAST: Reformat KotlinUObjectLiteralExpression.kt 2018-06-27 16:04:41 +03:00
Vyacheslav Gerasimov a829251690 UAST: Fix possible TypeCastException when creating KotlinUNamedExpression 2018-06-27 16:04:40 +03:00
Vyacheslav Gerasimov 23ee463053 Check if module disposed when getting modules with kotlin files 2018-06-27 16:04:40 +03:00
Vyacheslav Gerasimov 16b4d25c1d Reformat ConfigureKotlinInProjectUtils 2018-06-27 16:04:40 +03:00
Vyacheslav Gerasimov 62c0d37d45 UAST: Do not log PCE in DeclarationDescriptor.toSource 2018-06-27 16:03:16 +03:00
Nikolay Krasko 8ea19eda73 as32: Minor: use full sentences for reasons 2018-06-27 15:11:08 +03:00
Nikolay Krasko 17d4961760 as32: Use full sentences for reasons 2018-06-27 15:11:08 +03:00
Nikolay Krasko 099f3f3ddf Move isEap and isDev utility functions to idea module 2018-06-27 15:11:08 +03:00
Nikolay Krasko 54bb09a5fb Make disabled verification visible in UI 2018-06-27 15:11:07 +03:00
Alexander Udalov 0c45f20515 Minor, fix several CLI argument descriptions 2018-06-27 13:25:30 +02:00
Mikhail Zarechenskiy a765ee41d7 Introduce uL/UL suffix to represent numbers of unsigned long type
#KT-24663 Fixed
2018-06-27 14:21:12 +03:00
Mikhail Zarechenskiy 7c44992016 Allow any case for u suffix
#KT-24663 In Progress
2018-06-27 14:21:07 +03:00
Alexander Udalov 984e37c7f1 Prohibit explicit usage of kotlin.Metadata as annotation 2018-06-27 12:37:18 +02:00
Alexander Udalov 8d124eb77f Minor, use array literal syntax in kotlin.Metadata 2018-06-27 12:20:03 +02:00
Dmitry Petrov 46a3f7420c When in debugger context, access private companion object directly 2018-06-26 16:46:55 +03:00
Nicolay Mitropolsky bef3d4ace2 Uast: proper identifiers for KotlinUBinaryExpression (KT-25092) 2018-06-26 16:39:47 +03:00
Mikhail Glukhikh eb92b7ed7f Unused symbol: don't suggest actual declaration used in another platform
Related to KT-17512
Related to KT-15666
2018-06-26 15:36:10 +03:00
Mikhail Glukhikh 30327aa9cc Do not mark kotlin.test.Test annotated declarations as unused
So #KT-20523 Fixed
2018-06-26 15:36:09 +03:00
Mikhail Glukhikh 7e0e7dc983 Unused symbol: remove forced "used" from actual declarations
Now we really check whether actual declaration has usages
(in expect or actual code) or not
Related to KT-17512
Related to KT-15666
2018-06-26 15:36:07 +03:00
Mikhail Glukhikh e885e54233 Implement search from expect element in KotlinReferenceSearcher
So mostly #KT-17512 Fixed
2018-06-26 15:36:06 +03:00
Mikhail Glukhikh 97d158d833 Find property usages dialog: rename all check-boxes as in other dialogs 2018-06-26 15:36:05 +03:00
Mikhail Glukhikh abbfea357a Add find usages option: search expected 2018-06-26 15:36:04 +03:00
Mikhail Glukhikh 69e420991a KotlinFindMemberUsagesHandler: get rid of deprecation 2018-06-26 15:36:03 +03:00
Mikhail Glukhikh 0a36edcf20 Cleanup: KotlinReferenceSearcher 2018-06-26 15:36:01 +03:00
Mikhail Glukhikh ea7db42af6 Cleanup: findUsagesOptions 2018-06-26 15:36:00 +03:00
Mikhail Glukhikh a46e4f3142 Cleanup: KotlinFindMemberUsagesHandler 2018-06-26 15:35:59 +03:00
Mikhail Glukhikh cc2869988f Test for KT-17512 (yet with incorrect results) 2018-06-26 15:35:58 +03:00
Mikhail Zarechenskiy 600d135786 Fix internal compiler error on importing invisible fake reference
Note that this is not relevant for LOCAL/INHERITED visibilities:
  - for LOCAL visibility it's impossible to have a qualifier
  - INHERITED is an intermediate visibility, we enhance it later
    (see resolveUnknownVisibilityForMember)

 #KT-20356 Fixed
2018-06-26 14:18:21 +03:00
Nikolay Krasko 84b26fc61d Show kotlin internal information only in internal builds 2018-06-26 11:35:22 +03:00
Nikolay Krasko 5df0879538 Fix NPE in replaceImports() (EA-109700) 2018-06-26 11:35:21 +03:00
Alexander Udalov 1951d38f40 Retain optional expected annotations when compiling platform code
After this change, optional expected annotations will be compiled to
physical class files on JVM, and stored to metadata on other platforms,
to allow their usages from dependent platform modules. For example:

    @OptionalExpectation
    expect annotation class A

When compiling this code on JVM, A.class will be produced as if the
class A did neither have the 'expect' modifier, nor had it been
annotated with OptionalExpectation. Note that if there's no actual
annotation class for A, then usages (which can only be usages as
annotation entries) are simply skipped.

Class A will be public from Kotlin's point of view (since it should
be possible to use it in Kotlin sources), but _package-private_ in Java
to disallow its usages outside of the declaring module.

 #KT-18882 Fixed
 #KT-24617 Fixed
2018-06-26 10:23:55 +02:00
Alexander Udalov 4e217b180a Pass BindingContext to CodegenUtil.getActualDeclarations
Will be used in a subsequent commit. Also rename getActualDeclarations
-> getDeclarationsToGenerate
2018-06-26 10:23:55 +02:00
Mikhail Zarechenskiy ba6da7c40a Support varargs of inline class types with non-trivial spread
#KT-24880 In Progress
2018-06-25 17:15:50 +03:00
Mikhail Zarechenskiy 333411c57d Associate vararg of unsigned types with corresponding arrays
This is a first step, full support will be added later

 #KT-24880 In Progress
2018-06-25 17:15:47 +03:00
Mikhail Zarechenskiy 3e45a1529c Allow to declare vararg parameters of unsigned types
varargs inside annotations will be supported later when
 constant evaluation of more complex expressions of unsigned types
 will be ready

 #KT-24880 In Progress
2018-06-25 17:15:44 +03:00
Mikhail Zarechenskiy 3f462659d2 Determine underlying property of inline class by its name
Previous way to distinguish "primary constructor properties" from other
 properties wasn't correct for deserialized properties, because currently
 we don't have special information about this in metadata
2018-06-25 17:11:59 +03:00
Sergey Igushkin dbd72ae53b Fix Android ap option providers as Kapt task nested inputs
1) Exclude the providers arguments from the kapt inputs, as the values
may contain absolute paths, may be output properties etc. The providers
should correctly annotate their inputs.

2) Fix the options passed to kapt as 'value=option' (leading to all the
options collapse into one with the null key), use 'key=option' instead
to make Kapt pass them as '-Aoption'.

Issue #KT-23866 Fixed
Issue #KT-25027 Fixed
2018-06-25 15:03:52 +03:00