Alexey Sedunov
089b34a8a9
Minor: Regenerate tests
2018-01-29 18:56:28 +03:00
Mikhail Glukhikh
1f8e2a1057
Reformat: unfold return to ...
2018-01-29 18:01:10 +03:00
Toshiaki Kameyama
3a81be6cfb
Do not insert returns before Nothing in "Replace return with 'if'"
...
So #KT-22159 Fixed
2018-01-29 17:56:26 +03:00
Mikhail Glukhikh
f28bec0db1
Reformat: if-then utilities
2018-01-29 17:49:34 +03:00
Mikhail Glukhikh
3b8f5bce41
Reformat: "if then to safe access" inspection
2018-01-29 17:44:19 +03:00
Toshiaki Kameyama
fad7818bf0
Fix "if to safe access" false positive for check on incorrect type
...
So #KT-21881 Fixed
2018-01-29 17:43:01 +03:00
Mikhail Glukhikh
5798595206
Cleanup: IntentionDescriptionTest
2018-01-29 16:28:45 +03:00
kenji tomita
a28bc830f5
Add Intention for single character substring #KT-22171 Fixed
2018-01-29 16:23:01 +03:00
Mikhail Glukhikh
29eb594309
Inspection to replace Java Collections methods: simplify type check
...
Related to KT-22038
2018-01-29 15:52:45 +03:00
Mikhail Glukhikh
068f520c01
Inspection to replace Java Collections methods: fix formatting
2018-01-29 15:52:45 +03:00
Toshiaki Kameyama
be4739e65e
Inspection to replace Java Collections methods: extend set of types
...
So #KT-22038 Fixed
2018-01-29 15:52:44 +03:00
Alexey Sedunov
bd8a4d78fa
Line Markers: Don't show test run line markers for top-level functions
...
#KT-13509 Fixed
2018-01-29 14:48:41 +03:00
Mikhail Glukhikh
8cbf364457
Remove braces: add parentheses to if-else in more general case
...
Related to KT-18308
2018-01-29 14:32:36 +03:00
Toshiaki Kameyama
44c15d8311
Remove braces: add parentheses to if-else inside expression
...
So #KT-18308 Fixed
2018-01-29 14:32:36 +03:00
Alexander Udalov
19e38bbc72
Do not run annotation checkers for every non-annotated element
2018-01-29 12:22:41 +01:00
Alexander Udalov
46b8deedf7
Run classifier usage checkers on constructor calls
...
In some cases, REFERENCE_TARGET for annotation entries is the annotation
class descriptor, and in others -- the constructor of that class
2018-01-29 12:22:41 +01:00
Alexander Udalov
8cd7686535
Introduce DeclarationCheckerContext, remove SimpleDeclarationChecker
2018-01-29 12:22:40 +01:00
Alexander Udalov
4cb5483c13
Introduce CheckerContext and ClassifierUsageCheckerContext
...
To reduce the number of parameters in classifier usage checker
implementations, and to unify the API with call checkers
2018-01-29 12:20:36 +01:00
Alexander Udalov
e2def0c60e
Do not report "invalid type of annotation member" on error types
...
In case the referred type is actually an enum that is not found in
dependencies due to a configuration problem, this usage could be valid.
So we can avoid reporting an error here, to reduce the number of
diagnostics.
Also do not report "default value of annotation parameter must be a
compile-time constant" in the same case for the same reason
2018-01-29 12:20:36 +01:00
Natalia Selezneva
c251386fc3
Rearrange script templates in GradleScriptTemplateProvider
...
#KT-22473 Fixed
2018-01-29 11:16:29 +03:00
Alexey Sedunov
b091500adc
Rename: Wrap facade class when renaming file
...
This prevents assertion error (introduced in IDEA 181)
caused by facade light class invalidation
and fixes failing test
2018-01-29 01:34:48 +03:00
Alexey Sedunov
80643c5603
Rename: Fix processing of functions without light methods
...
#KT-22461 Fixed
2018-01-29 01:34:48 +03:00
Alexander Udalov
245d1de2a2
Remove runtime dependency on projectDist(":kotlin-compiler")
...
This dependency makes IDEA reindex kotlin-compiler.jar after every
Gradle build, which takes time and breaks some key IDE features
2018-01-28 10:14:24 +01:00
Dmitry Savvinov
4d951de616
Propagate nullability changes to enhancement for JSR-305 types
...
Fix TypeUtils.makeNullableAsSpecified for SimpleTypeWithEnhancement and
FlexibleTypeWithEnhancement: change nullability of enhancement too. This
fixes several false-positive warnings, like in KT-20855 and KT-20466.
Note that it removes warning in some cases (see testdata change for
uselessElvisRightIsNull.kt). However, this removes warning about
*unnecessary* elvis, i.e. this fixed introduces weak false-negatives, which
is acceptable for the moment.
#KT-20855 Fixed Target versions 1.2.30
#KT-20466 Fixed Target versions 1.2.30
#KT-21238 Fixed Target versions 1.2.30
2018-01-26 12:49:14 +03:00
Nikolay Krasko
4c76dc7287
Forbid modification for KtLambdaExpression in JavaCodeBlockModificationListener
...
See IDEA-185462 for details
2018-01-26 12:42:17 +03:00
Nikolay Krasko
4d2061d836
Minor: reformat coverage
2018-01-26 12:42:17 +03:00
Nikolay Krasko
6d7c779df2
Better diagnostic for file absence in updateJar (KT-22272)
...
#EA-96117 Fixed
#KT-22272 Fixed
2018-01-26 12:42:16 +03:00
Toshiaki Kameyama
7e417272b2
"Join lines" works incorrectly in case of line containing more than one string literal (KT-22374)
...
#KT-22374 Fixed
2018-01-26 12:42:16 +03:00
Mikhael Bogdanov
cc346aef64
Support @JvmStatic for interface companion objects in backend
2018-01-26 10:09:21 +01:00
Mikhael Bogdanov
8bfd6d7404
Support JVM_TARGET in diagnostic tests
2018-01-26 10:09:20 +01:00
Mikhael Bogdanov
c4da370b0b
Allow to use @JvmStatic in interface companion object
2018-01-26 10:09:20 +01:00
Mikhael Bogdanov
2340756b88
Minor. Reformat
2018-01-26 10:09:20 +01:00
Dmitry Savvinov
253cd3871b
Support effect system-related args in platform
2018-01-26 11:30:44 +03:00
Dmitry Savvinov
b29a6e48fb
Refactor language features, which control effect system
...
- Introduce new language feature 'ReadDeserializedContracts', which
allows to deserialize contracts from metadata.
- Introduce new language feature 'AllowContractsForCustomFunctions',
which allows reading contracts from sources.
- Use new features instead of combination 'CallsInPlaceEffect ||
ReturnsEffect'
- Rename 'CallsInPlaceEffect' -> 'UseCallsInPlaceEffect',
'ReturnsEffect' -> 'UseReturnsEffect'. As names suggest, they control
if it is allowed to use corresponding effect in analysis.
We have to introduce separate 'ReadDeserializedContracts' to enable
contracts only in some modules of the project, because libraries are
read with project-wide settings (see KT-20692).
2018-01-26 11:30:44 +03:00
Dmitry Savvinov
78850087be
Revert reformatting for OperationsMapGenerated.kt
2018-01-26 11:00:28 +03:00
Dmitry Petrov
5e34f290ce
Reified 'as?' produces nullable result
...
Previously, this was treated as a regular CHECKCAST, causing KT-22410.
#Fixed KT-22410 Target versions 1.2.30
2018-01-26 10:22:59 +03:00
Dmitry Petrov
bd25bf14df
Minor: reformat code in org.jetbrains.kotlin.codegen.optimization
2018-01-26 10:18:17 +03:00
Yan Zhulanow
e12deb54d6
Android Extensions: Fix "Inconsistent file tree" exception on Activity creation (KT-22349)
2018-01-25 22:03:30 +03:00
Yan Zhulanow
7b055c2172
Kapt: Prefer non-aliased imports over aliased. Make sure the imported short names are unique (KT-22083)
2018-01-25 22:03:29 +03:00
Ilya Gorbunov
233376eef0
Improve min/max specialization for longs and 3-arg overloads in JS
2018-01-25 21:41:18 +03:00
Ilya Gorbunov
2da9f12bc5
Inline findAnyOf(chars) into indexOfAny/lastIndexOfAny
...
This helps to reduce allocation count
#KT-22042
2018-01-25 21:37:22 +03:00
Cuihtlauac ALVARADO
923d9f03fc
Update test results
...
Separated issue reported: KT-22522
#KT-22369 Fixed
2018-01-25 21:15:08 +03:00
Denis Zharkov
31e73e90d6
Explicitly state that PluginDeclarationProviderFactory is source-only
...
Before this change `filesScope` was effectively empty in cases when
module info is a library, thus looking
into PackageIndexUtil.packageExists(name, indexedFilesScope, project)
was kind of redundant since it always returns false for empty scopes
The initial motivation was run by 1716720604
that made PackageIndexUtil::packageExists calls much more frequent
2018-01-25 14:41:28 +03:00
Denis Zharkov
2224f95294
Minor. Avoid wrapping GlobalSearchScope.EMPTY_SCOPE
2018-01-25 14:41:28 +03:00
Denis Zharkov
4d378912bf
Minor. Reformat JVM/JS analyzer facades
2018-01-25 14:41:28 +03:00
Toshiaki Kameyama
4232ad8dfe
"Join lines" works incorrectly in case of line with more than one string literal (KT-22374)
...
#KT-22374 Fixed
2018-01-24 20:09:32 +03:00
Toshiaki Kameyama
c06aaf6128
Some Live Templates should probably be enabled also for "expressions" not only "statements" (KT-19194)
...
Consider if-then, if-else, do-while, while positions without block as
statement position.
#KT-19194 Fixed
2018-01-24 20:09:32 +03:00
Alexander Udalov
543db380d2
Use isJvmInterface in JVM back-end instead of isInterface
...
To support const vals and proper initialization order for companions of
annotations (since 1.3+) as well as interfaces
#KT-16962 Fixed
2018-01-24 15:54:35 +01:00
Alexander Udalov
a46a2b9b1c
Support nested classes in annotation classes
...
#KT-16962 In Progress
2018-01-24 15:54:35 +01:00
Alexey Sedunov
5947b4eb8e
Minor: Fix Maven server url
2018-01-24 17:52:41 +03:00