Commit Graph

45830 Commits

Author SHA1 Message Date
Natalia Selezneva bed5a3c8f3 Scratch: find correct line to report error at
^KT-23480 Fixed
EA-117936 Fixed
2018-05-08 11:40:51 +03:00
Natalia Selezneva 62fadd9086 Scripts: GradleScriptTemplateProvider should be the first in the contributors list.
This is needed to avoid broking .gradle.kts support by external plugins
2018-05-08 11:40:51 +03:00
Dmitry Savvinov 58eb117ae1 Improve message of exception thrown from codegen
Don't lose information about which file caused crash.
2018-05-08 11:28:40 +03:00
Natalia Selezneva 47bafb8c75 Regenerate IntentionTestGenerated 2018-05-08 09:10:51 +03:00
Natalia Selezneva 1aecd2058c Fix testdata after 534cbae4ef
^KT-14391
2018-05-08 09:02:35 +03:00
Vyacheslav Gerasimov 838f1f91fc Build: Extract android ide modules from kotlin-plugin.jar to standalone jars
So we could exclude them in IDEs which don't have android plugin (AppCode, CLion)
2018-05-08 00:26:04 +03:00
Vyacheslav Gerasimov ec1a9d9907 Move uast service registration to jvm.xml 2018-05-08 00:25:22 +03:00
Vyacheslav Gerasimov da9175febd Build: Exclude uast and lint artifacts from CIDR plugin
There is no java in CIDR platform and java dependent modules should be excluded
2018-05-08 00:25:07 +03:00
Vyacheslav Gerasimov e6f64519e4 Build: Copy uast to idea plugin as separate artifacts 2018-05-08 00:24:22 +03:00
Sergey Igushkin 8fda174fb0 Add the compiler classpath of the KotlinCompile task as KaptTask's input
KaptTask was not declaring the compiler classpath (which it takes from
compileKotlin task for calling the compiler) as input. This commit fixes
that and adds a test that checks compiler classpath input checks for the
kapt tasks.

Issue #KT-23879 Fixed
2018-05-07 15:55:55 +03:00
Sergey Igushkin 352fb4a1c8 Add a user-friendly report that the JDK tools are missing
Issue #KT-20214 Fixed
2018-05-07 15:47:11 +03:00
Mikhail Zarechenskiy 50116fd8fc Fix coercion result for inline classes, add comment 2018-05-07 15:25:48 +03:00
Mikhail Zarechenskiy b25a1d9522 Support inline functions inside inline classes 2018-05-07 15:25:46 +03:00
Mikhail Zarechenskiy 5c57c799fc Fix generation of elvis with null constant for inline classes 2018-05-07 15:25:45 +03:00
Mikhail Zarechenskiy 043c3d9a97 Prohibit properties with backing fields inside inline classes 2018-05-07 15:25:43 +03:00
Mikhail Zarechenskiy 29d15b9990 Prohibit varargs on parameters of inline class types 2018-05-07 15:25:42 +03:00
Mikhail Zarechenskiy d3c1c11dc5 Prohibit initializer blocks inside inline classes 2018-05-07 15:25:40 +03:00
Mikhail Zarechenskiy 6a120d2f85 Require presence of public primary constructor for inline class 2018-05-07 15:25:38 +03:00
Mikhail Zarechenskiy 096fe1c411 Don't report diagnostics on the whole declaration, use main keyword 2018-05-07 15:25:37 +03:00
Mikhail Zarechenskiy ed4fd2bb2f Mark inline classes feature as experimental 2018-05-07 15:25:35 +03:00
Mikhail Zarechenskiy 71de2e3265 Report diagnostics for inline classes even if the feature is unsupported
This would help for those who use inline classes by suppressing error
 about unsupported feature
2018-05-07 15:25:34 +03:00
Mikhael Bogdanov 8834ea74f2 Revert "Don't generate reified inline function as privates"
This reverts commit 56859f7
2018-05-07 14:14:07 +02:00
Mikhael Bogdanov 56859f7b87 Don't generate reified inline function as privates
#KT-18563 Fixed
2018-05-07 12:49:31 +02:00
Mikhael Bogdanov 99284316d6 Don't shrink psi utils class
Shrinker removes all unused private methods
 that could be reified inline functions

 #KT-23402 Fixed
2018-05-07 12:19:09 +02:00
Toshiaki Kameyama 534cbae4ef KT-14391 RemoveUnnecessaryParenthesesIntention lost comment
on closing parenthesis

 ^KT-14391 Fixed
