Natalia Selezneva
f71269009a
Refactoring: use KtScript.scriptDefinition instead of KotlinScriptDefinitionProvider.findScriptDefinition if possible
2018-08-03 15:25:35 +03:00
Natalia Selezneva
736361e345
Provide a default scriptDefinition for script
2018-08-03 15:25:35 +03:00
Natalia Selezneva
c802428326
Do not check script definitions in parser
2018-08-03 15:25:35 +03:00
Ilya Gorbunov
2a598e0ac4
Replace ReadOnly/Mutable usages in the compiler
...
Replace ones from org.jetbrains.kotlin package with new annotations from kotlin.annotations.jvm.
No need to copy them to compile kotlin-reflect anymore.
Then simplify reflect project more: no sources — no need to pack its direct output.
2018-08-03 09:37:38 +03:00
Vyacheslav Gerasimov
0103c0d2fd
Switch to 182 platform
2018-08-02 18:17:06 +03:00
Nikolay Krasko
449069b1b7
Attach preceding line comments to property accessors (KT-25417)
...
#KT-25417 Fixed
2018-08-02 14:38:25 +03:00
Dmitry Savvinov
5ab79a111d
Introduce 'mayHaveContract'-flag in stubs
...
This is needed for further commit, which supports contracts-based
smartcasts in partial body resolve mode.
NB: Stubs can be built from 3 sources:
- source code (contract presence can be checked by PSI)
- binary data (contract presence can be checked by Kotlin Metadata)
- decompiled sources
The last case is a bit of a headache, because usually bodies are omitted
in decompiled sources. To workaround it, we have to inject stubbed
contract-call in the body.
2018-07-27 16:59:24 +03:00
Dmitry Savvinov
724b7bf363
Minor: rename and refactor contract-related PSI checks in ktPsiUtil
2018-07-27 16:59:23 +03:00
Dmitry Savvinov
b943140f3a
Move purely PSI checks of contract presence to ktPsiUtil.kt
2018-07-27 16:59:23 +03:00
Mikhail Glukhikh
48017a81ee
Move isEquivalentTo() from KtClass to KtClassOrObject
...
This makes objects and companions with the same qualified name
compatible from find usages point of view
So #KT-25326 Fixed
So #KT-25438 Fixed
2018-07-26 18:00:26 +03:00
Mikhail Glukhikh
a7d189cd1c
Branch 173: delete unnecessary duplicate of KtClassOrObject
2018-07-26 18:00:22 +03:00
Ilmir Usmanov
fa9653c3d2
Deserialize experimental coroutines as suspend functions/types
...
but deprecate them for now.
Promote stub version.
#KT-25623: Fixed
2018-07-23 21:52:17 +03:00
Denis Zharkov
01503a84d9
Partially revert 79e776e9d7
2018-07-23 10:36:31 +03:00
Denis Zharkov
79e776e9d7
Drop KtImportsFactory as it became unused after previous commit
2018-07-20 11:27:08 +03:00
Denis Zharkov
ec23695f77
Avoid creating fake PSI for default imports
...
#KT-13860 Fixed
2018-07-20 11:27:08 +03:00
Yan Zhulanow
a4b3653e1c
Debugger: Navigate to the right file in MPP projects (#KT-25152, #KT-25147)
2018-07-17 20:54:29 +03:00
Ilya Chernikov
0f46f62232
Add script class annotations generation from the base class
2018-07-10 08:43:51 +02:00
Alexey Sedunov
60583e557f
PSI: Do not delete package directive for file in default package
...
#KT-24968 Fixed
2018-06-28 18:22:28 +03:00
Alexey Sedunov
ed597e2da5
Extract Function: Make compliant with PublicApiImplicitTypeInspection
2018-06-28 18:22:27 +03:00
Alexey Sedunov
bd88e02172
Extract Superclass: Fix visibility lifting when moving to interface
...
#KT-16281 Fixed
2018-06-28 17:52:04 +03:00
Mikhail Zarechenskiy
173bcd90df
Simplify lexer rule for typed integers
2018-06-28 13:32:10 +03:00
Mikhail Zarechenskiy
a765ee41d7
Introduce uL/UL suffix to represent numbers of unsigned long type
...
#KT-24663 Fixed
2018-06-27 14:21:12 +03:00
Mikhail Zarechenskiy
7c44992016
Allow any case for u suffix
...
#KT-24663 In Progress
2018-06-27 14:21:07 +03:00
Alexander Udalov
9309570752
Fix serialization of type parameters inner generic class
...
The call to `createTopLevel` instead of `create` (which creates
serializers for outer classes properly, with correct type parameter
contexts) caused MetadataSerializer to write type parameter metadata
incorrectly. For example, in the following case:
class A<E> {
inner class B<T, E> { ... }
}
A's type parameter E would get id 0, and B's type parameters T and E
would get ids 0 and 1. This is a problem because ids are supposed to be
unique for each class including its outer classes, and deserializer,
decompiler and stub builder rely on this assumption.
JVM metadata is unaffected because `create` is called correctly there,
see MemberCodegen#generateKotlinClassMetadataAnnotation
#KT-24944 Fixed
2018-06-21 14:45:45 +02:00
Dmitry Petrov
67247ee490
'val' in 'when' subject can't have modifiers (annotations are ok)
2018-06-20 14:06:34 +03:00
Dmitry Petrov
8aec99f4b5
Fix parsing variable declaration in when subject
...
- parse destructuring declarations
- parse annotations on variable declaration in when subject
2018-06-20 14:06:34 +03:00
Dmitry Petrov
1eeafc2d0e
Resolve variable declaration in 'when' subject
2018-06-20 14:06:34 +03:00
Mikhail Glukhikh
b87dd07dd1
Redundant companion reference: minor refactoring
2018-06-19 12:48:11 +03:00
Natalia Selezneva
077554c438
Use field access instead of setter in clone method of KtCodeFragment
...
Fix EA-120381
2018-06-16 00:01:29 +03:00
Vyacheslav Gerasimov
4dbcb2e50e
182: Switch 182 to SNAPSHOT builds (until next EAP)
...
Android plugin 3.1 is merged to IJ 182, we need to provide compatible plugin
2018-06-09 14:44:50 +03:00
Yan Zhulanow
ab5614eaac
Minor: Replace a number of trivial Guava usages with constructor calls and kotlin-stdlib function calls
2018-06-08 19:37:47 +03:00
Alexey Sedunov
0f80dd4ecf
Navigation: Use local search scope for top-level properties in script
...
#KT-20465 Fixed
2018-06-04 20:17:44 +03:00
Alexey Sedunov
3c267b206b
Move: Fix exception on moving top-level declaration from/to script file
...
#KT-20260 Fixed
2018-06-04 20:17:43 +03:00
Mikhail Zarechenskiy
bf5f710f39
Parse integers with unsigned ('u') suffix
2018-06-04 18:19:34 +03:00
Toshiaki Kameyama
8271e85dbb
ReplaceArrayOfWithLiteralInspection: Remove unnecessary parentheses
...
#KT-21878 Fixed
2018-05-22 17:33:25 +03:00
Ilya Chernikov
b3219cb762
Implement lazy script definition and light discovery in cli plugin, ...
...
update appropriate parts of the scripting infrastructure
2018-05-14 11:13:44 +02:00
Ilya Chernikov
d4070cc4d7
Return null on directories in script definition wrappers for files
2018-05-03 22:15:10 +02:00
Ilya Chernikov
48cf0bd949
Fixes and refactorings after review
2018-05-03 22:15:10 +02:00
Ilya Chernikov
516924cda1
Add support for script environment variables to the frontend
2018-05-03 22:15:09 +02:00
Ilya Chernikov
15f9ad9531
Implement quick non-script detection and lazy script discovery..
...
so ".kt" and ".java" files are not considered as scripts and quickly
filtered out, and for the other files the the checks are implemented
using sequences, mechanisms provided to supply script definitions
lazily, and script discovery is implemented using this mechanisms.
2018-05-03 22:15:09 +02:00
Vyacheslav Gerasimov
8c88ac69df
Cleanup .181 bunch files
2018-04-27 18:25:21 +03:00
Vyacheslav Gerasimov
bc403ce744
Switch to 181 platform
2018-04-27 18:25:17 +03:00
Toshiaki Kameyama
e58d9c5507
Add intention for converting to block comment and vise versa
...
So #KT-23137 Fixed
2018-04-24 11:57:56 +03:00
Nicolay Mitropolsky
ebdee1f24c
182: JvmDeclarationSearcher-implementation for Kotlin based on light-classes
...
#KT-23764
2018-04-23 21:37:58 +03:00
Nikolay Krasko
846a1a0179
Remove deprecated marker for JVM debugging in Kotlin code (KT-23886)
...
#KT-23886 Fixed
2018-04-20 14:37:01 +03:00
Mikhail Glukhikh
5212b97047
Remove reformatting in intentions isApplicable via createByPattern
2018-04-18 16:15:57 +03:00
Alexey Sedunov
bf106d01b8
Find Usages: Restrict search scope of private top-level declarations
...
#KT-7622 Fixed
2018-04-13 20:23:04 +03:00
Nikolay Krasko
579b773388
172: Remove 172 specific from psiModificationUtils.kt and KtPsiFactory.kt
2018-04-12 19:29:01 +03:00
Mikhail Glukhikh
1477e67076
Optimize KtPropertyAccessor.hasBlockBody()
2018-04-12 11:03:41 +03:00
Alexey Tsvetkov
13ac64b84a
Move parseFileUtils to incremental-compilation-impl
2018-04-11 19:56:15 +03:00