Alexander Udalov
54a615fcd3
Support inlining 'arrayOf' and 'emptyArray' with no stdlib in classpath
...
Previously an exception was thrown on trying to inline arrayOf/emptyArray when
compiling with "-no-stdlib" (or in tests without a dependency on the stdlib),
because these functions were found in a built-in package fragment which does
not have the bytecode associated with it
2016-03-09 10:25:38 +03:00
Denis Zharkov
68f411395a
Fix bridge generation for special builtin override
...
Use method itself signature as common bridge delegate
#KT-11285 Fixed
2016-03-07 09:26:02 +03:00
Pavel V. Talanov
1affb05b7b
Fix typechecker in case of "for ((a, b) in) { }"
...
Fixes NDFDE
2016-03-04 16:52:34 +03:00
Pavel V. Talanov
363d545bd5
Parameters of function types are always considered local
2016-03-04 16:52:33 +03:00
Pavel V. Talanov
37500e2cd5
Throw ISE earlier on passing certain types of declaration to ResolveSession#resolveToDescriptor()
2016-03-04 16:52:31 +03:00
Valentin Kipyatkov
05dc4c1c48
ResolutionFacade for synthetic files should be invalidated on changes in these synthetic files
...
Fixed EA-77017
2016-03-04 16:30:24 +03:00
Dmitry Petrov
3bbd8979e4
KT-9670: optimize Class <-> KClass wrapping/unwrapping as a special case of boxing/unboxing.
...
NB doesn't work for arrays of classes.
2016-03-04 10:14:21 +03:00
Dmitry Petrov
2ecb8896cc
Converting optimization.boxing to Kotlin: convert & simplify
2016-03-04 10:14:21 +03:00
Dmitry Petrov
0555464a3b
Converting optimization.boxing to Kotlin: rename files
2016-03-04 10:14:21 +03:00
Dmitry Petrov
8660800af7
Constraint system builder shouldn't drop nullability when comparing signatures for specificity.
2016-03-03 19:23:43 +03:00
Dmitry Petrov
8a2b80fe3f
Generalize signature comparison: checking for conflicting overloads.
...
Also, vararg parameter no longer conflicts with Array<out T>
(CONFLICTING_JVM_DECLARATIONS is reported, can be avoided using @JvmName).
2016-03-03 18:26:10 +03:00
Dmitry Petrov
4ac05f1cd8
Generalize signature comparison: callable references overloading conflict resolution.
2016-03-03 18:26:10 +03:00
Dmitry Petrov
c5f3cbc645
Generalize signature comparison: make it work for regular call overloading conflict resolution.
2016-03-03 18:26:10 +03:00
Dmitry Petrov
022162322d
Introduce "flat signature" - a generalized abstraction for a (call) signatures that can be compared for specificity.
2016-03-03 18:26:10 +03:00
Dmitry Petrov
77b7128689
Check conflicting overloads for generic signatures.
2016-03-03 18:26:09 +03:00
Alexander Udalov
04eea69a82
Fix Java 8 codegen box tests
2016-03-03 17:08:47 +03:00
Alexey Tsvetkov
239e217d19
Move DebugXProtoBuf classes to build-common
...
KT-8487
2016-03-03 16:45:19 +03:00
Ilya Chernikov
b470bdda23
Class added to proguard - was missing in gradle plugin when incremental compilation is on
...
KT-8487
2016-03-03 16:45:18 +03:00
Ilya Chernikov
ebae665b78
Adding missing keep statement to proguard config
...
KT-8487
2016-03-03 16:45:13 +03:00
Ilya Chernikov
66f1f87757
Additional check of analyze resul, prevents a problem of passing BindingContext.EMPTY to the generation stage, fixes kapt tests in gradle plugins
...
KT-8487
2016-03-03 16:45:12 +03:00
Alexander Udalov
daab3db062
Add WITH_RUNTIME and WITH_REFLECT directives to box tests
...
Currently all tests in boxWithStdlib/ run with both runtime and reflection
included; eventually they'll be merged into box/ using these directives
2016-03-03 16:11:21 +03:00
Alexander Udalov
f47cc5ce2f
Fix runtime dependency in codegen/box tests, delete old doTestWithStdlib logic
...
Codegen tests in "compiler/testData/codegen/box" started to run with
ConfigurationKind.ALL accidentally in 933be1e . This commit fixes it
2016-03-03 16:08:18 +03:00
Alexander Udalov
5488972b53
Minor, don't create empty tmpdir in codegen tests w/o Java
2016-03-03 16:08:18 +03:00
Alexander Udalov
d011fa8dc6
Add FULL_JDK to tests in codegen/boxWithStdlib/fullJdk/
...
Drop the old scheme which relied on the directory name
2016-03-03 16:08:18 +03:00
Alexander Udalov
4553afbd0c
Make PropertyAccessorDescriptor#hasBody a front-end utility
2016-03-03 16:08:18 +03:00
Alexander Udalov
ae14d185eb
Support setters for Java-method-based properties in reflection
...
Also heuristically support the corner case of multiple properties with the same
name and signature in a Java class, see the comment in
KDeclarationContainerImpl
#KT-11258 Fixed
2016-03-03 16:08:18 +03:00
Alexander Udalov
14b1a3a048
Don't fail on requesting members of Java collection classes
...
RuntimeTypeMapper assumed that JavaPropertyDescriptor was necessarily backed by
JavaField, which has changed when we started to load Java method (or a pair of
methods) overriding a Kotlin property as a property, not as a method. Another
example of this situation is special built-in properties which are mapped to
Java methods, e.g. java.util.Collection#size() <-> kotlin.Collection#size. This
change adds support for the case of a property backed by a JavaMethod.
Note that callable references or usage of any reflection API related to
built-in members is not supported anyway and will currently fail with errors
#KT-11258 Fixed
2016-03-03 16:08:18 +03:00
Alexander Udalov
371051b1d6
Filter out package members from other facades in KPackageImpl
...
#KT-10690 Fixed
2016-03-03 16:08:18 +03:00
Alexander Udalov
1c0bbcd72b
Fix KProperty.javaField for fake overrides
...
#KT-8131 Fixed
2016-03-03 16:08:18 +03:00
Michael Bogdanov
534a3a11d6
Write additional type parameters for DefaultImpls methods, fix for KT-11121: BadClassFile exception for interface implemented generic properties
...
#KT-11121 Fixed
2016-03-03 16:11:31 +03:00
Alexander Udalov
65662d7c99
Remove incorrect test, to be reconsidered in the future
...
Before 3ca4097 , 'set' signature was not checked at all in this case
#KT-11272 Open
2016-03-02 20:44:23 +03:00
Alexander Udalov
c93517bc2f
Minor, fix test data
2016-03-02 19:00:50 +03:00
Dmitry Jemerov
661c87e464
minor: rename "jet" to "kotlin" in a couple of variable names
2016-03-02 16:47:43 +01:00
Stanislav Erokhin
5141d95a88
Refactoring. Remove dependence intellij-core from resolution module
2016-03-02 18:07:41 +03:00
Alexander Udalov
8e77e16bbd
Remove leftovers of platformName and platformStatic in test data
...
Drop unnecessary imports, rename some tests
2016-03-02 16:47:04 +03:00
Alexander Udalov
beb11e7ac1
Minor, don't create unnecessary class loader in OuterClassGenTest
...
Read the bytes from the file instead
2016-03-02 15:47:40 +03:00
Alexander Udalov
f1bb31d0a9
Minor, inline one overload of CodegenTestUtil.compileJava
2016-03-02 15:47:40 +03:00
Alexander Udalov
933be1e035
Drop single-file mode of black box codegen tests
...
Add regression test for #KT-5190
2016-03-02 15:47:39 +03:00
Alexander Udalov
2de7f38427
Migrate boxWithJava tests to multi-file framework
2016-03-02 15:47:38 +03:00
Alexander Udalov
0801ae5364
Minor, delete weird intermediate git files
2016-03-02 15:47:38 +03:00
Alexander Udalov
e7371d2c1a
Minor, move boxAgainstJava logic to a separate test class
2016-03-02 15:47:37 +03:00
Alexander Udalov
280ad195ee
Migrate boxAgainstJava tests to multi-file framework
2016-03-02 15:47:36 +03:00
Alexander Udalov
26de87d792
Minor, make CodegenTestUtil.compileJava take absolute paths of files
2016-03-02 15:47:36 +03:00
Alexander Udalov
12cf70ac38
Delete legacy codegen tests with Java on annotations
...
After cleanup, these tests are now duplicated with those in
boxAgainstJava/annotations/
2016-03-02 15:47:35 +03:00
Alexander Udalov
9f67fe2fe3
Adapt CompileKotlinAgainstKotlin test to black box format
...
Rename/remove some obsolete test cases
2016-03-02 15:47:35 +03:00
Alexander Udalov
0b26e749f6
Improve multi-file test framework in CodegenTestCase
...
Instead of inheriting from KotlinMultiFileTestWithJava, invoke
KotlinTestUtils.createTestFiles directly. This helps to avoid constructing
unnecessary environment (createEnvironment() was called in setUp, but codegen
tests ignored the created environment because it's not possible to do
generically in codegen tests; the environment kind depends on the source file
usually)
2016-03-02 15:44:28 +03:00
Alexander Udalov
4b96a8131b
Inline KotlinLiteFixture
2016-03-02 15:44:28 +03:00
Alexander Udalov
12b6a4ede4
Obsolete KotlinLiteFixture, move utilities to CheckerTestUtilTest
2016-03-02 15:44:28 +03:00
Alexander Udalov
647e188a08
Migrate bytecode text tests to multi-file framework
...
Get rid of BytecodeTextMultifileTestGenerated
2016-03-02 15:44:28 +03:00
Dmitry Petrov
9244ef9b81
Do not use 'dup' for postfix increment/decrement: can't do it with collection element in general.
...
KT-11190, KT-11191, KT-11192, KT-11200, KT-11206
2016-03-02 14:28:06 +03:00