2018-05-07 12:40:57 +03:00
Alexander Udalov 143c3ccb95 Disallow usages of experimental markers as qualifiers
Only allow explicit imports of markers, but not of nested classes
declared in them
2018-05-07 11:37:31 +02:00
Alexander Udalov d27657e8f6 Minor, move loadWasExperimentalMarkerClasses closer to usage 2018-05-07 11:37:31 +02:00
Alexander Udalov 2fea2135f8 Add TYPEALIAS target to UseExperimental 2018-05-07 11:37:31 +02:00
Alexander Udalov 7d74508529 Report experimental diagnostics on inaccessible (wrt SinceKotlin) API
If a declaration is annotated both with SinceKotlin and WasExperimental
and the SinceKotlin version makes it inaccessible, the experimental
checker must regard it as experimental, with markers specified in the
WasExperimental annotation arguments. So only errors/warnings about the
experimentality are going to be reported in this case, and no error that
the declaration is unavailable because of a low API version
2018-05-07 11:37:31 +02:00
Alexander Udalov 1f0d3d9c7c Load WasExperimental values correctly for associated declarations
For example, if a class is `@SinceKotlin("X")
@WasExperimental(M::class)`, then its constructor should also be
accessible if API < X, provided that the opt-in to M is given
2018-05-07 11:37:31 +02:00
Alexander Udalov 9995438b37 Forbid non-intended usages of Experimental and markers
Experimental and UseExperimental can only be used as annotations or
qualifiers (to allow "Experimental.Level.*"); experimental markers can
only be used as annotations or qualifiers, or as left-hand side of a
::class literal in arguments to UseExperimental/WasExperimental.

This is needed because we're not yet sure of the design of this feature
and would like to retain the possibility to drop these declarations
(Experimental, UseExperimental) altogether. If they were going to be
used as types, it would be problematic because we can't simply delete
something from stdlib, should deprecate it first. With this change,
these declarations can only be used if the user has opted into using the
experimental API somehow (for example, with
`-Xuse-experimental=kotlin.Experimental`), so we won't stop conforming
to our deprecation policy if we decide to remove these declarations in
the future
2018-05-07 11:37:31 +02:00
Alexander Udalov ed6f044fb0 Add internal WasExperimental for stdlib
Usages of declarations annotated with WasExperimental are allowed even
if the API version requirement is not satisfied, provided that the
opt-in to all mentioned markers is given. This is needed for smooth
graduation of API in kotlin-stdlib
2018-05-07 11:37:31 +02:00
Alexander Udalov fdc4313860 Minor, fix bodyUsagesAndInline.kt test data 2018-05-07 11:37:31 +02:00
Ilmir Usmanov fad5596ef9 Minor: remove builtins from kotlin-stdlib-coroutines.jar 2018-05-07 10:34:50 +03:00
Ilmir Usmanov 5e4ce4f880 Remove coroutineContext from kotlin.coroutines.experimental.intrinsics package
#KT-22400: Fixed
2018-05-07 10:28:54 +03:00
Mikhail Zarechenskiy 54ca2cbbe0 Introduce original for ReceiverValue and use it inside coroutine checker 2018-05-04 19:54:14 +03:00
Mikhail Zarechenskiy b23e9f771b [NI] Fix checking for the same instance inside for suspend functions 2018-05-04 19:53:54 +03:00
Mikhail Zarechenskiy 64b10d827d [NI] Refactoring: rename NonFixedType -> StubType 2018-05-04 19:08:22 +03:00
Mikhail Zarechenskiy 5187f6b060 [NI] Improve performance of resolution part for postoned variables 2018-05-04 19:08:21 +03:00
Mikhail Zarechenskiy a30a1f2a96 [NI] Update calls after inference for coroutines 2018-05-04 19:08:21 +03:00
Mikhail Zarechenskiy 99a95f31d3 [NI] There is no need in copying constraint storage as it read-only 2018-05-04 19:08:20 +03:00
Mikhail Zarechenskiy e0ca3421ca [NI] Use only receiver from coroutine call to mark postponed variable 2018-05-04 19:08:20 +03:00
Mikhail Zarechenskiy 59c4b9ad2f [NI] Make it possible to use nullable non-fixed type 2018-05-04 19:08:20 +03:00
Mikhail Zarechenskiy 9209222112 [NI] Introduce inference for coroutines and builder-like constructions 2018-05-04 19:08:19 +03:00
Mikhail Glukhikh 54fc846dea Minor: fix parcel test (related to KT-21129) 2018-05-04 18:16:57 +03:00
Mikhail Glukhikh e76debb12b Report UNUSED_PARAMETER in setter #KT-21129 Fixed 2018-05-04 18:04:57 +03:00
Mikhail Glukhikh bcc1c02e73 Cleanup: constructor consistency checker 2018-05-04 17:53:00 +03:00
Mikhael Bogdanov 643e4f5c5a Get rid of descriptors in TailrecLowering 2018-05-04 16:35:44 +02:00
Mikhael Bogdanov dc68936e69 Get rid of descriptors in StaticDefaultFunctionLowering 2018-05-04 16:35:44 +02:00
Mikhael Bogdanov 489808ec38 Get rid of descriptors in PropertiesLowering 2018-05-04 16:35:43 +02:00