Vladimir Dolzhenko
36ff952a0f
Ignore when failed to get file text
...
Relates to #KTIJ-706
2021-03-05 17:12:56 +01:00
Mikhail Zarechenskiy
6c2eaf2df8
Increase stub versions for major release
...
^KT-41056 Fixed
2021-03-04 16:03:19 +03:00
Toshiaki Kameyama
ee406f1622
Lift assignment out: if last statement is lambda, enclose it in parentheses if necessary
...
#KT-38155 Fixed
2021-02-22 17:40:06 +01:00
Ilya Kirillov
e8f3ebdd19
FIR IDE: introduce HLRedundantVisibilityModifierInspection by extended checker
2021-02-16 15:23:18 +01:00
Alexander Udalov
221f44da5f
Fix warnings in stdlib/compiler/plugins/test code
2021-01-13 19:18:20 +01:00
Alexander Udalov
77a9d14f93
Capitalize/decapitalize only ASCII characters across project
...
Use {de,}capitalizeAsciiOnly and to{Lower,Upper}CaseAsciiOnly where
possible, and stdlib's functions with Locale.US everywhere else.
Otherwise, if the default system locale is Turkish, the capital latin
letter "I" is transformed in toLowerCase to "ı" (see
https://github.com/JetBrains/kotlin/blob/66bc142f92085047a1ca64f9a291f0496e33dd98/libraries/stdlib/jvm/test/text/StringJVMTest.kt#L119 ),
which for example breaks the codegen for `intArrayOf` in
KT-25400/KT-43405.
Similarly, lower case latin letter "i" is transformed to "İ".
#KT-13631 Fixed
#KT-25400 Fixed
#KT-43405 Fixed
2020-12-28 16:10:30 +01:00
Denis.Zharkov
cbb8459e4e
Fix AE: No receiver found on incomplete code with $-signs
...
^KT-24158 Fixed
2020-12-24 14:06:20 +03:00
Mikhail Glukhikh
d907c48d9c
Allow KtEnumEntry...RefExpression.referencedElement be nullable
...
This commit fixes KNPE provoked by RemoveExplicitTypeArgumentsIntention
#KT-29735 Fixed
2020-12-18 09:27:18 +03:00
Dmitriy Novozhilov
329066a4f3
[Parser] Fix parsing of unfinished dot access in string template
...
Problem appeared in cases like this: "{someVar.}"
#KT-34440 Fixed
2020-12-16 17:57:56 +03:00
Ilmir Usmanov
871912f257
Value Classes: Increase BINARY_STUB_VERSION after decompiler changes
2020-11-27 23:52:09 +01:00
Ilmir Usmanov
92f1681de0
Value classes: treat @JvmInline value classes as inline classes
...
Report error on value classes without @JvmInline annotation.
Do not check for @JvmInline annotation in value classes since
it breaks reflection.
2020-11-27 23:52:06 +01:00
Ilmir Usmanov
361ed117bb
Value classes: Add isValue property to class descriptors
...
Reuse isInline flag in proto and IR.
Check metadata version on deserialization.
2020-11-27 23:52:05 +01:00
Ilmir Usmanov
8eff3a6bb3
Value classes: Increase stub version due to changes in the parser
2020-11-27 23:52:04 +01:00
Ilmir Usmanov
11b2a07a59
Value classes: Support 'value' modifier in parser
2020-11-27 23:52:04 +01:00
Mikhail Glukhikh
8320a2966a
[FIR] Implement light tree VAL_VAR strategy as an example
2020-11-26 08:37:46 +03:00
Roman Golyshev
ebfbc2f601
KT-43205 Ignore annotations in CallableClsStubBuilder when needed
...
Kotlin compiler can add `@Deprecated` annotations to the fields of
private companion objects, and if those annotations are not supposed to
be shown in decompiled code and used, the field is marked with
`HAS_ANNOTATIONS=false` flag (see KT-25009)
However, it was not taken into account in stubs building process, which
led to the 'Stubs vs PSI mismatch' exceptions
^KT-43205 Fixed
Also, restore the order of nested typealiases and classes (see KT-41859)
We didn't want to bump the version of the stubs when we fixed this
issue; now we have an opportunity to restore the order back to
match the `MemberComparator`
Also, some refactoring is done to underscore that
`createPackageDeclarationsStubs` is suitable only for packages, not
for any declarations container
2020-11-09 15:49:50 +00:00
Roman Golyshev
82984089f0
KT-42274 Update SOURCE_STUB_VERSION
...
This update should have been done in
4b7d34b537 commit, as it is stated in the
`KtTokens.MODIFIER_KEYWORDS_ARRAY` docs.
Shifting all modifiers by one have led resulted in incorrect modifiers
when stubs were read from the disk. Updating `SOURCE_STUB_VERSION` will
make IDEA recreate all stubs from scratch
^KT-42274 Fixed
2020-10-28 12:57:53 +00:00
Vladimir Dolzhenko
29b23e79f3
Register EXPRESSION_CODE_FRAGMENT, BLOCK_CODE_FRAGMENT in KtStubElementTypes
...
Stubbed type has to be register earlier (see IStubFileElementType#checkNotInstantiatedTooLate)
Relates to ^KT-28732
2020-10-05 11:10:06 +02:00
Vladimir Ilmov
51a37bffff
Incorrect package name for multipart classes
2020-10-01 23:06:17 +03:00
Bart van Helvert
485ada7b90
Move getColon from KtClass to KtClassOrObject
...
Makes it possible to retrieve the colon from a KtObjectDeclaration.
2020-10-01 10:20:20 +03:00
Toshiaki Kameyama
b56272dc64
Add name to argument: do not remove necessary backticks
...
#KT-30894 Fixed
2020-09-29 23:58:28 +09:00
Toshiaki Kameyama
75e8849c94
Add quick fix for INLINE_CLASS_CONSTRUCTOR_NOT_FINAL_READ_ONLY_PARAMETER
...
#KT-34533 Fixed
2020-09-29 23:58:26 +09:00
Victor Petukhov
8f333aef3a
Introduce warning about forbidden referencing to underscore named parameter of the catch block in a future release (KT-31567)
2020-09-29 10:23:45 +03:00
Vladimir Dolzhenko
a149d38c98
Register TYPE_CODE_FRAGMENT in KtStubElementTypes
...
Stubbed type has to be register earlier (see IStubFileElementType#checkNotInstantiatedTooLate)
^KT-28732 Fixed
2020-09-28 11:15:04 +02:00
Roman Golyshev
945edfe987
KT-41859 Place classes after typealiases in DeserializedMemberScope
...
This way, the order in stubs and in deserialized text would be the same
On the next stub version bump, this fix should be reworked: the order
in the `DeserializedMemberScope` should be restored, and the order in
the stubs should be fixed to match the order in `MemberComparator`
^KT-41859 Fixed
2020-09-25 09:03:12 +00:00
Ilya Kirillov
9a99703f24
FIR IDE: implement incremental function analysis
2020-09-23 21:41:41 +03:00
Igor Yakovlev
1d248f1a00
[ULC] Fixed invalid fqName for script inner classes
2020-09-11 12:49:00 +03:00
Roman Golyshev
909d418dd1
Improve diagnostics in KtElementImplStub::getContainingKtFile
...
- If containing file is not a `PsiFileImpl`, `getNode()` will
throw a CCE (which will prevent collecting the diagnostics)
- Relates to #EA-209630
2020-09-07 14:36:09 +00:00
Dmitriy Novozhilov
d1fd1da56f
Rename Visibility to DescriptorVisibility
2020-09-04 11:07:42 +03:00
Florian Kistner
9775a2148a
203: Fix compilation
2020-09-02 18:48:57 +02:00
Alexander Udalov
a9ddf02556
Replace deprecated usages of max/min with maxOrNull/minOrNull
2020-08-25 20:33:59 +02:00
Arsen Nagdalian
9fd104eec8
[FIR] Add contract description blocks support to RawFirBuilder
2020-08-25 12:58:38 +03:00
Arsen Nagdalian
d53f3b9ba8
[PSI] Add some useful getters to psi nodes
2020-08-25 12:58:37 +03:00
Arsen Nagdalian
a936c6331a
[Parser] Add getters' and setters' contracts parsing
2020-08-25 12:58:37 +03:00
Arsen Nagdalian
32a64b888e
[Parser] Add parsing of function's contract either before or after type constraints
2020-08-25 12:58:34 +03:00
Arsen Nagdalian
1b57889773
Clean the code
2020-08-25 12:58:34 +03:00
Arsen Nagdalian
2e9a898f45
[Parser] Move function's contracts parsing in before type constraints parsing
2020-08-25 12:58:34 +03:00
Arsen Nagdalian
0990434840
[Parser] Modify parser so that it could parse contract description blocks of functions
2020-08-25 12:58:34 +03:00
Arsen Nagdalian
e3fe9c3314
[PSI] Add new Psi nodes representing contract effects list and each individual contract effect in the list
2020-08-25 12:58:34 +03:00
Arsen Nagdalian
4b7d34b537
Add "contract" keyword
2020-08-25 12:58:34 +03:00
Dmitriy Novozhilov
a764732020
Rename KotlinBuiltInsNames to StandardNames
2020-08-25 10:41:33 +03:00
Dmitriy Novozhilov
7a7fe77b8e
Move static constants with builtin names to :core:descriptors.common module
2020-08-25 10:31:36 +03:00
Alexander Udalov
0ef4b22cf3
Remove deprecated usages of ContainerUtil
2020-08-20 20:30:34 +02:00
Toshiaki Kameyama
1188f4617a
Change file's package to match directory: add space after package keyword if needed
...
#KT-39604 Fixed
2020-08-19 14:04:18 +03:00
Alexander Udalov
a21f273570
Fix compiler warnings in compiler code
2020-08-17 21:18:20 +02:00
Vladimir Dolzhenko
6e016ce041
ktFile has to return script declaration from stub as well
2020-08-11 14:31:18 +00:00
Florian Kistner
346df07adc
203: Fix compilation for 203
2020-07-09 15:27:45 +02:00
Ivan Kylchik
54945b7fbc
Extract illegal underscore check function to ParseUtils
2020-07-03 12:06:45 +03:00
Mikhail Zarechenskiy
0f2c96c64d
Don't perform additional lookups for DeprecatedSinceKotlin annotation
...
There is no need to check it as `DeprecatedSinceKotlin` can be used
only along with `Deprecated` annotation
2020-06-29 14:23:22 +03:00
Alexander Udalov
0aaf29c045
Introduce DeprecatedSinceKotlin annotation
...
This annotation will be used in the standard library to prevent the new
compiler from reporting deprecation diagnostics in case an older API
version is used (where the declaration was not deprecated yet).
#KT-23575 Fixed
2020-06-29 14:22:29 +03:00