Commit Graph

42664 Commits

Author SHA1 Message Date
Nicolay Mitropolsky 23344783a5 KtLightAnnotationForSourceEntry: made more verbose with errors in arrays in params (KT-21335, EA-107118) 2017-11-23 10:37:24 +03:00
Alexander Udalov e43bf90b9c Use CompilerDeserializationConfiguration in JS IC package fragment
This is more correct because it'll allow the incremental package
fragment to be deserialized with the same analysis flags as the changed
sources. Currently it doesn't seem possible to add a reasonable test for
this fix because there are no flags relevant for JS except for
skipMetadataVersionCheck, which is experimental and thus doesn't require
a test
2017-11-22 18:33:04 +01:00
Dmitry Jemerov fd763bde17 Reorder imports to avoid merge conflict
(cherry picked from commit 4286cce)
2017-11-22 18:30:34 +01:00
Dmitry Jemerov 6586228c15 Logging to catch KT-20937 2017-11-22 16:42:01 +01:00
Mikhail Glukhikh 078c27efa3 Add fallback flag for legacy var smart casts after try #KT-21377 Fixed 2017-11-22 18:31:04 +03:00
Mikhail Glukhikh 8b6e63dc18 Add forgotten new inference to JS 2017-11-22 18:31:03 +03:00
Dmitry Jemerov dfe5eb65f9 Don't pack any kotlin stdlib classes into kotlin-plugin.jar
#KT-21395 Fixed

(cherry picked from commit 3fbc5ab)
2017-11-22 14:44:01 +01:00
Dmitry Jemerov e00cc5ab3d Don't crash with old versions of Android Gradle plugin
#KT-21383 Fixed
2017-11-22 14:14:26 +01:00
Simon Ogorodnik 236ba1d2f2 Refactor PerModulePackageCacheService to fix various problems
Original issue here - structure of VfsEvents,
when directory gets deleted, we receive only VFileDeleteEvent
for directory, but not it's content, so we should invalidate
all modules in which sources this directory located, and all
modules that located in such directory

Second problem - When VirtualFile was deleted it is impossible to
get ModuleInfo for it using getModuleInfoByVirtualFile

Third problem - stale references in cache, due cycle dependency

 #KT-20987 Fixed
2017-11-22 16:07:34 +03:00
Mikhail Zarechenskiy bee7ed1431 [NI] Fix mapping of type arguments to parameters for inner classes 2017-11-22 10:22:41 +03:00
Mikhail Zarechenskiy e526a87d54 [NI] Make model more robust: remove diagnostics from resolution atoms
Currently there are two major phases in NI that report diagnostics: resolution parts and completion. They connected in method `KotlinCallCompleter.runCompletion` and previously diagnostics were collected in several places, from resolution atoms, partly from constraint system and partly from `CallResolutionResult`, some of them were lost.

 To mitigate this problem, now diagnostics are not bind to the intermediate candidate, only to the result resolution candidate (overloaded or usual one). And all diagnostics are now collected in method `runCompletion`
2017-11-22 10:22:39 +03:00
Nikolay Krasko 6e51c4d5db Disable script dependency updater in AddRequireModuleTest 2017-11-21 18:55:42 +03:00
Nikolay Krasko a530163074 Add sources for 'reflect' and 'test' libs during JPS config (KT-20956)
#KT-20956 Fixed
2017-11-21 18:55:42 +03:00
Alexey Andreev ec8adfe7c4 JS: fix referencing outer class from secondary constructor
See KT-21041
2017-11-21 12:22:10 +03:00
Alexey Andreev 88441da131 JS: cache PropertyMetadata objects in property delegates
Also, remove unused PropertyMetadata instances

See KT-20737, KT-20738
2017-11-21 12:21:22 +03:00
Alexey Andreev 7ebfba3722 JS: apply boxing when initializing val parameter of type Char
See KT-20854
2017-11-21 12:20:01 +03:00
Alexey Andreev 32a0221474 JS: refactor code that copies default methods in interfaces to classes
Als fixes KT-21245
2017-11-21 12:18:16 +03:00
Alexey Andreev 38e50e964a JS: fix generation of source map for inline lambda with ignored result
See KT-21309
2017-11-21 12:15:25 +03:00
Nikolay Krasko d2aabe076d Refactoring: extract jar names in PathUtil and use them in artifacts 2017-11-21 01:11:01 +03:00
Nikolay Krasko 3a90f3618a Don't force configure with kotlin-jdk artifacts for early versions (KT-21028)
#KT-21028 Fixed
2017-11-21 01:11:00 +03:00
Nikolay Krasko 679a460c44 Minor: make sdk version comparison compatible with JDK > 9 2017-11-21 01:10:59 +03:00
Ilya Chernikov 0e5c443894 Move kapt3 embeddable to prepare folder 2017-11-20 22:59:40 +01:00
Ilya Chernikov 6f73e9994b Add kotlin-annotation-processing-embeddable, publish base kapt3 as kotlion-annotation-processing
(cherry picked from commit 148d4e4)
2017-11-20 20:06:43 +01:00
Ilya Chernikov 56542286eb Bring back filtering of jna and shading of jline in embeddable compiler
they were lost during the migration to gradle

