Dmitry Jemerov
02a5856ffd
don't show function literals and selectors of qualified expressions in "show expression type"
2016-10-04 18:23:32 +02:00
Dmitry Jemerov
256fd04e95
show detailed smart cast info in "Show expression type" (KT-8803)
2016-10-04 18:23:32 +02:00
Dmitry Jemerov
2141cd268c
don't include properties with declared return type and property accessors in "show expression type" popup
2016-10-04 18:23:32 +02:00
Dmitry Jemerov
e8fcd194f9
add test for obsolete KT-11601
2016-10-04 18:23:32 +02:00
Dmitry Jemerov
4f1f313b36
don't show type of statements if they are not used as expressions
2016-10-04 18:23:32 +02:00
Dmitry Jemerov
6dccfd3b22
use short names in Show Expression Type
...
#KT-11310 Fixed
2016-10-04 18:23:32 +02:00
Dmitry Jemerov
4346afa19e
test for handling smart casts in "show expression type"
...
#KT-10588 Fixed
2016-10-04 18:23:32 +02:00
Dmitry Jemerov
032d50bbbf
handle multi-declarations in "show expression type"
2016-10-04 18:23:32 +02:00
Dmitry Jemerov
fbd2c48fbd
don't offer functions with block body and functions with declared return type as candidates for "show expression type"
2016-10-04 18:23:32 +02:00
Dmitry Jemerov
7b644e2c52
support "show expression type" in variable declaration position
...
#KT-10095 Fixed
2016-10-04 18:23:32 +02:00
Dmitry Jemerov
752a7451e5
get rid of Kotlin specific "Show expression type" action
...
#KT-13142 Fixed
2016-10-04 18:23:32 +02:00
Dmitry Jemerov
39ab1e985a
Java-compatible "Copy Reference" action for Kotlin
...
#KT-13140 Fixed
2016-10-04 18:23:32 +02:00
Dmitry Jemerov
cbb2e5c379
show context when invoking Show Implementations from Find Usages popup
...
#KT-13475 Fixed
2016-10-04 18:23:32 +02:00
Dmitry Jemerov
e462a97c64
show two levels of hierarchy when grouping find usages by file structure
...
#KT-9019 Fixed
#KT-10178 Fixed
2016-10-04 18:23:32 +02:00
Denis Zharkov
a4978c794f
Fix accidental overrides computation
...
Consider the whole overridden tree instead of only direct overridden
#KT-14146 Fixed
2016-10-04 16:47:10 +03:00
Denis Zharkov
aca05003a9
Set up tests for postfix templates properly
...
If there are some other completion-like tests before these ones
it may lead to the situation when some value is already written by
`previouslySuggestedExpressions`, so it should be cleared in setUp
2016-10-04 14:16:12 +03:00
Alexander Udalov
df680305ba
Improve diagnostic message for UNSUPPORTED_FEATURE
...
Render lowercase words separated by spaces instead of CamelCase in the
diagnostic message
2016-10-04 10:24:43 +03:00
Alexander Udalov
73652f309f
Do not create synthesized equals/hashCode/toString in data classes in compatibility mode
...
To simplify migration from 1.0 to 1.1, do not allow data classes to
automatically implement abstract equals/hashCode/toString declared in
super-interfaces (KT-11306) if "-language-version 1.0" is specified
2016-10-04 10:24:41 +03:00
Alexander Udalov
597912824b
Report error on declaring 'getClass' in class or package
...
#KT-14147 Fixed
2016-10-04 10:24:01 +03:00
Valentin Kipyatkov
dca094e971
Refactoring + preserving formatting in some more places where it was missing
2016-10-03 23:23:14 +03:00
Valentin Kipyatkov
5a6f068130
Some formatting preserving for special methods too
2016-10-03 23:23:14 +03:00
Valentin Kipyatkov
f4d9909f6f
Code refactoring
2016-10-03 23:23:13 +03:00
Valentin Kipyatkov
badbcd4989
KT-13628 New line is not preserved when converting java to Kotlin
...
#KT-13628 Fixed
2016-10-03 23:23:13 +03:00
Alexander Udalov
8fe57c8e84
Minor, fix apostrophes in diagnostic message
2016-10-03 21:52:18 +03:00
Alexander Udalov
c1f55e8018
Make scope of incremental package fragment empty
...
It's only needed to create IncrementalMultifileClassPackageFragment instances
now
2016-10-03 21:52:10 +03:00
Ilya Gorbunov
adf2c5a5ac
Classify explicitly imported names higher than default imported in completion. Related to #KT-13447
2016-10-03 20:46:46 +03:00
Ilya Gorbunov
1af3b50e3d
Remove obsolete testData (Filter.kt — didn't run even once).
2016-10-03 17:25:26 +03:00
Ilya Gorbunov
2aa60adbca
Remove 'import java.util' from js tests.
2016-10-03 17:25:26 +03:00
Michael Bogdanov
1eac6d47ed
GenerationState in TypeMapper replaced with boolean flag
2016-10-03 14:13:17 +03:00
Michael Bogdanov
95a1c254e1
Added error diagnostic on inheriting target 6 interface
2016-10-03 14:13:17 +03:00
Michael Bogdanov
7a5c211e8b
Throw jvm-specific error on file compilation
2016-10-03 14:06:02 +03:00
Michael Bogdanov
d9bb519b76
Don't generate delegation to jvm8 default methods
2016-10-03 14:06:01 +03:00
Michael Bogdanov
c19e035f91
Properly map super calls in typeMapper
2016-10-03 14:06:00 +03:00
Michael Bogdanov
5f1f4a067d
Map proper owner for method with default args
2016-10-03 14:06:00 +03:00
Michael Bogdanov
0390cd6ee1
Added GenerationState to KotlinTypeMapper
2016-10-03 14:05:59 +03:00
Michael Bogdanov
dd4d5e3aa1
Generate 'DefaultImpls' for jvm 8 target only within compiler option
2016-10-03 14:05:59 +03:00
Michael Bogdanov
ca41f01468
Generate interface property annotations in interface class (not in DefaultImpls)
2016-10-03 13:50:12 +03:00
Michael Bogdanov
dfd5be1a33
Generate all bodies in interfaces as default methods
2016-10-03 13:50:11 +03:00
Michael Bogdanov
fb48f70273
Move 'generateMethod' to 'codegenUtil.kt' file
2016-10-03 13:47:09 +03:00
Dmitry Petrov
06101dba52
KT-13961 REDECLARATION not reported on private-in-file 'foo' vs public 'foo' in different file
...
Private-in-file declarations conflict with public overload-equivalent declarations
in other files in the same package.
Move functions for grouping possible redeclarations to OverloadResolver
(since they are used only there).
Refactor redeclarations / conflicting overloads reporting.
2016-10-03 11:50:29 +03:00
Denis Zharkov
0120085443
Refine expression kind definition in postfix templates
...
- Do not treat if without else as values
- Some statements aren't contained in block (see tests)
#KT-14107 Fixed
#KT-14110 Fixed
2016-10-03 10:36:48 +03:00
Denis Zharkov
3c24996073
Refine default postfix templates selector
...
There is new settings checkCanBeUsedAsValue
Also expression filtering are split into to parts:
- getNonFilteredExpressions is trivially goes until it reaches
first block body of some declarations
- all additional filtering is merged into Condition that is passed into
PostfixTemplateExpressionSelectorBase super-call
Notable changes for users:
- do not suggest try for non-top-level expressions
- do not suggest var/par/etc for loops
2016-10-03 10:36:48 +03:00
Denis Zharkov
ba2d2a036e
Suggest postfix templates on lambda expressions
2016-10-03 10:36:48 +03:00
Denis Zharkov
54d9b4bee6
Do not suggest assignment as a subject in postfix templates
...
#KT-14077 Fixed
2016-10-03 10:36:48 +03:00
Denis Zharkov
18146fafdf
Allow if/when/try postfix templates in expression position
...
#KT-14078 Fixed
2016-10-03 10:36:48 +03:00
Denis Zharkov
bff9dd4ef5
Suggest assert/return postfix templates only for statements
...
#KT-14079 Fixed
#KT-14090 Fixed
2016-10-03 10:36:48 +03:00
Denis Zharkov
ce128c5d6e
Do not suggest operation references in postfix templates
...
#KT-14087 Fixed
2016-10-03 10:36:48 +03:00
Denis Zharkov
d5d18b2ad6
Enhance tests for postfix templates
...
Prohibit multiple suggested expressions in test mode
2016-10-03 10:36:48 +03:00
Alexander Udalov
4025bcb6e3
Use separate module mode for single-module diagnostic tests
...
More than 95% of diagnostic tests are single-module, and they'll use the same
two-module scheme that the normal compilation uses
2016-10-02 21:16:11 +03:00
Alexander Udalov
45190d9453
Support separate modules in compiler
...
Unless the compatibility option "-Xsingle-module" is passed, the compiler will
create two modules instead of one now (see TopDownAnalyzerFacadeForJVM): the
main module contains Kotlin and Java sources and binaries from the previous
compilation of the given module chunk, the dependency module contains all other
Kotlin and Java binaries. This fixes some issues where the compiler couldn't
detect that the used symbol was from another module, and did not forbid some
usages which are only possible inside the module (see KT-10001).
The ideal way to deal with modules here would be to exactly recreate the
project structure, for example as it's done in JvmAnalyzerFacade and usages.
This is postponed until later
#KT-10001 Fixed
#KT-11840 In Progress
2016-10-02 21:15:47 +03:00