Dmitry Petrov
4c2cfd3ea9
Synthesized 'copy' in data classes cannot override anything since 1.3
...
Synthesized 'copy' introduces default values for parameters, which is
prohibited for regular overrides.
Report warning in language version 1.2-, error in 1.3+.
2017-09-14 10:13:22 +03:00
Alexander Udalov
2bb437b219
Do not load JvmPackageName-annotated parts on Kotlin < 1.2
2017-09-13 22:59:03 +03:00
Alexander Udalov
c6263ac8e6
Support isInitialized intrinsic for lateinit properties
...
See https://github.com/Kotlin/KEEP/pull/73
#KT-9327 Fixed
2017-09-13 22:49:26 +03:00
Denis Zharkov
b905ddeac9
Memoize deprecations-related computations
...
It might be helpful for performance as these methods are called
for each resolution candidate and in the same time they scan
the whole overridden tree of a callable member
2017-09-13 15:34:14 +03:00
Mikhail Zarechenskiy
e16d16fdb7
Do not report diagnostic about annotation with receiver target twice
2017-09-12 17:39:24 +03:00
Mikhail Zarechenskiy
2048a74302
Introduce Language Feature for annotations with wrong targets
...
#KT-9580 Fixed
2017-09-12 17:39:23 +03:00
Mikhail Zarechenskiy
a4766cc293
Report errors on annotations with wrong use site targets
...
#KT-9580 In Progress
2017-09-12 17:39:22 +03:00
Mikhail Glukhikh
97233448d0
Enclosing element: do not handle parameters of for as function ones
...
So #KT-19626 Fixed
2017-09-12 16:13:56 +03:00
Mikhail Glukhikh
7ae722492f
Unused symbol: do not use body of function literal as scope for members
...
So #KT-10546 Fixed
2017-09-12 16:13:34 +03:00
Mikhail Glukhikh
4b25317ecb
Minor: KtPsiUtil: extract isNonLocalCallable
2017-09-12 16:13:15 +03:00
Alexander Udalov
ac1c7d9a6a
Drop Incompatible.NoImpl, fix no "missing impl" on nested class
...
Header/impl declarations are now considered fully compatible even in the
case when the impl declaration has no "impl" modifier. The error about
no "impl" is now reported separately and only on the impl declaration,
never on the header declaration
#KT-20087 Fixed
2017-09-12 14:41:11 +03:00
Dmitry Jemerov
1d05e83401
Recognize common tests marked with annotations typealiased to @Test
2017-09-11 15:07:51 +02:00
Dmitry Jemerov
aed01c8475
Consistent naming: common platform is common, not default
2017-09-11 15:07:51 +02:00
Mikhail Glukhikh
7e3d3bde74
Unused symbol: never use VALUE_ARGUMENT scope for members
...
So #KT-10546 Fixed
2017-09-11 12:12:17 +03:00
Dmitry Petrov
4428798c61
Change diagnostic message and rename to NESTED_CLASS_DEPRECATED
2017-09-11 09:42:18 +03:00
Dmitry Petrov
ba2c3136bb
Prohibit non-inner classes in enum entries since 1.3
2017-09-11 09:42:18 +03:00
Dmitry Petrov
ea91a0794d
Allow modifier 'inner' on a class nested in enum entry class
2017-09-11 09:42:18 +03:00
Dmitry Petrov
488a825349
Specialize diagnostic message for nested classes not allowed
2017-09-11 09:42:18 +03:00
Alexander Udalov
2877314313
Support "::foo" as a short-hand for "this::foo"
...
#KT-15667 Fixed
2017-09-08 10:59:44 +03:00
Toshiaki Kameyama
5a5a27b983
Intentions to generate accessors for a property #KT-17322 Fixed
2017-09-07 17:33:39 +03:00
Mikhail Zarechenskiy
088800d82f
Report error about val reassignment via backing field since Kotlin 1.3
...
Also improve message for current warning
#KT-16681 Fixed
2017-09-07 12:54:31 +03:00
Dmitry Petrov
2b27e64fc8
Improve diagnostics for "not yet supported in inline"
...
- Tell user what exactly is not supported (e.g., local inline function)
- Reduce diagnostics range to a keyword or an identifier
where appropriate
#KT-16223 Fixed Target versions 1.1.50
2017-09-06 09:46:33 +03:00
Nikolay Krasko
80ffc5cd41
Make local file indent feature work for Kotlin files
...
Revert "Add language to formatting blocks to fetch indent settings propertly"
This reverts commit d717da5
2017-09-05 19:49:01 +03:00
Mikhail Zarechenskiy
081b732070
Improve diagnostics for lateinit properties with generic type
...
#KT-11834 Fixed
2017-09-05 14:44:55 +03:00
Mikhail Zarechenskiy
0dc29d6d7e
Get rid of passing typeChecker from the call hierarchy
2017-09-05 14:41:46 +03:00
Mikhail Zarechenskiy
4a6f35b9c2
Fix exception on invalid code, don't resolve uninitialized type
...
#KT-11963 Fixed
2017-09-05 14:41:42 +03:00
Mikhail Zarechenskiy
6d4bb229ac
Fix compilation exception where overload ambiguity should be
...
#KT-16246 Fixed
2017-09-05 14:41:40 +03:00
Dmitry Jemerov
7ca1fe0f55
Fix compilation
2017-09-04 14:39:25 +02:00
Dmitry Jemerov
f74416a151
Cache the result of hasTopLevelCallables() for a KtFile
...
#KT-19885 Fixed
2017-09-04 13:21:03 +02:00
Dmitry Jemerov
839f197a1e
KtFile: J2K and cleanup
2017-09-04 13:21:03 +02:00
Dmitry Jemerov
ebef2dc0cf
KtFile: rename to .kt
2017-09-04 13:21:03 +02:00
Alexander Udalov
05290c3ed2
Fix AssertionError on incompatible scopes with impl typealias
...
This has been introduced in 9ecd04f628
2017-09-01 14:47:29 +03:00
Vyacheslav Gerasimov
5220dfc0ad
Android: Add inspection & quickfix to convert findViewById to api 26
...
#KT-19940 Fixed Target Version 1.1.5
2017-09-01 13:32:52 +03:00
Mikhail Zarechenskiy
dde0efd8ab
Refactoring: extract anonymous objects to classes, rename variable
2017-09-01 02:24:35 +03:00
Mikhail Zarechenskiy
f5222600d8
Improve diagnostics for fake calls when type inference failed
...
#KT-13665 Fixed
2017-09-01 02:05:58 +03:00
Mikhail Zarechenskiy
17b4874c37
Refactor FakeCallResolver, make error reporting simpler
2017-09-01 02:05:50 +03:00
Dmitry Petrov
638eb28692
Unify code for lateinit properties and local variables checking
2017-08-31 11:28:08 +03:00
Dmitry Petrov
bbf9bf91fc
Check language feature support for local and top-level lateinit vars
2017-08-31 11:28:08 +03:00
Dmitry Petrov
d951e957ea
Support lateinit modifier on top-level properties
...
Allow lateinit modifier on top-level properties.
Modifiers 'lateinit' and 'header' are incompatible.
2017-08-31 11:28:08 +03:00
Dmitry Petrov
53961e8df0
Check lateinit applicability for local variables
...
TODO probably should be refactored together with DeclarationsChecker
2017-08-31 11:28:08 +03:00
Dmitry Petrov
3bae430d49
Resolve lateinit variables
...
Do not report UNINITIALIZED_VARIABLE on lateinit variables
Provide delegating constructors for descriptors for compatibility.
2017-08-31 11:28:08 +03:00
Dmitry Petrov
f88cd5ed3d
Allow 'lateinit' modifier on local variables
2017-08-31 11:28:08 +03:00
Denis Zharkov
d6fbb084b1
Use the same temporary trace for analyzing all candidate calls
...
Otherwise, when completing all the unsuccessfull candiates,
resolution of each lambda-arguments starts repeatedly for each candidate
that leads to exponential time
NB: Changes in `completeArguments` are necessary because otherwise
nested lambdas will be analyzed twice:
once for the main resolved call, and then for all candidates
that again leads to exponential complexity
#KT-16672 Fixed
#KT-19457 Fixed
2017-08-30 12:51:29 +03:00
Alexander Udalov
c420e2bfa5
Refactor FunctionReferenceGenerationStrategy
...
Draw a clear distinction between the referenced function's parameters
and the anonymous synthetic function's parameters (see the comment).
This will be useful in supporting advanced callable reference features
like KT-8834
2017-08-28 10:22:52 +03:00
Alexander Udalov
b87abc9f0f
Relax rules related to noinline/crossinline/reified in header/impl functions
...
See the comments in KT-18752 for the current resolution
#KT-15377 Fixed
#KT-18752 Fixed
2017-08-25 15:40:38 +03:00
Alexander Udalov
d1cff41ce0
Treat nested class of header class as header
...
Note that the quick fix to implement header class works incorrectly when
that class has nested classes at the moment; this should be fixed
separately
#KT-15494 Fixed
#KT-18573 Fixed
2017-08-25 15:40:37 +03:00
Alexander Udalov
56b507d141
Remove obsolete code from ModifiersChecker
...
Simplify existing code and move closer to usages
2017-08-25 15:40:37 +03:00
Alexander Udalov
3a2d93f73e
Do not report "header with no impl" on incorrect header
...
Descriptor for a 'header' member in a non-'header' class now has
isHeader = false
#KT-18442 Fixed
2017-08-25 15:40:36 +03:00
Alexander Udalov
59c49675b0
Improve header-impl mismatch diagnostic rendering in IDE
...
Use HTML instead of text to render line breaks and lists correctly
2017-08-25 15:40:34 +03:00
Alexander Udalov
3bc8ca5913
Report "declaration should be marked with impl" when possible
...
Also support a quick fix to add 'impl' modifier (KT-18454), although it
doesn't work yet on classes because there's no error on them in the IDE
#KT-18087 Fixed
#KT-18452 Fixed
#KT-18454
2017-08-25 15:35:05 +03:00