Mikhail Glukhikh
f96b9ddbf5
Minor: unused imports in IdentifierInfo
2016-07-27 16:24:41 +03:00
Mikhail Glukhikh
e515d7f773
Data flow analysis: unnecessary assignment removed (related to complex expressions)
2016-07-27 16:24:36 +03:00
Mikhail Glukhikh
1c9f08e986
Data flow values: STABLE_COMPLEX_EXPRESSION kind is removed, no use cases exist for them
2016-07-27 16:24:32 +03:00
Mikhail Glukhikh
c7af3f7865
Data flow values: more accurate handling of postfix ++ and --
2016-07-27 16:24:27 +03:00
Mikhail Glukhikh
7c66f632ca
Receiver smart casts: additional test for a?.b() when b is invokable property
2016-07-27 16:24:23 +03:00
Mikhail Glukhikh
692623cb55
Cleanup: smart casts of safe call receiver applied (do NOT cherry-pick to 1.0.X)
2016-07-27 16:24:18 +03:00
Dmitry Petrov
26c8bc87fd
KT-13241 Indices optimization leads to VerifyError with smart cast receiver
...
Use expected receiver type from the corresponding extension function.
2016-07-27 13:21:22 +03:00
Stanislav Erokhin
f3be1b8f1f
Add assertion for variable as function call with explicit type parameters.
2016-07-27 13:17:15 +03:00
Mikhail Glukhikh
b56e84d47f
Cast never succeeds: special 'Nothing' / 'Nothing?' case
...
(cherry picked from commit 63435b4)
2016-07-27 10:52:13 +03:00
Mikhail Glukhikh
bf4231d65a
Standard library regenerated
...
(cherry picked from commit 68af26c)
2016-07-27 10:52:01 +03:00
Mikhail Glukhikh
94029393cb
kotlin-stdlib-gen: UNCHECKED_CAST instead of CAST_NEVER_SUCCEEDS
...
(cherry picked from commit feab6f3)
2016-07-27 10:51:51 +03:00
Mikhail Glukhikh
a2b68f65be
Suppress CAST_NEVER_SUCCEEDS removed from standard library code
...
(cherry picked from commit 7d9aa04)
2016-07-27 10:51:41 +03:00
Mikhail Glukhikh
b88282c0fc
Suppress CAST_NEVER_SUCCEEDS removed from source code
...
(cherry picked from commit d448a92)
2016-07-27 10:51:30 +03:00
Mikhail Glukhikh
a902c4901a
CAST_NEVER_SUCCEED: replace subtyping check with subclassing check #KT-13206 Fixed
...
(cherry picked from commit 5fc797a)
2016-07-27 10:51:13 +03:00
Mikhail Glukhikh
17c824f7f2
KT-13170 related: correct handling of inspection parameters in additional checker
...
(cherry picked from commit 47fd990)
2016-07-27 10:50:58 +03:00
Mikhail Glukhikh
ff2f49fa8f
Has platform type inspection: do not report by default on Kotlin types with platform arguments #KT-13170 Fixed
...
Also #KT-12820 Obsolete
(cherry picked from commit 0589b48)
2016-07-27 10:50:45 +03:00
Mikhail Glukhikh
8600e7348c
Can be val inspection: local functions are taken into account #KT-13151 Fixed
...
(cherry picked from commit 57eb4c1)
2016-07-27 10:50:31 +03:00
Alexander Udalov
0380b6cd88
Never resolve modality of members to SEALED
2016-07-26 21:16:15 +03:00
Alexander Udalov
b72293883d
Fix algorithm of determining modality for fake overrides
...
Previously we inferred "open" if there was at least one open member in the
hierarchy. However, that's not correct when that member is overridden by
another member in the hierarchy which is abstract. This led to incorrect code
being accepted by the front-end, and an exception during the bridge generation
#KT-12467 Fixed
2016-07-26 21:16:15 +03:00
Nikolay Krasko
84a83e5dc2
Minor: remove !!
2016-07-26 17:17:06 +03:00
Nikolay Krasko
bdc3192acb
Don't store analyze result longer than ModuleResolverProvider valid time
...
For synthetic files there might be file modifications without PsiModificationTracker.MODIFICATION_COUNT increment.
2016-07-26 17:17:06 +03:00
Nikolay Krasko
db89c3fc3f
Refactoring: extract ResolutionFacadeImpl to separate file
2016-07-26 17:17:06 +03:00
Nikolay Krasko
57f3a86686
Debug string for project resolution facade
2016-07-26 17:17:06 +03:00
Nikolay Krasko
3c8e35fa3a
Remove psi modification tracker from pooled threads (EA-86038, KT-13163)
...
IDEA 163 explicitly forbids such tricks with exceptions.
#KT-13163 Fixed
2016-07-26 17:17:06 +03:00
Michael Bogdanov
9b9abb2e10
Fix for KT-13182: Regression: compiler internal error at inline
...
#KT-13182 Fixed
2016-07-26 16:16:37 +03:00
Michael Bogdanov
99cdc41ab6
Fix for KT-13133: Incorrect InnerClasses attribute value for anonymous object copied from an inline function
...
#KT-13133 Fixed
2016-07-26 16:16:36 +03:00
Alexander Udalov
91e486d020
Fix KCallable#name intrinsic for bound references
...
Do not skip generation of the left-hand side because it may produce side
effects
#KT-12995 Fixed
2016-07-26 13:48:20 +03:00
Alexander Udalov
0ea885ce58
Move tests on KClass.java* to box/classLiteral/java
...
Also replace WITH_REFLECT to WITH_RUNTIME to test that these cases correctly
work without reflection in the classpath
2016-07-26 13:48:19 +03:00
Alexander Udalov
70e01fac18
Fix class literals of objects in super constructor calls
...
In an expression such as "Obj::class" where Obj is an object, it's fine to
consider Obj either an expression or a type and generate either
Obj.INSTANCE.getClass() or Obj.class correspondingly. However,
the former fails in the object's super constructor call because the INSTANCE
field is not yet initialized. Thus, we force generation of Obj.class in case
when Obj is an object.
Note that this has been reproduced in our project, see
KotlinMetadataVersionIndex
2016-07-26 13:47:34 +03:00
Alexander Udalov
495ed13fce
Implement codegen for bound class reference expressions
...
- Inline the usage of ExpressionCodegen#generateClassLiteralReference into
ClosureCodegen, simplify
- Support DoubleColonLHS.Expression in generateClassLiteralReference
- Substantially simplify KClass.java intrinsic by reusing
generateClassLiteralReference
#KT-13075 Fixed
#KT-12995 In Progress
2016-07-26 13:47:33 +03:00
Alexander Udalov
28dc5d788c
Minor, make JavaClassProperty intrinsic a singleton
2016-07-26 13:47:32 +03:00
Nikolay Krasko
a0226f3fd8
Run SafeDeleteFix without run action to avoid "Refactorings should not be started inside write action" (KT-13207)
...
#KT-13207 Fixed
2016-07-26 13:38:24 +03:00
Nikolay Krasko
6ea5171f60
Add "Studio" as version separator (KT-13184)
...
#KT-13184 Fixed
2016-07-26 13:38:24 +03:00
Pavel V. Talanov
8a9de2a00f
Show all Kotlin annotations when browsing hierarchy of "java.lang.Annotation"
2016-07-26 11:42:09 +03:00
Pavel V. Talanov
84dae76bd9
Index enum classes as if they have "Enum" in supertypes
...
#KT-13057 Fixed
2016-07-26 11:42:08 +03:00
Pavel V. Talanov
8f006bd4aa
Add test for KT-13057 with infrastructure
2016-07-26 11:42:08 +03:00
Alexey Andreev
05dd039151
KT-12275 Add JS optimization that transforms the following code
...
```
do {
X
if (B) break;
} while (A)
```
to
```
do {
X
} while (!B && A)
```
Add inversion that takes boolean expression and applies negation to it, simplifying if possible (like !!a => a).
2016-07-25 18:46:46 +03:00
Alexey Andreev
b3d29adad9
KT-12275 Add JS optimization that transforms the following code
...
```
do {
guard: {
// do something
break guard;
// do something
}
} while (condition)
```
to
```
do {
// do something
continue;
// do something
} while (condition)
```
2016-07-25 18:32:10 +03:00
Alexey Andreev
1a61115148
KT-12275 Preserve evaluation order when do..while loop with extractable condition contains continue statement
2016-07-25 18:32:08 +03:00
Alexander Udalov
3ef3bb8251
Minor, add comment, remove warning suppression
2016-07-25 15:55:31 +03:00
Alexander Udalov
d945c33d5e
Move some members from OverrideResolver to OverridingUtil
2016-07-25 15:55:31 +03:00
Alexander Udalov
aaf618e035
Minor, inline HashSetUtil#symmetricDifference
2016-07-25 15:55:31 +03:00
Alexander Udalov
475fb6e8a7
Simplify OverrideResolver#filterOverrides
...
- move source vs binary equivalent call filtering hack to
ResolutionResultsHandler (see c4778bfe5a for
the original commit introducing this behavior)
- rewrite the algorithm so that it doesn't need noDuplicates in the beginning:
modulo the hack above whish is only needed in ResolutionResultsHandler,
descriptor equivalence is checked anyway in OverrideResolver#overrides
2016-07-25 15:55:31 +03:00
Alexander Udalov
a6faab834d
Move OverrideResolver#generateOverridesInAClass to CollectionStubMethodGenerator
...
Also simplify substantially
2016-07-25 15:55:31 +03:00
Alexander Udalov
bbd1e889a6
Use kotlin.Function1 instead of intellij Function in OverrideResolver
2016-07-25 15:55:31 +03:00
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
Alexey Tsvetkov
517e457f06
Update changelog
2016-07-25 15:54:39 +03:00