Alexander Udalov
0d4bd2a673
Use OperatorNameConventions constants instead of hardcoded literals
2016-11-11 19:00:09 +03:00
Alexander Udalov
65882579bc
Minor, add toString() for debug
2016-11-11 19:00:08 +03:00
Dmitry Petrov
6876f0e4d2
Support type aliases as bare types after 'is/as'.
2016-11-10 18:33:50 +03:00
Dmitry Petrov
37eedc3703
Hack: do not add trivial constraints (t <: Any?) for constituent types,
...
otherwise nested calls handling logic in old inference wouldn't work for type alias constructors.
2016-11-10 14:54:11 +03:00
Dmitry Petrov
549ae59562
Inference for type alias constructor type arguments: better error reporting.
2016-11-10 14:54:11 +03:00
Dmitry Petrov
94d7bd7a6b
KT-14641: Nested type alias reference via an instance is an error.
2016-11-10 14:54:11 +03:00
shiraji
a662d777e8
Implement "Remove redundant '.let' call" binary operator support #KT-14396 Fixed
2016-11-10 14:26:14 +03:00
Denis Zharkov
24819a079b
Change resolution scope for componentX in lambda parameters
...
Component-functions are resolved in the same scope as the first statement of the lambda, but lambda receiver was not available
#KT-14692 Fixed
2016-11-10 10:33:42 +03:00
Mikhail Zarechenskiy
6656bf835f
Perform resolve of constructor parameters during partial constructor resove
...
#KT-13354 Fixed
2016-11-09 23:00:25 +03:00
Denis Zharkov
50a5c08603
Optimize visibility for controller field in CoroutineImpl
...
While it's impossible to declare a property with protected field and public
getter we split these entities
- `_controller` field is used inside coroutines
- `controller` getter is used for accesing controller from noinline lambdas
(also it can be used to obtain controller from continuation by explicit cast)
2016-11-09 12:25:31 +03:00
Dmitry Petrov
03d8aa272b
Infer type arguments of type alias constructors.
2016-11-09 10:48:07 +03:00
Valentin Kipyatkov
e850446f17
Introduced BindingContext.DATA_FLOW_INFO_BEFORE
2016-11-08 19:14:40 +03:00
Mikhail Zarechenskiy
3df5efb236
Introduce language feature: underscores in numeric literals
...
#KT-2964 Fixed
2016-11-08 19:04:53 +03:00
Mikhail Zarechenskiy
a77290e572
Lexer: support underscores in numeric literals
2016-11-08 18:46:51 +03:00
Mikhail Zarechenskiy
c956428d96
Update JFlex to 1.7.0
...
Previous patched version (1.4.3) from Itellij was dropped. As we are using skeleton from Intellij, we should update our jflex version accordingly
2016-11-08 18:46:51 +03:00
Valentin Kipyatkov
8f9f2027f2
Adding block to control structure when needed
2016-11-08 12:46:42 +03:00
Alexander Udalov
8c65379711
Support injecting custom module into KotlinBuiltIns
...
Provide a command-line option to load built-ins from the module and its
dependencies instead of looking for them in kotlin-compiler.jar; built-ins must
be found this way, or an error will be reported (or, most likely at this
moment, an exception will be thrown).
Note that this does not affect whether built-ins (loaded from one place or the
other) are added to the _dependencies_ of the module, this is controlled by
another option. The option added in this commit only makes the KotlinBuiltIns
instance which is used via ModuleDescriptor throughout the compiler front-end
(and also injected in a bunch of places) a sort of "helper" which always goes
to that same module to find descriptors for built-in classes
2016-11-08 12:14:24 +03:00
Alexey Sedunov
a414843f54
Control-Flow Analysis: Use PSI to generate pseudocode if nested resolved call is confused with outer one (e.g. a {} when invoke() is missing)
...
#KT-14500 Fixed
2016-11-07 20:03:36 +03:00
Alexey Sedunov
0159ddbc49
Control-Flow Analysis: Do not skip pseudocode for value arguments if they are matched with errors
2016-11-07 20:03:34 +03:00
Alexey Sedunov
30d08c989d
Kotlin Facet: Use facet configuration to provide language version for IDE analyzer
2016-11-07 20:03:30 +03:00
Valentin Kipyatkov
c0d89e67a9
Do not resolve all bodies of anonymous objects and local classes in partial body resolve
2016-11-02 19:25:25 +03:00
Valentin Kipyatkov
9f1cdde20b
Better modifier order
2016-11-02 19:25:22 +03:00
Denis Zharkov
6491d3fbac
Do not report DSL scope violation error when language-version is 1.0
...
#KT-11551 Fixed
2016-11-01 15:58:14 +03:00
Denis Zharkov
7553d3f72b
Intoduce and support DslMarker annotation
...
#KT-11551 In Progress
2016-11-01 15:58:14 +03:00
Denis Zharkov
b8e8206c4f
Minor. Remove redundant parameter
...
LexicalWritableScope.implicitReceiver is always null for all constructor's usages
2016-11-01 15:58:14 +03:00
Kirill Rakhman
ba7f60040a
clean up psi package
2016-11-01 14:11:07 +03:00
Ilya Gorbunov
ed2a218ec2
Add new bitwise operations to constant evaluator map. #KT-13554
2016-10-28 20:50:13 +03:00
Dmitry Petrov
ed60674d13
KT-14498: Properly check variance in expanded types.
2016-10-28 18:02:15 +03:00
Dmitry Jemerov
237504c3c7
Classes with no parent are top-level (EA-90570 - assert: KtPsiUtil.getOutermostClassOrObject)
2016-10-28 16:47:33 +02:00
Mikhail Glukhikh
8edd33ee92
If then to elvis: applied in IDEA, front-end & J2K modules
2016-10-28 15:00:21 +03:00
Ilya Chernikov
2e03a6f1fd
Add script dependencies modification tracker, some optimizations
2016-10-27 23:36:54 +02:00
Nikolay Krasko
08d628537c
Assign trailing and preceding whitespaces to lambda block until the last comment in parser
2016-10-27 14:26:10 +03:00
Nikolay Krasko
22999fe67d
Set hasValueArguments in KotlinAnnotationEntryStub to 'true' only if some arguments exist
...
Currently '()' is used for resolving ambiguity in parsing when annotating function types. This way a decompiled code
will need brackets, but compile code will have annotation without parameters. This commit will allow to make both stub-trees consistent.
Tested in ClsStubBuilderTestGenerated.testAnnotationsOnNullableTypes()
2016-10-25 13:30:37 +03:00
Nikolay Krasko
d1dfcfaca1
Fix stub-psi mismatch exception on restoring annotation for nullable types
...
(cherry picked from commit 1aa37f11258dde289a9f7cb700294a038168fbdc)
Conflicts:
compiler/frontend/src/org/jetbrains/kotlin/psi/stubs/KotlinStubVersions.kt
idea/idea-analysis/src/org/jetbrains/kotlin/idea/decompiler/stubBuilder/TypeClsStubBuilder.kt
2016-10-25 13:22:53 +03:00
Denis Zharkov
10861e57ff
Fix NDFDE for single underscore named property in primary constructor
...
NDFDE = NoDescriptorForDeclarationException
See the comment in change
2016-10-24 18:00:02 +03:00
Denis Zharkov
09dc207052
Add SingleUnderscoreForParameterName language feature
2016-10-24 18:00:02 +03:00
Denis Zharkov
1f0293eb42
Check modifiers applicability on destructured lambda parameters
...
#KT-14502 Fixed
2016-10-24 18:00:02 +03:00
Alexander Udalov
cdf6567375
Drop TypeConstructor.getAnnotations(), uninherit TypeConstructor from Annotated
...
The method was unused on TypeConstructor instances, and almost all
implementations returned EMPTY anyway
2016-10-24 15:30:38 +03:00
Alexander Udalov
6b6ddf5f75
Import classes from kotlin.coroutines by default, add to default imports in JS
2016-10-24 15:30:38 +03:00
Denis Zharkov
51f4244980
Report UNUSED_DESTRUCTURED_PARAMETER_ENTRY
...
on destructured lambda parameters
#KT-14347 Fixed
2016-10-24 10:19:25 +03:00
Denis Zharkov
9716d2ad54
Minor. Extract method in ControlFlowProcessor
2016-10-24 10:19:25 +03:00
Denis Zharkov
8a2c9ec7fe
Minor. Extract method from the huge when entry
2016-10-24 10:19:25 +03:00
Denis Zharkov
4c69416f2b
Report warning on unused entities that can be renamed to _
...
Currently it's all about lambda parameters/destructuring entries
#KT-14347 In Progress
2016-10-24 10:19:25 +03:00
Denis Zharkov
dbca310d8c
Support single-underscore variable names partially
...
Currently only parameters of lambdas/function expressions
and destructuring entries are allowed
#KT-3824 In Progress
#KT-2783 In Progress
2016-10-24 10:19:25 +03:00
Ilya Gorbunov
82364ad3e5
Filter out typealiases invisible due to API_VERSION < their SinceKotlin version, when determining excluded imports.
2016-10-21 18:19:03 +03:00
Alexander Udalov
47498ef835
Move ImportPath from 'descriptors' to 'frontend'
2016-10-21 17:10:41 +03:00
Alexander Udalov
4c52ce37d2
Drop TargetPlatform in utilities for module creation
2016-10-21 17:10:40 +03:00
Alexander Udalov
56e2173b3c
Extract platform-independent default imports to TargetPlatform.Default.defaultImports
...
This is needed because SourceNavigationHelper uses default platform and it
needs default imports to be able to resolve references (otherwise
NavigateToLibrarySourceTestGenerated breaks)
2016-10-21 17:10:39 +03:00
Alexander Udalov
9ec781e859
Get rid of ModuleDescriptor#defaultImports, use DefaultImportProvider
2016-10-21 17:04:59 +03:00
Alexander Udalov
43c2b21987
Move import exclusion logic from ModuleDescriptorImpl to frontend
2016-10-21 17:04:58 +03:00