Mikhail Zarechenskiy
bc2a8555a3
[NI] Resolve collection literals arguments as postponed ones
2017-08-07 18:00:24 +03:00
Dmitry Petrov
26cc08be65
Fix anonymous function literals handling in type checker
...
- [NI] Create type info directly if the expected type is functional.
- Properly handle suspended function expected type.
2017-08-07 18:00:21 +03:00
Mikhail Zarechenskiy
badbf777df
[NI] Use data flow info from arguments in parenthesis to resolve lambda
...
Fixes 'javaObjectType' and 'javaPrimitiveType'
2017-08-07 18:00:19 +03:00
Mikhail Zarechenskiy
cf55674109
[NI] Support fallback resolve to operator mod if needed
...
Fixes:
- assignmentOperations
- percentAsModOnBigIntegerWithoutRem
2017-08-07 18:00:16 +03:00
Stanislav Erokhin
b7c894a6d3
[NI] Capture types from smart-cast types.
...
Sometimes we have something like if (a is Foo<*>) a.bar()
where bar declared: fun <T> Foo<T>.bar().
For such case we should create receiver with possible types Capture(*).
2017-08-07 18:00:13 +03:00
Mikhail Zarechenskiy
72d14bfe0d
[NI] Record type of callable reference to trace
2017-08-07 18:00:10 +03:00
Dmitry Petrov
a303888e66
[NI] Fix expected return type for function literals
...
It should actually be Unit, as told in FunctionExpression comments
(was null, later defaulted to Any?).
2017-08-07 18:00:09 +03:00
Stanislav Erokhin
e12eb66572
[NI] Fix COERCION_TO_UNIT in NI.
2017-08-07 18:00:05 +03:00
Stanislav Erokhin
de17604fe7
[NI] Bind all new resolved calls before update arguments.
2017-08-07 18:00:04 +03:00
Stanislav Erokhin
42438bd363
[NI] Do not calculate lambda return type in Visitor if NI enabled.
2017-08-07 18:00:03 +03:00
Stanislav Erokhin
85248676d2
[NI] Update lambda result arguments after resolution.
2017-08-07 18:00:02 +03:00
Stanislav Erokhin
b9e9243e9d
[NI] Add hacks for property delegation resolution.
2017-08-07 18:00:00 +03:00
Stanislav Erokhin
af138e7403
Minor. Extract object to inner class.
2017-08-07 17:59:59 +03:00
Stanislav Erokhin
55181541af
[NI] Change lambda analysis -- create arguments for return statements.
2017-08-07 17:59:54 +03:00
Stanislav Erokhin
58f73bd82a
[NI] Use right DFI for arguments smart-casts.
2017-08-07 17:59:53 +03:00
Stanislav Erokhin
3a25405088
[NI] Remove type variables for lambda arguments -- use existing instead.
2017-08-07 17:59:50 +03:00
Stanislav Erokhin
acc6e48172
[NI] Added isSuspend for lambdas.
2017-08-07 17:59:48 +03:00
Stanislav Erokhin
29e2a26ad6
[NI] Write fake ResolvedCall for callable reference.
2017-08-07 17:59:47 +03:00
Stanislav Erokhin
55dc2c11f7
[NI] Support callable reference resolution in NI.
...
Missing parts:
- report results about callable references into trace
2017-08-07 17:59:46 +03:00
Mikhail Zarechenskiy
0b358fb693
Fix collection literals resolve in gradle-based projects
...
#KT-19441 Fixed
2017-08-07 17:52:08 +03:00
Daniil Vodopian
b24c1bf06c
KT-9669: introduced JoinStatementAddSemicolonHandler; registered the handler in plugin.xml; added test coverage ( #1232 )
2017-08-07 16:20:40 +02:00
Andrius Semionovas
666c241479
KT-19126 Add convert property initializer to getter in interfaces ( #1224 )
2017-08-07 11:53:37 +02:00
Kirill Rakhman
2536615e0e
detect valid extension main functions ( #1227 )
...
Fixes #KT-18083
2017-08-07 11:39:34 +02:00
Nikolay Krasko
7d66af6583
Always assign shebang comment to same position before package
2017-08-07 12:17:20 +03:00
Nikolay Krasko
8d226594ff
Put comments and whitespaces under body in script files
...
It's more consistent to normal function body for IDE.
Doc comments in file beginning are now sticks to declarations
correctly.
Moving declarations at the end of scripts is fixed
2017-08-07 12:17:17 +03:00
Nikolay Krasko
8de6017e53
Minor: rename comments and whitespace binders file
2017-08-07 12:17:14 +03:00
Nikolay Krasko
ae6f38e252
Minor: fix comment about AllCommentsBinder
2017-08-07 12:13:58 +03:00
Toshiaki Kameyama
0a9e0ddba9
Use back-ticks correctly in "Add remaining branches" action
...
So #KT-13985 Fixed
2017-08-04 20:58:46 +03:00
Yan Zhulanow
c1600c9841
Report errors from compiler plugins as compiler PLUGIN_ERRORs (KT-19311)
2017-08-02 03:35:10 +03:00
Mikhail Glukhikh
9e9c4f79f5
Make MODIFIERS_ORDER consistent with code style document
2017-08-01 20:42:40 +03:00
Mikhail Glukhikh
c5a81691fb
Partial code cleanup: can be private and some others applied
2017-08-01 17:08:56 +03:00
Alexander Udalov
2e82bb5632
Use correct LanguageVersionSettings in MetadataSerializer
...
Also, require users of K2MetadataCompiler to pass "-Xmulti-platform"
manually. Gradle and Maven plugins already do that, so only users who
invoke kotlinc directly are going to be affected by this
#KT-19287 Fixed
2017-07-31 08:47:47 -07:00
Pavel V. Talanov
b0b2c046b2
script.runtime 1.1.4: IDE and compiler use 'kotlin.script.experimental'
2017-07-30 18:15:41 +03:00
Alexander Udalov
4e77897bfd
Pass LanguageSettingsProvider to AnalyzerFacade explicitly
...
This way is more flexible for example for tests, where configuring the
service implementation may be tricky (it's usually done in
KotlinCoreEnvironment in production code)
2017-07-28 20:15:28 +03:00
Leonid Startsev
527ccaff16
Changes required for serialization plugin to work:
...
* Support for generation of synthetic nested classes (for implementations
of user-defined serial annotations):
1. Compiler extenstion points for contributing names and descriptoprs
of nested classes
2. Control on synthetic class primary constructor visibility
* Public functions for generating initializing expressions for optional
properties
2017-07-28 07:04:57 -07:00
Nikolay Krasko
99555fa843
Retrieve receiver annotation to stubs from compiled code (KT-19209)
...
#KT-19209 Fixed
2017-07-28 15:01:32 +03:00
Nikolay Krasko
1b93e2030f
Create isCallee utility function
2017-07-28 01:28:56 +03:00
Andrius Semionovas
68659f5a32
Introduce error "ANNOTATION_USED_AS_ANNOTATION_ARGUMENT" along with QF
...
The relevant inspection has been removed
So #KT-18855 Fixed
2017-07-27 09:54:22 +03:00
Dmitry Petrov
b81ca31aae
Record resolved delegation call for primary ctor if single result
...
Do the same thing as for secondary constructor (looks like it was a
workaround for R&I bug that was used only for secondary constructors
for some reason).
#KT-17464 Fixed Target versions 1.1.5
2017-07-27 09:24:48 +03:00
Yan Zhulanow
38449caaed
Parcelable: Fixes after review
2017-07-26 20:19:23 +03:00
Yan Zhulanow
c23bca6afe
Parcelable: Add Parcelable functionality to Android Extensions plugin
2017-07-26 20:19:15 +03:00
Mikhail Glukhikh
e6872c52a3
More accurate deparenthesize (keeping annotations) in some IDE actions
...
So #KT-19004 Fixed
2017-07-26 15:18:30 +03:00
Mikhail Glukhikh
7fb78a0372
Code cleanup: replace chained null-checks with safe-calls
2017-07-26 15:18:22 +03:00
Alexander Udalov
2f99f6ad34
Refactor AnalysisFlags and their support in IDE
...
* Support flags with any value (not just Boolean)
* Support all flags by parsing arguments in KotlinFacetSettings, instead
of manually listing known flags
#KT-19210 Fixed
2017-07-26 11:45:24 +03:00
Dmitry Petrov
0391c24ab2
Provide diagnostic for typealias using deprecated class or constructor
...
#KT-19205 Fixed Target versions 1.1.5
2017-07-26 09:02:45 +03:00
Alexander Udalov
ebdf5aa223
Discriminate header classes in favor of non-header type aliases
...
In the test case, the problem was that Foo.a's type was resolved to the
_class A_, which was written to metadata on JVM instead of the class
AImpl with typealias A as an abbreviation. This metadata was incorrect
because there's no class A from the JVM compiler's point of view; that's
why the error "cannot access class A" was reported
#KT-19151 Fixed
2017-07-21 19:03:15 +03:00
Mikhail Glukhikh
951e8cd91a
Code cleanup: unnecessary local variable applied
2017-07-21 18:58:48 +03:00
Dmitry Petrov
bf3e896464
Update 'this' extension receiver when there's a smart cast
...
If 'this' (implicit or explicit) was used as an extension receiver,
and the corresponding call required a smart-cast,
this information was effectively lost in "old" resolution & inference,
but is required by "old" JVM BE to generate proper CHECKCASTs.
2017-07-21 08:58:52 +03:00
Alexander Udalov
5128b8a409
Add default implementation for Annotations.findAnnotation
2017-07-20 13:27:34 +03:00
Alexander Udalov
def3f73fdd
Use AnnotationDescriptor.fqName instead of type
...
Also use the annotationClass extension property instead of
TypeUtils.getClassDescriptor(annotation.type)
2017-07-20 13:26:13 +03:00