Commit Graph

50348 Commits

Author SHA1 Message Date
Dmitry Petrov b3ce2eea39 Add LanguageVersionSettings to KotlinTypeMapper
KotlinTypeMapper clients should use proper LanguageVersionSettings when
possible.
2018-11-21 12:01:41 +03:00
Yan Zhulanow 5636227857 Android Extensions: Use lazy package fragment descriptors only in IDE 2018-11-21 12:34:01 +09:00
Yan Zhulanow 4f3f813b32 Android Extensions: Make AndroidPackageFragmentProviderExtension lazy 2018-11-21 12:34:01 +09:00
Yan Zhulanow 6f8d44750a Android Extensions: analyze layout XMLs lazily 2018-11-21 12:34:01 +09:00
Yan Zhulanow 12a05e0006 Android Extensions: Use smart pointers in 'AndroidResource' 2018-11-21 12:34:01 +09:00
Ilya Gorbunov 3d2a3cddff Stop producing empty kotlin-stdlib-coroutines jar 2018-11-21 03:42:27 +03:00
Simon Ogorodnik bc7ef66a28 Fix codeStyleSettings damaged test failure properly 2018-11-20 22:13:06 +03:00
Alexander Udalov 67bc8d62fc Do not store JVM reflection objects by soft reference
Otherwise they might be garbage-collected before being made accessible
with `isAccessible = true` and the reflective call.

Also, compute BoxUnboxData in InlineClassAwareCaller right away, to
prevent storing a hard reference on the descriptor (all descriptors and
related data are stored by soft references in kotlin-reflect).

 #KT-27585 Fixed
2018-11-20 17:54:01 +01:00
Mikhail Zarechenskiy 9d2524a790 Fix failing test because of lack of inference annotation
LINENUMBER was incremented because of added import
2018-11-20 19:36:50 +03:00
Mikhail Zarechenskiy 761cf0812b Minor: add test for obsolete issue
#KT-8050 Obsolete
2018-11-20 19:36:50 +03:00
Mikhail Zarechenskiy 7327928449 Refactoring: extract common code into the method 2018-11-20 19:36:50 +03:00
Ilmir Usmanov fda0901b39 Remove usages of kotlin-stdlib-coroutines.jar in tests 2018-11-20 19:09:27 +03:00
Igor Chevdar 2f3ff60abc Fixed bug with fake overridden functions with defaults 2018-11-20 12:11:29 +03:00
Toshiaki Kameyama c49770d9a7 Unused symbol: don't report for type parameter in open class #KT-23639 Fixed 2018-11-20 11:18:18 +03:00
Toshiaki Kameyama bc4d353134 Unused symbol: fix message for interface #KT-28286 Fixed 2018-11-20 11:14:45 +03:00
Matthew Runo 56d354223e Updated suggested issues link to only query the KT project rather than all projects. 2018-11-20 10:52:14 +03:00
Matthew Runo 08d70cbfe8 Update to better describe first time import of project. Changed URL for up for grabs to filter to only show Open issues. 2018-11-20 10:52:14 +03:00
Dmitry Petrov 3efb07bf7b Return kotlin ctor mapped to a java ctor even if java ctor is synthetic
This allows working with constructors with inline class parameters using
Kotlin reflection, as described in
https://youtrack.jetbrains.com/issue/KT-27429#focus=streamItem-27-3161148-0-0

 #KT-27913
 #KT-27429
2018-11-20 09:53:18 +03:00
Dmitry Petrov 9082f19c00 KT-25907: Use proper loop parameter type in for-in-CharSequence 2018-11-20 09:52:09 +03:00
Natalia Selezneva b8086d9093 Do not start multiple background threads loading dependencies for different scripts
^KT-27743 Fixed
2018-11-20 08:51:03 +03:00
Natalia Selezneva 8ce63f6567 Fix extension for ErrorGradleScriptDefinition 2018-11-20 08:48:58 +03:00
Nikolay Krasko 5ab812e29e Enlarge scope for auto-import and completion with extensions (KT-27944)
Android R classes provided with scope enlarger and they can be found
during resolve, but ignored during auto-import search.
2018-11-19 16:47:21 +03:00
Nikolay Krasko be92c5e787 Return back to using Exec task instead of JavaExec for serializing builtins
Idea patches all JavaExec tasks and enables debugger for them. This
causes unexpected breakpoints stops during serialization (IDEA-200192).

An attempt with explicit removing added agentlib:jdwp= parameter breaks
Gradle up-to-date check for this task:

> Task ':core:builtins:serialize' is not up-to-date because:
>   Value of input property 'jvmArgs' has changed for task ':core:builtins:serialize'

