Toshiaki Kameyama
0fcd1a2072
Introduce "Delegate to 'var' property" inspection #KT-26724 Fixed
2018-11-07 13:59:00 +03:00
Alexander Udalov
17d740a373
Do not try computing return type in OverloadChecker
...
Return type is not needed for checking overloads, but querying it may
involve resolving function bodies, which usually happens after overload
checking (see LazyTopDownAnalyzer.analyzeDeclarations) and at this point
can lead to incorrect BACKING_FIELD_REQUIRED value being computed for
some properties (see KT-27895)
#KT-27895 Fixed
2018-11-07 11:00:15 +01:00
Anton Bannykh
829bdf6061
JS: fix noInline version of inline suspend fun (KT-27611 fixed)
2018-11-07 12:34:00 +03:00
Toshiaki Kameyama
455db32199
"Remove parameter" quick fix: remove also type constraint
...
#KT-26673 Fixed
2018-11-07 12:20:35 +03:00
Anton Bannykh
59009430e5
JS: report inline suspend functions to IC
...
* Also inline suspend lambda'a
* Also use correct JsName's in exported suspend inline fun's
* Also use less unused imports
2018-11-07 12:11:01 +03:00
Anton Bannykh
82268cd95d
JS: fix concurrent access to NameSuggestion.cache
2018-11-07 12:07:58 +03:00
Anton Bannykh
5dae00182d
JS: fix suspend lambda inlining
...
* Also avoid casts when setting inline metadata
2018-11-07 12:07:02 +03:00
Anton Bannykh
4c5201d30e
JS: fix module parameter linking
2018-11-07 12:06:09 +03:00
Mikhail Glukhikh
da02acd6e9
Fix flaky "plugin & stdlib versions different" #KT-23744 Fixed
...
Before this commit, kotlin-stdlib-common or -jdk8 can be accidentally
detected as kotlin-stdlib with the following strange version resolve.
Now we check for dash after name, so it's not possible.
2018-11-07 11:56:55 +03:00
Mikhail Glukhikh
fcfeb33501
Don't suggest "Implement as constructor parameters" in actual class
...
This applies if expect class has primary constructor declared
#KT-27791 Fixed
2018-11-07 11:56:55 +03:00
Mikhail Glukhikh
63856cff1b
Fix failing GradleImportingTestCase-based tests in 183 #KT-28026 Fixed
...
To fix this, we say explicitly not to use qualified module names option
during Gradle import
Related to IDEA-201249
2018-11-07 11:56:55 +03:00
Mikhail Glukhikh
e597dda526
AndroidViewConstructorFix: do not reformat while creating constructor
...
Before this commit, it was done by createDeclarationByPattern,
preventing later reformatting in addAnnotation
Related to KT-27945
2018-11-07 11:56:54 +03:00
Toshiaki Kameyama
d0d98dc283
Redundant companion reference: fix false positive for class with name Companion #KT-27861 Fixed
2018-11-07 11:53:22 +03:00
Bradley Smith
4b8f8604f2
Change kotlinSourceSets -> allKotlinSourceSets
...
This ensures that transitive SourceSets are also merged and included in
the model.
2018-11-06 20:19:02 +03:00
Bradley Smith
f426fda18b
Remove unused inport
2018-11-06 20:19:02 +03:00
Bradley Smith
1e37785de1
Populate the SourceSets with more relevant information.
2018-11-06 20:19:02 +03:00
Bradley Smith
f3482d1251
Register KotlinModelBuilder for kotlin-android plugin
2018-11-06 20:19:02 +03:00
Dmitry Savvinov
939b58f8f4
Fix testdata to incorrect to keep local testruns green
...
This test was originally written with fix for KT-22379
Lately, fix was proven to be wrong and reverted (KT-27084), which made
this test fail.
Correct solution here would be to mute test with link to YT issue, but
unfortunately we don't have infrastructure to mute tests locally (yet),
which is a major issue because this tests is a part of very popular for
local smoke-testing test suite (DiagnosticTestsGenerated).
2018-11-06 19:29:28 +03:00
Leonid Startsev
facd2d7aec
Call Gradle import handlers when importing Gradle modules from new mpp plugin
...
This enables serialization and other plugins in IDE with new mpp
2018-11-06 16:21:32 +03:00
Simon Ogorodnik
3590d534e5
KT-24788: Fix exceptions in offline inspections
...
When there is severe memory load SLRUCache inside getResolutionFacade
may cause double computation of ResolutionFacade, thus will cause
moduleDescriptor to be recreated, and it will be different from one
that is stored in declarationDescriptor
Newer resolutionFacade will actually not built for old moduleDescriptor
and will cause exception
#KT-24788 fixed
2018-11-06 15:49:01 +03:00
Nikolay Krasko
6c67cb3d7f
Prioritize failure in expect file over stub validation problem in tests
2018-11-06 13:43:24 +03:00
Nikolay Krasko
6dcc3374fe
Get string entries from stubs (KT-23738)
2018-11-06 13:43:23 +03:00
Nikolay Krasko
359e16eb82
Get argument name from stubs if possible (KT-23738)
2018-11-06 13:43:22 +03:00
Nikolay Krasko
3f53f9d9fb
Allow storing dot qualified expression in annotations arguments (KT-23738)
2018-11-06 13:43:21 +03:00
Nikolay Krasko
a794d26493
Get stubbed expressions in value arguments (KT-23738)
2018-11-06 13:43:20 +03:00
Nikolay Krasko
a9c3b27d3e
Don't generate stub for value arguments list when no arguments present (KT-23738)
...
Need this to conform stubs list obtained by decompiler.
Also ignore green stub, because is might not contain actual psi node.
2018-11-06 13:43:19 +03:00
Nikolay Krasko
efa59bfc7e
Make stubs for string entries (KT-23738)
2018-11-06 13:43:17 +03:00
Nikolay Krasko
37d7e618da
Stub element for KtStringTemplateExpression (KT-23738)
2018-11-06 13:43:16 +03:00
Nikolay Krasko
11543ba897
Make possible store constant values in stubs (KT-23738)
2018-11-06 13:43:15 +03:00
Nikolay Krasko
d9bc512556
Put arguments name to stubs in annotations (KT-23738)
2018-11-06 13:43:14 +03:00
Nikolay Krasko
12f127d631
Add stub for annotations value arguments (KT-23738)
2018-11-06 13:43:13 +03:00
Nikolay Krasko
fbb0e7d927
Stubbed VALUE_ARGUMENT_LIST and store it for annotations (KT-23738)
2018-11-06 13:43:12 +03:00
Nikolay Krasko
0f0dfe725e
Refactoring: move KtExpression.unpackFunctionLiteral to utils file
2018-11-06 13:43:10 +03:00
Nikolay Krasko
7c49eeded7
Make KtProperty.getInitializer() use stub check
2018-11-06 13:43:09 +03:00
Nikolay Krasko
4f52f62b44
Use stubs in KtProperty for getDelegate() and getDelegateExpression()
2018-11-06 13:43:08 +03:00
Nikolay Krasko
f892714bea
Test for stubs in annotations (KT-23738)
2018-11-06 13:43:07 +03:00
victor.petukhov
9a61998fca
Add lexer test runner and whitespace characters tests
...
Whitespace characters for the tests are U+000B, U+000C, U+000D, U+0085, U+2028, U+2029
2018-11-06 11:19:15 +03:00
victor.petukhov
fe072e3366
Fix the lack of the handling of whitespace characters in the KDoc lexer
...
Affected characters are U+000B, U+000C, U+000D, U+0085, U+2028, U+2029
This problem reproduces with JFlex since 1.5.0: http://jflex.de/changelog.html#jflex-1.5.0-jan-21-2014
2018-11-06 11:18:58 +03:00
victor.petukhov
9e6ac6cb2a
Fix the lack of the handling of whitespace characters in the Kotlin lexer
...
Affected characters are U+000B, U+000C, U+000D, U+0085, U+2028, U+2029
This problem reproduces with JFlex since 1.5.0: http://jflex.de/changelog.html#jflex-1.5.0-jan-21-2014
2018-11-06 11:18:38 +03:00
Toshiaki Kameyama
4a82f50e79
Convert concatenation to template: omit braces when converting 'this' #KT-7555 Fixed
2018-11-06 11:03:08 +03:00
Toshiaki Kameyama
7a9effe30d
Redundant companion reference: Fix false positive in enum entry #KT-27861 Fixed
2018-11-06 11:02:35 +03:00
Karen Schwane
d88fd8aa6f
KT-20357 Add samples for maxBy and minBy
2018-11-04 22:34:16 +03:00
Alexey Tsvetkov
aae24c993d
Revert usage of lazy task API
...
We want to be compatible with Gradle 4.0+
where the API is not available.
Use eager task creation API for now.
Lazy API support should be added later with
proper Gradle versions checks.
2018-11-03 00:59:27 +03:00
Ivan Gavrilovic
c42b3b8ff8
Do not resolve configuration for scripting Gradle plugin
...
Avoid resolving kotlinScriptDef configurations during
configuration phase. Also, make task creation lazy.
#KT-27160 fixed
2018-11-03 00:59:27 +03:00
Mikhail Glukhikh
22fa9b6b92
AndroidViewConstructorFix: add white space after annotation explicitly
...
This fixes Android formatter-related issue
#KT-27945 Fixed
2018-11-02 19:51:44 +03:00
Mikhail Glukhikh
279203e2e1
FIR visitor generator: fix copyright generator to pass conformance test
2018-11-02 19:44:56 +03:00
Mikhail Glukhikh
631adde3f5
Regenerate FIR resolve tests
2018-11-02 19:44:56 +03:00
Mikhail Glukhikh
2bc063b230
FIR: implement default star importing scope
2018-11-02 19:44:56 +03:00
Mikhail Glukhikh
284b21b2a6
Get rid of descriptors, resolved classifiers, + some cleanup
2018-11-02 19:44:55 +03:00
Mikhail Glukhikh
8035be07e2
FIR: built-in resolve, preliminary version #KT-24091 Fixed
2018-11-02 19:44:55 +03:00