(cherry picked from commit 126a6a8)
2017-11-20 19:59:40 +01:00
Alexey Andreev a9548b1224 JS: fix translation of safe calls to suspend unit functions
See KT-21317
2017-11-20 19:19:24 +03:00
Denis Zharkov 91730e1a9e Do not run search for operator-like names in inspections
It might be rather expensive to search componentN's usages in the whole project
2017-11-20 18:33:46 +03:00
Ilmir Usmanov 0fbbe10143 Support suspendCoroutineUninterceptedOrReturn intrinsic
KT-17336: Fixed
2017-11-20 18:12:41 +03:00
Mikhail Glukhikh 4c583c5a61 Catch InvalidModuleException from getModality() in icon provider
Related to KT-20986
2017-11-18 12:38:25 +03:00
Mikhail Glukhikh dce7377099 Revert check on module descriptor validness in lookup
Related to KT-20986
2017-11-18 12:35:01 +03:00
Mikhail Glukhikh e53cedbd6b Throw InvalidModuleException in assertValid() instead of standard ISE 2017-11-18 12:34:59 +03:00
Mikhail Glukhikh 539f8afef3 Style: do not highlight single return when as "Use expresison body" 2017-11-18 12:34:58 +03:00
Nikolay Krasko c0a3344803 Download jflex from bintray 2017-11-17 17:21:59 +03:00
Mikhael Bogdanov a547019ed0 Switch DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET according to LL 2017-11-17 13:48:44 +01:00
Alexander Udalov d386712903 Report pre-release errors if release LV is used
#KT-21267 Fixed
2017-11-17 13:42:36 +01:00
Dmitry Jemerov 64a8008a8a Add icon for multiplatform projects, update JS icon
#KT-19824 Fixed
2017-11-17 13:13:04 +01:00
Mikhail Zarechenskiy 20e1caaab1 [NI] Use refined expected type by smartcasts in CS 2017-11-17 15:04:20 +03:00
Mikhail Zarechenskiy ca035bc8b8 [NI] Report error from expected type constraint position 2017-11-17 15:04:18 +03:00
Igor Chevdar d4d3f237ee Fix for package level lateinit properties 2017-11-17 13:48:17 +03:00
Alexey Andreev 89db4dfe79 JS: translate when against enum to JsSwitch when possible 2017-11-17 11:07:41 +03:00
Alexey Andreev c54c4a6ce8 JS: fix support of JsSwitch in coroutines 2017-11-17 11:07:39 +03:00
Alexey Andreev 678b4c67c1 JS: translate when to JsSwitch when possible
See KT-21160
2017-11-17 11:07:38 +03:00
Alexey Andreev 7b403211dd JS: kotlinize WhenTranslator 2017-11-17 11:07:37 +03:00
Alexey Andreev b93acb07d2 JS: don't remove debugger statement from coroutine
See KT-19826
2017-11-17 11:07:36 +03:00
Alexey Andreev 21de76f88d JS: fix identifier generation in delegate constructor calls
See KT-21093
2017-11-17 11:07:34 +03:00
Ilya Gorbunov fdeb916111 Correct exclusions of kotlin-stdlib-js 2017-11-16 20:30:51 +03:00
Ilya Gorbunov c10771092a Add maven subprojects to the project 2017-11-16 20:30:51 +03:00
Nikolay Krasko 17f0d3b9b3 Revert JetRunConfiguration for compatibility (KT-21296)
#KT-21296 Fixed
2017-11-16 20:14:38 +03:00
Mikhail Zarechenskiy 66064345e9 [NI] Support fallback resolution for refined sams priority feature 2017-11-16 18:07:54 +03:00
Mikhail Zarechenskiy e42f07b031 [NI] Wait for proper constraints to fix type for callable reference
If expected type is a type variable, then we'll wait for proper constraints, but previously we resolved callable reference as it didn't have expected type at all, because type variable isn't a functional type

 Consider the following example:

 fun foo(i: Int) {}
 fun foo(s: String) {}
 fun <T> id(x: T): T = x

 fun test() {
     val x1: (Int) -> Unit = id(id(::foo))
 }

 Here we shouldn't resolve callable reference until we get constraint from expected type of `x1`
2017-11-16 18:07:51 +03:00
Mikhael Bogdanov cbfcb74b58 Get rid of cli dependencies from ir 2017-11-16 14:46:53 +01:00