Ilya Chernikov
732367e671
Pass earlier scripts as array, removes 255-lines repl limitation
...
fixes #KT-10060
2017-05-03 18:11:46 +02:00
Ilya Chernikov
15ccd28e2e
Switch old IDE/CLI repls to the new infrastructure
...
should also fix #KT-5822
2017-05-03 18:11:45 +02:00
Ilya Chernikov
e384268c8b
minor: unwrapping InvocationTargetException on repl line evaluation...
...
To provide better error diagnostics
2017-05-03 18:11:44 +02:00
Ilya Chernikov
8cc576d44f
Add total reset to repl history and state interfaces
2017-05-03 18:11:43 +02:00
Ilya Chernikov
c746cae72d
minor: add some generic repl tests...
...
in particular ignored test256Evals test that fails due to #KT-10060
2017-05-03 18:11:42 +02:00
Ilya Chernikov
f152af6385
minor: some repl cleanup
2017-05-03 18:11:41 +02:00
Mikhael Bogdanov
4e0bacab1e
Add '/' to 'bin/java' path
2017-05-03 17:48:43 +02:00
Mikhael Bogdanov
84eeed51b1
Restore accidentally removed parameter index passing to call generator
...
Parameter index was removed in
7690a8bc3e commit:
"Get rid of redundant 'afterParameterPut' method from call generators"
#KT-17653 Fixed
2017-05-03 12:56:15 +02:00
Igor Chevdar
962bce19a2
Enabled tests on coroutines for native
2017-05-03 10:42:07 +03:00
Mikhail Glukhikh
b5d0de7c3f
Add test for KT-17479 looks like #KT-17479 Fixed
...
(after CAPTURED_MEMBER_VAL_INITIALIZATION introduction)
2017-05-02 19:59:43 +03:00
Mikhail Glukhikh
28283bad3e
Introduce special CAPTURED_VAL_INITIALIZATION for members
2017-05-02 19:59:37 +03:00
Mikhail Glukhikh
56e633e345
CFA: detect captured writes more precisely
...
So #KT-14381 Fixed
So #KT-13597 Fixed
Also refactors captured writes detection inside DFA
2017-05-02 19:59:23 +03:00
Mikhail Glukhikh
8fa739ed0f
Test for KT-14381 and KT-13597
2017-05-02 19:02:01 +03:00
Mikhail Glukhikh
fbc1d1a844
Clear var nullability in loops more accurately #KT-14977 Fixed
2017-05-02 19:01:48 +03:00
Mikhail Glukhikh
dc3ea4b6e4
Remove <Unknown Name> from module name rendering
...
Fixes failing multi-platform tests
2017-05-02 19:01:43 +03:00
Pavel V. Talanov
956ace3463
Light classes: modifierList#findAnnotation does not trigger exact resolve
2017-05-02 15:40:22 +03:00
Pavel V. Talanov
55a0e138fc
Refactor: extract AnnotationDescriptor.annotationClass utility
2017-05-02 15:40:20 +03:00
Pavel V. Talanov
0571c62943
KtLightElements: make light annotations lazier
...
Allow to get annotation list and to invoke `findAnnotation` without building delegate
Introduce KtLightNullabilityAnnotation which holds nullability information and is built
before delegate is built
2017-05-02 15:40:17 +03:00
Pavel V. Talanov
03b68666e4
KtLightClassForSourceDeclaration: use psi based resolve to speedup isInheritor checks
2017-05-02 15:40:17 +03:00
Pavel V. Talanov
bdc4014ded
Refactor: Introduce KtLightElementBase
2017-05-02 15:40:16 +03:00
Pavel V. Talanov
901aa9c18b
PsiBasedClassResolver: use ImpreciseResolveResult instead of Boolean?
2017-05-02 15:40:14 +03:00
Pavel V. Talanov
8f4c969933
KtLightElement is no longer PsiNamedElement
2017-05-02 15:40:14 +03:00
Mikhail Glukhikh
04f7ba95c5
Add module name to HEADER_WITHOUT_IMPLEMENTATION message
2017-05-02 14:17:20 +03:00
Dmitry Petrov
6cefc0ddf3
Infer suspend flag for local delegated property accessors
...
Local delegated property accessors calling suspend operators getValue
or setValue should be suspend functions themselves.
KT-17605 Getter and setter of suspend delegated property are not suspend
2017-05-02 12:52:36 +03:00
Alexander Udalov
fcf44af294
Change how kotlinc and tools display their version
...
- Display the Kotlin version in kotlin-gradle-plugin. This is needed
because if "-version" is specified in compiler arguments, the "info"
level of the message printed by the compiler in CLICompiler prevents
it from being displayed by default (unless "--debug" is passed to
Gradle).
- Display the version of JRE the compiler is running on. This will be
helpful to diagnose Java 9 related issues in the future.
- In CLI, also display the executable name (kotlinc-jvm or kotlinc-js)
2017-04-28 20:49:54 +03:00
Alexander Udalov
d8d3bafbe9
Introduce "-Xreport-output-files" to report source-output mapping for JPS
...
This makes "-verbose" not required for JPS to run correctly and
therefore allows to print more useful debugging stuff in the compiler
and read them in CLI, for example. The output will also be more readable
because there'll be no "output" messages
2017-04-28 20:49:28 +03:00
Simon Ogorodnik
9a969b0449
Add basic completion for operator fun names
...
#KT-11250 fixed
2017-04-28 15:06:27 +03:00
Mikhael Bogdanov
a7c9e14805
Don't generate default arguments for inline call
2017-04-28 12:19:09 +02:00
Mikhael Bogdanov
7690a8bc3e
Get rid of redundant 'afterParameterPut' method from call generators
2017-04-28 12:19:09 +02:00
Mikhael Bogdanov
b440561f5c
Generate default arguments and varargs lazily
...
The aim to perform optimizations in call generators
2017-04-28 12:19:08 +02:00
Mikhael Bogdanov
02cc5f6bc1
Expand default parameters conditions on inlining default function
...
#KT-14564 Fixed
#KT-10848 Fixed
#KT-12497 Fixed
2017-04-28 12:19:07 +02:00
Dmitry Jemerov
184ff9542c
Add missing case to DECLARATION_NAME_WITH_KIND renderer (EA-100667)
2017-04-28 12:02:19 +02:00
Alexey Andreev
c8c3d24b45
Fix non-suspending labeled loop in suspend function
...
Fix bug when labeled loop, which does not contain suspend calls
in its body, was losing its label
2017-04-28 10:52:14 +03:00
Mikhail Glukhikh
19021ec1aa
VarianceChecker refactoring: move checkClassOrObject to IDE
2017-04-27 20:58:40 +03:00
Mikhail Glukhikh
b66401a41d
Variance checker: add check for nested local / anonymous classes
...
So #KT-16136 Fixed
2017-04-27 20:58:39 +03:00
Alexander Udalov
c92aa1a62d
Fix test data in incompleteHierarchyInJava test
...
This likely started to behave differently since d65af8f9
2017-04-27 20:52:33 +03:00
Alexander Udalov
82e6324c45
Support compilation against modular JDK (9+)
...
For more information about the "jrt" file system, see
http://openjdk.java.net/jeps/220 and
https://bugs.openjdk.java.net/browse/JDK-8066492 .
This commit fixes DiagnosticsWithJdk9TestGenerated.testKt11167
#KT-11167 Fixed
2017-04-27 20:48:24 +03:00
Alexander Udalov
a519ab681a
Add diagnostic tests against Java 9
...
These tests currently won't run if you don't have environment variable
JDK_9 set up
2017-04-27 20:35:14 +03:00
Alexander Udalov
7f5d87ea17
Rename PathUtil.getJdkClassesRoots to avoid confusion
...
Two of these methods return roots given a path to the JRE, and the third
one returns roots given a path to the _JDK_.
2017-04-27 20:35:14 +03:00
Mikhail Zarechenskiy
fcf70fda22
Fix exception when classes erroneously have no name
...
#KT-16775 Fixed
Exception appears because of different representation of classes without name. For Kotlin we load them with `SpecialNames.NO_NAME_PROVIDED`, but for Java (for light classes) with `SpecialNames.safeIdentifier`
2017-04-27 18:57:45 +03:00
Denis Zharkov
c970763a7f
Fix callable reference resolution regression
...
The regression appeared after
b5a8ffaddc
when we started trying both static and member methods until
first success and when there is no successful
we were just leaving the last one (e.g. private member)
But the actual problem is that we were commiting the trace
in case of single (but incorrect) result in resolution mode of
SHAPE_FUNCTION_ARGUMENTS when we couldn't yet choose the
correct static method
Also we shouldn't choose a shape for callable reference
using only the knowledge that result is single:
it may lead to the wrong inference result
(see test with Pattern::compile)
#KT-17597 Fixed
2017-04-27 18:38:10 +03:00
Ilya Gorbunov
99504eb753
Support rendering receiver parameters
...
Otherwise generated coroutine implementation class could not be rendered since one of its members corresponds to receiver parameter descriptor.
2017-04-27 16:38:25 +03:00
Mikhail Zarechenskiy
7af10769c9
Enable control flow checks for functions without body
...
Except checks for tail recursive calls
#KT-7796 Fixed
2017-04-27 15:50:18 +03:00
Mikhail Zarechenskiy
a0d7b703f4
Align generic signature for inner classes to work as in Java
...
#KT-10397 Fixed
According to JVMS (p. 4.3.4) inner classes should be separated with `$` in generic signature.
Note that in Java, inner types separated with `.` after first parameterized type, and now we preserve the same behaviour. See tests for clarification.
2017-04-27 15:47:28 +03:00
Mikhail Glukhikh
14e798a1fc
Take imported from object descriptor into account in pseudocode
...
So #KT-15566 Fixed
2017-04-27 15:27:41 +03:00
Ilya Matveev
935d42f8ac
Ignore explicitEqualsOnDouble.kt box-test for native backend
2017-04-27 14:55:32 +07:00
Alexander Udalov
e2c62cbded
Support serialization of built-in ranges as error types
...
This will be needed to move ranges and progressions out of builtins.
Currently they're only used in signatures of "rangeTo" functions on
primitives
2017-04-26 18:10:54 +03:00
Alexander Udalov
38ea9986ab
Make KotlinType.isError extension instead of member
2017-04-26 18:10:49 +03:00
Stanislav Erokhin
dce373b807
Create special data flow info for ControlStructure. It will be used in new inference for special calls.
2017-04-26 13:47:53 +03:00
Stanislav Erokhin
dbe867e2c0
Minor. Change upper bound for collection of given candidates.
2017-04-26 13:47:52 +03:00