Stanislav Erokhin
5bb61d2d02
[NI] Small improvements in callable reference resolution.
...
I'm not sure in this commit, but it fix some test -> let it be for now.
And yes, now I do not know correct way for callable reference resolution,
so for now it is just proposals.
2017-08-07 17:59:58 +03:00
Stanislav Erokhin
7eabdeffb3
[NI] Fix variable to proper upper type even if direction is TO_SUBTYPE.
2017-08-07 17:59:57 +03:00
Stanislav Erokhin
b3be21146c
[NI] Add more hacks.
2017-08-07 17:59:56 +03:00
Stanislav Erokhin
0f0d834c23
[NI] Minor. Fix IOE.
2017-08-07 17:59:55 +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
30f7396803
[NI] Substitute lambda return type with current substitutor
...
We should do this because return type even it still not proper
can contain fixed type variables
2017-08-07 17:59:52 +03:00
Stanislav Erokhin
89ac3bd5cf
[NI] Do not add useless constraints to constraint system
...
Skipped constraints:
- T <: Any, T >: Nothing
- T <: T, T <: T?, T >: T, T <: T!, T! <: T
2017-08-07 17:59:51 +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
ff6a28b64c
Add util method to BuildIns is kotlin.Function type.
2017-08-07 17:59:49 +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
ee16a79612
[NI] Add pre-resolution callable reference argument check.
...
If expected type for callable reference argument isn't callable type
then make such candidate unsuccessful.
Sometimes expected type is just `T`, where `T` is type variable.
To support such case we take all supertypes and check them instead.
2017-08-07 17:59:46 +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
Stanislav Erokhin
02f4558683
Add way to create callable reference processor
...
Priority of variables and function should be the same.
Because of this we create new CompositeSimpleScopeTowerProcessor,
which merge candidates for properties and function into one candidate group
2017-08-07 17:59:44 +03:00
Stanislav Erokhin
36ea9484a9
[NI] Minor. Extract code to function.
...
Also make KotlinCall unnecessary for TypeVariableFromCallableDescriptor.
2017-08-07 17:59:43 +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
Dimach
d624ed4aff
KT-18482: "Move lambda argument to parenthesis" action generate uncompilable code fixed ( #1226 )
...
* KT-18482 fixed
* Moved code to separate method and changed code to cover few more cases.
* Code style fixes.
2017-08-07 15:43:44 +02:00
Alexey Andreev
a4551fb0fb
Fix infinite loop during continuous Gradle build including JS DCE
...
It's basically a workaround fox bug in Gradle.
See https://github.com/gradle/gradle/issues/2651
2017-08-07 16:36:57 +03:00
Sergey Igushkin
71878b2218
Merge pull request #1225 from nageshs/master
...
Close the local.properties file after reading
Issue #KT-19397 Fixed
2017-08-07 16:07:51 +03:00
Sergey Igushkin
13a2de1816
Update libraries/ReadMe.MD, add info about plugin markers required for tests
2017-08-07 15:14:37 +03:00
Sergey Igushkin
0cfac71efe
(minor) Improve readability of pluginMarkers.gradle, fix indent in file
...
(minor) Clarify the comment on the setUpSeparateArtifact block
2017-08-07 14:33:35 +03:00
Sergey Igushkin
94036b7cac
Add Gradle license
2017-08-07 14:33:33 +03:00
Sergey Igushkin
999db0bc80
Add a test for plugins DSL
2017-08-07 14:32:41 +03:00
Sergey Igushkin
8fd508566a
Add Gradle plugin marker artifacts for the Gradle plugins.
...
This allows for the Gradle plugins DSL to resolve the plugins from
a custom repository.
https://docs.gradle.org/current/userguide/plugins.html#sec:plugin_markers
2017-08-07 14:17:43 +03:00
Toshiaki Kameyama
64eeb479aa
Take nullability annotations into account in QF correcting override
...
So Java NotNull annotated is converted to `Type`
and Java Nullable annotated to `Type?` accordingly
So #KT-19299 Fixed
2017-08-07 13:52:25 +03:00
Mikhail Glukhikh
1264ed7c86
Minor cleanup
2017-08-07 13:20:35 +03: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
Yujin Jung
4c00119f08
Fix incorrect slack link ( #1231 )
2017-08-07 11:39:02 +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
Nikolay Krasko
6194bc10f8
Move statement out of top-level lambda in scripts (KT-19322)
...
#KT-19322 Fixed
2017-08-07 12:12:41 +03:00
Dmitry Petrov
656f8bb5cf
Turn SwitchCodegenUtil into a class
2017-08-07 10:31:02 +03:00
Dmitry Petrov
435cfeea0a
SwitchCodegenUtil: convert to Kotlin and cleanup
2017-08-07 10:31:02 +03:00
Dmitry Petrov
c5772e5549
SwitchCodegenUtil: .java -> .kt
2017-08-07 10:31:02 +03:00
Dmitry Petrov
2ed5a5e368
'when' should use intrinsics for '=='
...
#KT-19029 Fixed Target versions 1.1.5
#KT-18818 Fixed Target versions 1.1.5
2017-08-07 10:31:02 +03:00
Jonathan Leitschuh
20cd748377
Add download link for JDK6 on MacOS to Readme.md ( #1229 )
...
Reduce the barier to entry for working on Kotlin by providing a
download link for the MacOS JDK6 in the ReadMe.
2017-08-04 22:47:14 +02:00
Toshiaki Kameyama
dbaec43e4d
Make abstract both member and class while applying "Make abstract"
...
So #KT-12613 Fixed
2017-08-04 21:34:21 +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
Alexey Sedunov
97a3d343f7
Create Class from Usage: Support nested classes
...
This covers the case when original expression doesn't contains qualifier
Also for local or inner containing classes:
- forbid nested objects
- add 'inner' to nested class declaration
#KT-16404 Fixed
2017-08-04 16:48:36 +03:00
Alexey Sedunov
d30461afc6
Create Class from Usage: Support multiple containers
2017-08-04 16:48:35 +03:00
Alexey Sedunov
78117b3e7b
Create from Usage: Infer expected type from base declarations
...
#KT-17480 Fixed
2017-08-04 16:48:35 +03:00
Alexey Sedunov
3b4891279e
Configuration: Update default settings for Kotlin/JS compiler
2017-08-04 16:48:35 +03:00
Mikhael Bogdanov
d738633981
Switch jvm target to 1.8 in Ultimate plugin and missed version to core modules
2017-08-04 15:45:53 +02:00
Dmitry Jemerov
563472e676
Include org.json classes in Kotlin plugin jar
2017-08-04 15:30:12 +02:00
Mikhael Bogdanov
db9f925bb1
Switch default project jvm target to 1.8, keep 1.6 for core modules
2017-08-04 13:14:50 +02:00