Pavel V. Talanov
1d7a74bfcd
Minor: fix exception message
2018-12-13 14:35:04 +01:00
Alexander Udalov
8c74312cf6
Fix isInitialized for companion lateinit properties
...
Instead of trying to access a missing field `Foo.foo`, call the
synthetic accessor `Foo.access$getFoo$cp` which, as per previous commit,
no longer contains the lateinit assertion
#KT-21862 Fixed
2018-12-13 14:12:33 +01:00
Alexander Udalov
43413fcc44
Move lateinit assertion for companion property to companion object
...
Previously, for a property named `x` in the companion object of a class
named `Foo`, we generated:
- `Foo.access$getX$cp`, consisting of `GETFIELD Foo.x` and lateinit
assertion
- `Foo.Companion.getX`, consisting of `INVOKEVIRTUAL Foo.access$getX$cp`
Now, we generate:
- `Foo.access$getX$cp`, consisting of `GETFIELD Foo.x`
- `Foo.Companion.getX`, consisting of `INVOKEVIRTUAL Foo.access$getX$cp`
and lateinit assertion
The reason is that this way we can avoid generating another accessor and
reuse `Foo.access$getX$cp` in case `isInitialized` is called on a
lateinit property from companion.
For private properties, getX is not generated, but instead the assertion
is generated on each access to the field (which can be improved, see
KT-28331). The same happens for access to non-private properties from
inside the same context where they're declared.
#KT-21862 In Progress
2018-12-13 14:12:33 +01:00
Alexander Udalov
8617365983
Minor, reformat & fix warnings in intermediateValueForProperty
2018-12-13 14:12:32 +01:00
Alexey Tsvetkov
8aa069a774
Make AbstractJvmAbiContentTest system independent
2018-12-13 15:39:39 +03:00
Alexey Tsvetkov
7953a9154c
Register classpath as inputs of SmartJavaExec tasks
2018-12-13 15:39:39 +03:00
Alexander Udalov
bbc7edf9d1
Fix incorrect character replacement in ClassName.jvmInternalName
...
#KT-28682 Fixed
2018-12-13 13:23:45 +01:00
victor.petukhov
725832a281
Fix incomplete printing of exceptions (of the all types) in tests
2018-12-13 12:50:10 +03:00
Nikolay Krasko
0a8e29838f
Add file comparison feature to surround with tests
2018-12-13 12:36:02 +03:00
Nikolay Krasko
0482fe9414
Move check with selection tags to base check
2018-12-13 12:36:02 +03:00
shiraji
06dad5f45b
Surround with try/catch should generate more Kotlin-style code (KT-5435)
...
#KT-5435 Fixed
2018-12-13 12:36:02 +03:00
Nikolay Krasko
c7c51a3d6b
Refactoring: drop MoveDeclarationsOutHelper object
2018-12-13 12:36:02 +03:00
Nikolay Krasko
8dd02126d9
Convert MoveDeclarationsOutHelper to Kotlin and minor improvements
2018-12-13 12:36:02 +03:00
Nikolay Krasko
eda1f1f3a0
Convert MoveDeclarationsOutHelper to Kotlin - rename
2018-12-13 12:36:02 +03:00
Nikolay Krasko
5fb90a8a81
Better caret position after Insert curly braces around variable (KT-28739)
...
Introduce helper class and move caret to it's original position.
#KT-28739 Fixed
2018-12-13 12:36:01 +03:00
Nikolay Krasko
44a36e70ec
Exit when property has no name (EA-129932)
2018-12-13 12:36:01 +03:00
Nikolay Krasko
aada1e4c1b
Do not try to run reformat inspection on read-only file (EA-126979)
2018-12-13 12:36:01 +03:00
Nikolay Krasko
fc4971aa98
Minor: log instead of asserting error (EA-126493)
2018-12-13 12:36:01 +03:00
Nikolay Krasko
a5724293b0
Diagnostic null value in operations node (EA-126606)
2018-12-13 12:36:01 +03:00
Nikolay Krasko
7c23564bc5
Minor: fix nullability warnings and extract method
2018-12-13 12:36:00 +03:00
Nikolay Krasko
1d3d86023e
Log NPE from getting operation reference in binary expression (EA-129499)
2018-12-13 12:36:00 +03:00
Andrey Uskov
ffb277d978
Fix KT-28626, KT-27263, KT-27718 in Idea 191
2018-12-12 19:04:56 +03:00
Andrey Uskov
595e75e059
Fix build in bunch 191
2018-12-12 19:04:15 +03:00
Vyacheslav Gerasimov
201522c6c8
as31: Fix KaptWithKotlincTask compilation
2018-12-12 17:58:29 +03:00
Vyacheslav Gerasimov
b942f00409
as31: set intellijUltimateEnabled flag
2018-12-12 17:58:29 +03:00
victor.petukhov
ee0fa2220e
Fix incomplete printing of runtime exceptions in box tests
2018-12-12 17:44:05 +03:00
Mikhail Zarechenskiy
1d69f35f27
Revert "[NI] Take into account captured types for type depth computation"
...
This reverts commit 383c2d1bff .
It seems this commit causes problems with bootstraping, so it'll be
investigated and refined later
2018-12-12 17:41:30 +03:00
Leonid Startsev
fdf4f02dde
Declare real external symbols for overriden by synthetic function
...
instead of unbound
Unbound symbols were throwing an exception on attempt to analyze them
in the other parts of compiler and are generally incorrect
2018-12-12 17:26:01 +03:00
Mikhail Glukhikh
a15b47c93c
Add "Ambiguous context due to scope receiver in suspend fun" inspection
...
#KT-28696 Fixed
2018-12-12 17:10:37 +03:00
Shagen Ogandzhanian
44da3c89b7
Introduce PointerEvent-related definitions
...
* Resolves https://youtrack.jetbrains.com/issue/KT-23932
* Backed by review https://upsource.jetbrains.com/kotlin/branch/KT-23932-POINTER-EVENT-FROM-REMOTE-IDL
2018-12-12 14:53:18 +01:00
Shagen Ogandzhanian
2d49268a0b
Support float initializers in fun params generated from idl definitions
2018-12-12 14:12:27 +01:00
Mikhail Glukhikh
42fa6ce6f0
Refactor "change type to mutable" in suspicious collection reassignment
...
Related to KT-20626
2018-12-12 15:56:12 +03:00
Mikhail Glukhikh
b17ee60c6f
Change description of boolean argument/augmented assignment inspections
2018-12-12 15:56:12 +03:00
Mikhail Glukhikh
13b09f532c
Boolean literal arguments: check previous arg, fix all args in a row
2018-12-12 15:56:12 +03:00
Mikhail Glukhikh
235b50d86e
Boolean literal arguments: do not highlight with single boolean argument
2018-12-12 15:56:12 +03:00
Mikhail Glukhikh
d31e0b9632
Boolean literal arguments: don't report on a call, just on an element
2018-12-12 15:56:12 +03:00
Toshiaki Kameyama
0d7116aa5d
Introduce "Boolean literal arguments" inspection #KT-2029 Fixed
2018-12-12 15:56:11 +03:00
Mikhail Glukhikh
aa9e48b9b6
Augmented list assignment inspection: add "replace with ordinary" fix
...
Relates to KT-20626
2018-12-12 15:56:11 +03:00
Mikhail Glukhikh
ed8305995e
Don't highlight "replace with +=" for read-only collections
...
Related to KT-20626
2018-12-12 15:56:11 +03:00
Mikhail Glukhikh
c560aada3d
Add "Suspicious collection reassignment" inspection #KT-20626 Fixed
2018-12-12 15:56:11 +03:00
Mikhail Glukhikh
3e936f64bf
Introduce KtReferenceSearch to use LocalSearchScope, when possible
...
This fixes a set of problems in J2K tests in 183
#KT-28368 Fixed
2018-12-12 15:56:10 +03:00
Yan Zhulanow
ef08110354
Evaluator: Render inline class values using its toString() implementation (KT-27414)
2018-12-12 21:40:46 +09:00
Yan Zhulanow
425467ca99
Kapt: Switch to more appropriate way of converting URIs to Files
2018-12-12 21:40:46 +09:00
Yan Zhulanow
eb28ce3007
Fix Android Lint tests (182 bunch only)
2018-12-12 21:40:45 +09:00
Yan Zhulanow
f5bb9d5866
Remove Lint tests for annotation argument API check.
...
Looks like newer Lint API checker ignores type usage in annotations, so these tests are no more needed.
2018-12-12 21:40:45 +09:00
Yan Zhulanow
aa5f1cefd0
Fix testSimple() for "Remove Parcelable" action
2018-12-12 21:40:45 +09:00
Yan Zhulanow
648fb2ef0b
AllOpen: Update test data (enum constructors are now private)
2018-12-12 21:40:45 +09:00
Yan Zhulanow
9ec321b918
Update debugger test data, fix the current behavior
2018-12-12 21:40:45 +09:00
Yan Zhulanow
1734726d50
Remove a magic constant from 'KotlinLambdaMethodFilter'
2018-12-12 21:40:45 +09:00
Yan Zhulanow
a6ba7e6e87
Revert "Remove unneeded usage of the blocking invokeInManagerThread() (KT-24282)"
...
This reverts commit 6c868701
2018-12-12 21:40:45 +09:00