Mikhail Zarechenskiy
328c67b9e8
Add separate diagnostic renderer results for tests with NI
2017-11-29 02:54:30 +03:00
Mikhail Zarechenskiy
8757298994
Add diagnostics to test data from NI
2017-11-29 02:54:26 +03:00
Mikhail Zarechenskiy
a71238bf94
Place !WITH_NEW_INFERENCE directive to diagnostics test data
2017-11-29 02:53:49 +03:00
Mikhail Zarechenskiy
81b3fefa58
Improve test framework for diagnostic tests with NI
...
Mark with `NI;` or `OI;` only diagnostics that are specific for concrete inference
2017-11-29 02:49:31 +03:00
Ilya Gorbunov
4f76cdfc34
Use new annotations in mutability tests instead of old ones
2017-11-28 17:45:10 +03:00
Alexander Udalov
f80c9a4692
Drop TypeMappingConfiguration.innerClassNameFactory, use default implementation
...
After 57d209f599 , non-default behavior is no longer used.
#KT-21453 Fixed
2017-11-28 14:15:03 +01:00
Alexander Udalov
aca74cef0e
Replace dependencies on kotlin-reflect with kotlin-reflect-api
...
See the previous commit for information on the kotlin-reflect vs
kotlin-reflect-api distinction.
Add kotlin-reflect as an explicit runtime dependency of most of the test
configurations because even though they all depend on tests-common, the
runtime dependency on kotlin-reflect is not exported from tests-common
to other modules because the projectTests dependency is not transitive.
2017-11-28 12:35:49 +01:00
Alexander Udalov
3e8b39af90
Move kotlin-reflect Gradle project to libraries/reflect/
2017-11-28 12:33:21 +01:00
Toshiaki Kameyama
7448042b68
Fix callable code factory (parameter with default value case)
...
Before we can have end of '<Type>' and '=' joined as '>=' breaking PSI
So #KT-15941 Fixed
2017-11-28 14:11:04 +03:00
Mikhael Bogdanov
21bd10da2e
Move generator utils
2017-11-28 11:04:40 +01:00
Mikhael Bogdanov
f529069077
Move common test parts to tests-common. Minify test jar dependencies
2017-11-28 11:04:39 +01:00
Alexander Udalov
386a3fb5ce
Fix tests after f4f5359725
2017-11-27 16:03:38 +01:00
Dmitry Petrov
f586bd4a34
Generate proper visibility for companion object instance field in LV1.3+
2017-11-27 17:15:16 +03:00
Dmitry Petrov
70d3e6592d
Unwrap object member imported by name before determining receivers
...
Existing code for receiver generation accidentally worked in most cases
for object members imported by name. However, it generated strange
bytecode (such as
GETFIELD AnObject.INSTANCE
GETFIELD AnObject.INSTANCE
POP
), and worked incorrectly for augmented assignments.
#KT-21343 Fixed Target versions 1.2.20
2017-11-27 17:15:16 +03:00
Alexey Andreev
71b1591044
JS: replace suspend inline metadata after inlining
...
This fixes some issues on coroutine inlining, see tests
2017-11-27 17:01:18 +03:00
Alexey Andreev
f8e7861ce6
JS: add partial tail-call optimization for suspend functions
2017-11-27 17:01:17 +03:00
Alexey Andreev
7c621488ad
Remove unnecessary CONTAINS_NON_TAIL_SUSPEND_CALLS slice
2017-11-27 17:01:17 +03:00
Alexey Andreev
26843509c7
JS: disable suspend function tail-call optimization based on FE data
...
Partially fixes KT-21026
2017-11-27 17:01:16 +03:00
Alexey Andreev
6ab87ad66a
Fix failing JS tests
2017-11-27 17:01:15 +03:00
Alexander Udalov
938fd1a57e
Use ResolvedCall for callable reference in KCallableNameProperty intrinsic
...
Instead of manually inspecting the DOUBLE_COLON_LHS slice, which is a
bit more error-prone. Note that new tests were passing before this
change
2017-11-27 12:46:56 +01:00
Alexander Udalov
f4f5359725
Fix exception on inlining callable reference with implicit this in LHS
...
Use ResolvedCall to determine the receiver type in the JVM codegen,
instead of manually inspecting the PSI
#KT-20821 Fixed
2017-11-27 12:46:55 +01:00
Dmitry Savvinov
b8447d6d97
Add test on smartcasts with reified types
...
This test introduces very special (for current implementation) case,
when we have smartcast indirectly, via some reified type parameter.
It covers recursive call inSmartCastManager.checkAndRecordPossibleCast(),
which wasn't previously covered by any test in testbase.
2017-11-23 12:45:10 +03:00
Dmitry Savvinov
440b6d9934
Add -Xeffect-system CLI argument which enables Effect System
2017-11-23 12:35:51 +03:00
Leonid Startsev
44d232a83c
Extension point for synthetic function names contributions
2017-11-23 12:21:47 +03:00
Leonid Startsev
d6e5551237
More entry points for compiler plugins
...
* In Kotlin/JS JPS compilation
* In kotlin-common CLI compiler
* In kotlin-common gradle build
2017-11-23 12:12:01 +03:00
Nicolay Mitropolsky
07601b2ec4
KtLightAnnotationForSourceEntry: varargs handling improved (KT-21335, EA-107118)
2017-11-23 10:37:24 +03:00
Nicolay Mitropolsky
23344783a5
KtLightAnnotationForSourceEntry: made more verbose with errors in arrays in params (KT-21335, EA-107118)
2017-11-23 10:37:24 +03:00
Mikhail Glukhikh
078c27efa3
Add fallback flag for legacy var smart casts after try #KT-21377 Fixed
2017-11-22 18:31:04 +03:00
Mikhail Glukhikh
8b6e63dc18
Add forgotten new inference to JS
2017-11-22 18:31:03 +03:00
Mikhail Zarechenskiy
bee7ed1431
[NI] Fix mapping of type arguments to parameters for inner classes
2017-11-22 10:22:41 +03:00
Mikhail Zarechenskiy
e526a87d54
[NI] Make model more robust: remove diagnostics from resolution atoms
...
Currently there are two major phases in NI that report diagnostics: resolution parts and completion. They connected in method `KotlinCallCompleter.runCompletion` and previously diagnostics were collected in several places, from resolution atoms, partly from constraint system and partly from `CallResolutionResult`, some of them were lost.
To mitigate this problem, now diagnostics are not bind to the intermediate candidate, only to the result resolution candidate (overloaded or usual one). And all diagnostics are now collected in method `runCompletion`
2017-11-22 10:22:39 +03:00
Nikolay Krasko
a530163074
Add sources for 'reflect' and 'test' libs during JPS config (KT-20956)
...
#KT-20956 Fixed
2017-11-21 18:55:42 +03:00
Alexey Andreev
ec8adfe7c4
JS: fix referencing outer class from secondary constructor
...
See KT-21041
2017-11-21 12:22:10 +03:00
Alexey Andreev
32a0221474
JS: refactor code that copies default methods in interfaces to classes
...
Als fixes KT-21245
2017-11-21 12:18:16 +03:00
Nikolay Krasko
d2aabe076d
Refactoring: extract jar names in PathUtil and use them in artifacts
2017-11-21 01:11:01 +03:00
Alexey Andreev
a9548b1224
JS: fix translation of safe calls to suspend unit functions
...
See KT-21317
2017-11-20 19:19:24 +03:00
Ilmir Usmanov
0fbbe10143
Support suspendCoroutineUninterceptedOrReturn intrinsic
...
KT-17336: Fixed
2017-11-20 18:12:41 +03:00
Mikhael Bogdanov
a547019ed0
Switch DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET according to LL
2017-11-17 13:48:44 +01:00
Alexander Udalov
d386712903
Report pre-release errors if release LV is used
...
#KT-21267 Fixed
2017-11-17 13:42:36 +01:00
Mikhail Zarechenskiy
20e1caaab1
[NI] Use refined expected type by smartcasts in CS
2017-11-17 15:04:20 +03:00
Mikhail Zarechenskiy
ca035bc8b8
[NI] Report error from expected type constraint position
2017-11-17 15:04:18 +03:00
Igor Chevdar
d4d3f237ee
Fix for package level lateinit properties
2017-11-17 13:48:17 +03:00
Alexey Andreev
89db4dfe79
JS: translate when against enum to JsSwitch when possible
2017-11-17 11:07:41 +03:00
Alexey Andreev
678b4c67c1
JS: translate when to JsSwitch when possible
...
See KT-21160
2017-11-17 11:07:38 +03:00
Alexey Andreev
7b403211dd
JS: kotlinize WhenTranslator
2017-11-17 11:07:37 +03:00
Alexey Andreev
21de76f88d
JS: fix identifier generation in delegate constructor calls
...
See KT-21093
2017-11-17 11:07:34 +03:00
Mikhail Zarechenskiy
66064345e9
[NI] Support fallback resolution for refined sams priority feature
2017-11-16 18:07:54 +03:00
Mikhail Zarechenskiy
e42f07b031
[NI] Wait for proper constraints to fix type for callable reference
...
If expected type is a type variable, then we'll wait for proper constraints, but previously we resolved callable reference as it didn't have expected type at all, because type variable isn't a functional type
Consider the following example:
fun foo(i: Int) {}
fun foo(s: String) {}
fun <T> id(x: T): T = x
fun test() {
val x1: (Int) -> Unit = id(id(::foo))
}
Here we shouldn't resolve callable reference until we get constraint from expected type of `x1`
2017-11-16 18:07:51 +03:00
Mikhael Bogdanov
cbfcb74b58
Get rid of cli dependencies from ir
2017-11-16 14:46:53 +01:00
Alexey Tsvetkov
18261838b6
Avoid deserializing .kotlin_module as class proto
...
#KT-20184 fixed
2017-11-16 14:47:59 +03:00