Co-authored-by: Ilya Gorbunov <ilya.gorbunov@jetbrains.com>
2018-11-19 15:06:36 +03:00
Denis Zharkov 580d03be5f Support JvmWildcard/JvmSuppressWildcard in ultra-light classes
The idea is reusing logic from KotlinTypeMapper for that
2018-11-19 14:40:51 +03:00
Denis Zharkov ce3b489fa9 Avoid using CheckSignatureAdapter in ultra-light classes 2018-11-19 14:40:51 +03:00
Denis Zharkov 037ad2923c Minor. Rename parameter in KtUltraLightClass::asJavaMethod 2018-11-19 14:40:51 +03:00
Denis Zharkov e15e82e1a9 Refactor KotlinType::asPsiType for ultra-light classes
- Extract HOF that UltraLightSupport::mapType that allows to call
arbitrary functions of type mapper
- Use it for computing return type of functions
- "declaration: KtDeclaration" parameter became unused since it was only
used for return types
2018-11-19 14:40:51 +03:00
Egor Ushakov 06d91fd95f use CharSequence methods where available (KOTLIN-CR-2456) 2018-11-19 13:06:40 +03:00
Toshiaki Kameyama 35cc6ff495 Keyword completion: add 'val' after 'const' #KT-27916 Fixed 2018-11-19 11:51:45 +03:00
Natalia Selezneva 1b715ab253 "Add non-null asserted (!!) call": Fix for array access expression (KT-27071)
^KT-27071 Fixed
2018-11-19 11:09:32 +03:00
Dmitry Petrov 90da274eaa KT-28054: Treat inline class constructor accessors specially 2018-11-19 09:42:03 +03:00
Mikhail Zarechenskiy 3a93cab3b6 Mark JVM specific test with TARGET_BACKEND directive
This is needed to avoid test failing for Kotlin/Native
2018-11-17 22:55:18 +03:00
Ilya Chernikov c05c46d50f Convert to release coroutines (kotlinx-coroutines.1.0.1) 2018-11-17 19:24:34 +01:00
Toshiaki Kameyama 89ba7a7ae8 Make abstract: do not suggest for inline classes #KT-28268 Fixed 2018-11-17 18:07:15 +03:00
Toshiaki Kameyama e671318653 Formatting: add line break between '{' and enum entry (KT-28227)
#KT-28227 Fixed
2018-11-17 01:26:27 +03:00
Ilya Gorbunov 7d3de70754 Correct replacement for js Math.log
The correspondent kotlin.math function is ln(x)

#KT-28251 Fixed
2018-11-17 00:20:54 +03:00
Ilya Gorbunov e81859b50d Document exceptions that can be thrown from MatchGroupCollection.get(name) 2018-11-16 20:29:38 +03:00
Ilya Gorbunov 8d0d6d1bf3 Do not mutate Matcher in MatchResult.next()
Instead of mutating the matcher create a new one when `next()` is called.
This allows getting named groups from that matcher later.

Add lookbehind in matchSequence test to ensure this change doesn't alter
the existing behavior.

Also fixes #KT-20865
2018-11-16 20:29:38 +03:00
Ilya Gorbunov f76c0568ea Additionally run kotlin-stdlib-jdk8 tests on jdk9 and jdk10/11 if available 2018-11-16 19:46:38 +03:00
Ilya Gorbunov c0a7c5cff4 Refactor: use ArrayDeque instead of Stack in FileTreeWalkIterator
Cleanup modifiers, replace if with when.

#KT-27251 Fixed
2018-11-16 19:40:40 +03:00
Toshiaki Kameyama 52ca1803d3 Call chain into sequence: use registerProblemWithoutOfflineInformation() #KT-28231 Fixed 2018-11-16 18:20:40 +03:00
Nikolay Krasko 6c3f01ce2c Refactoring: move channels titles and urls to single place 2018-11-16 17:45:04 +03:00
Nikolay Krasko bc85b531ee Include jre -> jdk library replacement to cleanup 2018-11-16 17:45:02 +03:00
Nikolay Krasko c568ea043f Reformat parameterInfo 2018-11-16 17:45:01 +03:00
Nikolay Krasko b1cf98d82a Reformat completion.handlers 2018-11-16 17:45:00 +03:00
Toshiaki Kameyama 8b2fef3812 Remove explicit type specification: don't propose for ext function type
#KT-8875 Fixed
2018-11-16 16:35:04 +03:00
Dmitry Savvinov c8cbe05722 [Minor] Add even more logging for EA-119635 2018-11-16 14:46:46 +03:00
Toshiaki Kameyama 8089d2e9e3 Replace deprecated symbol usage in whole project: enable on annotation declared without parentheses #KT-12479 Fixed 2018-11-16 13:07:36 +03:00
Toshiaki Kameyama fa51354ef9 Reformat: DeprecatedSymbolUsageInWholeProjectFix 2018-11-16 13:07:36 +03:00
Toshiaki Kameyama 75755afc00 Remove redundant spread operator: don't remove inner argument spread operator #KT-27699 Fixed 2018-11-16 13:06:25 +03:00