Alexander Udalov
191f532675
Remove OverrideResolver#filterOutOverriding, simplify the only usage
2016-07-25 15:55:31 +03:00
Alexander Udalov
5d04fa3c2f
Remove unreachable code in ResolutionResultsHandler
2016-07-25 15:55:31 +03:00
Alexander Udalov
89c5799155
Move utilities used in IDE from OverrideResolver to descriptorUtils.kt
2016-07-25 15:55:31 +03:00
Alexander Udalov
24c383a009
Remove unnecessary loop from OverrideResolver#filterOverrides
...
It was not needed because overridability in both ways is already checked in
DescriptorEquivalenceForOverrides, which is called in
OverrideResolver#overrides
2016-07-25 15:55:31 +03:00
Denis Zharkov
becb1f1f95
Make stack values for assignment-like operations lazy
...
As well as for other kinds of expressions
Within attached test they were generated twice in case of last expression of coroutine block,
because coroutine related codegen part is built upon assumption that all expressions should be generated lazily
Also add a test about unary postfix increment/decrement
#KT-13156 Fixed
2016-07-25 13:56:43 +03:00
Alexey Sedunov
0769d47f4b
Introduce Type Alias: Support type constructor extraction
2016-07-25 12:44:28 +03:00
Alexander Udalov
83000c50ff
Remove quotes around visibility in invisible member diagnostic
2016-07-22 18:13:41 +03:00
Alexander Udalov
b6b2303aa7
Improve error message for inaccessible invisible_fake members
...
#KT-8989 Fixed
2016-07-22 18:13:40 +03:00
Alexander Udalov
a92f0a0446
Do not report "reflection is not available" on built-in sources
2016-07-22 18:13:39 +03:00
Alexander Udalov
9be219b69c
Check presence of dispatch receiver parameter in modifier checks
...
Also fix typo in "inapplicable infix" diagnostic message
2016-07-22 18:13:39 +03:00
Alexander Udalov
2a390155a9
Fix quotes in diagnostic messages
...
See 8316953259
2016-07-22 18:13:38 +03:00
Alexander Udalov
0dd71cc0c0
Minor, add test on bound reference to enum entry member
2016-07-22 11:05:19 +03:00
Alexander Udalov
9ab8da2ef9
Fix type of reference to protected var
...
#KT-12982 Fixed
2016-07-22 11:05:19 +03:00
Alexander Udalov
6baf3ae737
Minor, inline LexicalScope.Companion.empty
2016-07-22 11:05:19 +03:00
Alexander Udalov
969ff43152
Merge CallableReferencesResolutionUtils.kt into DoubleColonExpressionResolver
2016-07-22 11:05:19 +03:00
Alexander Udalov
2fcd4e955a
Simplify code in callable reference resolution
2016-07-22 11:05:19 +03:00
Alexander Udalov
00f1415ed7
Fix "rewrite at slice LEXICAL_SCOPE" during callable reference resolution
...
Following the TODO in CallableReferencesResolutionUtils.kt, delete the
suspicious scope and use the new resolution process with the qualifier which
was obtained after the resolution of LHS. However, by default the tower
resolution algorithm also considers each qualifier as a class value as well,
which would be wrong here because resolution of LHS as a "value" happens
earlier in DoubleColonExpressionResolver and with slightly different rules. To
avoid that, do not mix in the "explicit receiver" scope tower processor when
creating processors for callable reference resolution.
Also delete unused functions and classes related to deleted scope, refactor
Scopes.kt
#KT-8596 Fixed
2016-07-22 11:05:19 +03:00
Alexander Udalov
7b59864ed9
Refine double colon LHS resolution if expression is an object
2016-07-22 11:05:19 +03:00
Alexander Udalov
5a6237b357
Refactor resolution of double colon expression LHS
...
Try resolving the LHS only when it looks (PSI-wise) like it could represent a
type element. This, for example, allows "illegal selector" error to be reported
on weird expressions like '""?.""::class'.
Also remove expression text from the "illegal selector" diagnostic, it's not
needed and can screw up the error message if the text is too big
2016-07-22 11:05:19 +03:00
Mikhail Glukhikh
5a2f34b351
Deduct x != null from x?.y is NotNullType
2016-07-21 21:15:34 +03:00
Mikhail Glukhikh
edeef90c4b
Minor improvements in DataFlowValue / IdentifierInfo
2016-07-21 21:15:27 +03:00
Mikhail Glukhikh
11f50186fa
x?.y != null and x?.call() != null provoke now x != null, a set of tests #KT-2127 Fixed
2016-07-21 21:15:19 +03:00
Mikhail Glukhikh
9001b9bcc0
DataFlowValue & DataFlowValueFactory major refactoring, get rid of DataFlowValue.id : Any?
...
Instead, DataFlowValue now requires IdentifierInfo implementation to be created
DataFlowValue is compared using IdentifierInfo
2016-07-21 21:15:05 +03:00
Mikhail Glukhikh
7f9b9ddb45
DataFlowValueFactory: converted to Kotlin
2016-07-21 20:19:44 +03:00
Mikhail Glukhikh
b1a2a0723c
DataFlowValueFactory.java --> DataFlowValueFactory.kt
2016-07-21 20:19:41 +03:00
Mikhail Glukhikh
dbbc4ec281
Array<Subtype> can be now cast to Array<Supertype(?)> without CAST_NEVER_SUCCEEDS #KT-6391 Fixed
...
(cherry picked from commit 2629d55)
2016-07-21 20:16:06 +03:00
Mikhail Glukhikh
90e5e561e3
KT-6391: Arrays with same erased types counted as cast-compatible now
...
(cherry picked from commit 9e6f4bf)
2016-07-21 20:15:55 +03:00
Michael Bogdanov
1d5924d236
'superConstructorCall' test folder moved under 'innerNested'
2016-07-21 19:10:42 +03:00
Michael Bogdanov
55382ba848
Removed obsolete code in 'lookupConstructorExpressionsInClosureIfPresent' method
2016-07-21 19:10:42 +03:00
Michael Bogdanov
5dca4dbc67
Fix for KT-11833: Error generating constructors of class null with kind IMPLEMENTATION on anonymous object inheriting from nested class of super class
...
#KT-11833 Fixed
2016-07-21 19:10:42 +03:00
Stanislav Erokhin
6556cde329
Introduce new type checker.
2016-07-21 16:07:16 +03:00
Stanislav Erokhin
8193032ffb
Refactoring. Separate KotlinTypeChecker to interface & Impl class.
2016-07-21 16:07:14 +03:00
Alexander Udalov
2c08796c45
Report ABI version incompatibility error always, not only if there are other errors
...
This is a radical but likely temporary measure to forbid the current compiler
from compiling code against binaries compiled by newer compilers
Cherry picked from commit 149a4eddff0106bbe91c9a6b51a26c12c242d14f and commit
285b20e3ff387eb3d2ee33ceaa376ed8eba90857
2016-07-21 15:03:52 +03:00
Michael Bogdanov
6da97027cc
'getSuperCallLabelTarget' refactoring
2016-07-20 16:50:50 +03:00
Michael Bogdanov
6f41e3b462
Fix for KT-11634: UOE in ConstructorContext.getOuterExpression for super call in delegation
...
#KT-11634 Fixed
2016-07-20 16:50:49 +03:00
Alexey Sedunov
2abcd17713
Create from Usage: Support "Create member/extension" corresponding to the extension receiver of enclosing function
...
#KT-10668 Fixed
(cherry picked from commit bc4c013)
2016-07-20 15:39:09 +03:00
Alexey Sedunov
a33f946c14
Override/Implement Members: Implement Members: Fix base member detection when abstract and non-abstract members with matching signatures are inherited from an interface
...
#KT-11115 Fixed
(cherry picked from commit a3a2e57)
2016-07-20 15:39:01 +03:00
Alexey Sedunov
130e4fb745
Introduce Type Alias
...
#KT-12902 Fixed
2016-07-20 11:46:59 +03:00
Dmitry Jemerov
3ad6daea6c
fix muted test KotlinFindUsagesWithLibraryTestGenerated$KotlinLibrary.testLibraryCompanionObjectUsages
2016-07-19 13:25:58 +02:00
Dmitry Jemerov
82babaff7e
to reduce VM contention between JVM with tests and JVM with Ant, run Ant with -Xmx128m
2016-07-18 16:56:46 +02:00
Mikhail Glukhikh
220141ab2b
Convert lambda to callable reference intention / inspection #KT-10903 Fixed
...
(cherry picked from commit b620099)
2016-07-18 17:10:15 +03:00
Denis Zharkov
2f2b1a7f80
Minor. Drop unused method
2016-07-15 18:59:33 +03:00
Denis Zharkov
4725dd3028
Implement recovery for incomplete expression before declaration
...
It's needed when declarations are parsed as a part of previous expression
(see tests)
Currently we apply this kind of recovery in a conservative way,
only when declaration starts at the next line, and while
the condition could be relaxed, there's no need to do this
#KT-4948 Fixed
#KT-7118 Fixed
2016-07-15 18:59:31 +03:00
Denis Zharkov
06a659e6e7
Minor. Invert boolean parameter meaning
...
It looks much more sensible to me
2016-07-15 18:27:01 +03:00
Denis Zharkov
fcb870a303
Add EOL to EXPRESSION_FOLLOW recovery set
...
This change is used in further commits, but it's extracted
to emphasize that testData modifications are caused by this.
2016-07-15 18:27:00 +03:00
Dmitry Jemerov
e224041760
show line markers for properties defined in the primary constructor (KT-12626)
2016-07-14 23:32:07 +02:00
Dmitry Jemerov
5201fc171b
ClsWrapperStubPsiFactory can be a singleton
2016-07-13 13:16:15 +02:00
Alexander Udalov
87387d030f
Minor, fix yellow code in OverrideResolver and OverridingUtil
2016-07-13 13:42:46 +03:00
Alexander Udalov
8f33830f29
Suppress UNCHECKED_CAST instead of CAST_NEVER_SUCCEEDS in several places
...
This is related to KT-6611 being fixed recently. Note that not all cases of
incorrect "cast never succeeds" were fixed
2016-07-13 13:42:42 +03:00
Alexander Udalov
13b0fda3c2
Fix AssertionError in DescriptorResolver#checkBounds
...
#KT-9620 Fixed
2016-07-13 13:42:39 +03:00