Commit Graph

39 Commits

Author SHA1 Message Date
Anton Bannykh
fadeac083f JS: fix reified T::class for primitive T (e.g. Int) (KT-32215 fixed) 2019-06-28 13:49:22 +03:00
Pavel Punegov
e9aec54f59 Ignore test in native because it doesn't support 40 parameters 2019-06-25 19:12:41 +03:00
pyos
8cca74c932 JVM_IR: support vararg & defaults in function references 2019-06-20 22:37:56 +03:00
pyos
b74586f84e JVM_IR: implement single-abstract-method conversions 2019-04-04 09:45:00 +02:00
Alexander Udalov
ed86757817 Rework how built-in types are loaded in compiler for JVM
In TopDownAnalyzerFacadeForJVM, we now always use the "load built-ins
from module dependencies" behavior that was previously only enabled with
the dedicated CLI argument -Xload-builtins-from-dependencies. However,
sometimes we compile code without kotlin-stdlib in the classpath, and we
don't want everything to crash because some standard type like
kotlin.Unit hasn't been found.

To mitigate this, we add another module at the end of the dependencies
list, namely a "fallback built-ins" module. This module loads all
built-in declarations from the compiler's class loader, as was done by
default previously. This prevents the compiler from crashing if any
built-in declaration is not found, but compiling the code against
built-ins found in the compiler is still discouraged, so we report an
error if anything is resolved to a declaration from this module, via a
new checker MissingBuiltInDeclarationChecker.

Also introduce a new CLI argument -Xsuppress-missing-builtins-error
specifically to suppress this error and to allow compiling code against
compiler's own built-ins.

 #KT-19227 Fixed
 #KT-28198 Fixed
2019-03-22 14:59:03 +01:00
pyos
8c55376f0c Unmute almost all JVM_IR tests that use property references 2019-03-19 12:00:29 +01:00
Alexander Udalov
a269e9bc00 JVM IR: fix typo in condition in KCallableNamePropertyLowering
This however makes testLocalFunctionName fail because currently
isSubclassOf (incorrectly) returns false and therefore an anonymous
class is generated and the name is taken from there. The name there is
"box$OK" which is incorrect. The isSubclassOf issue is KT-28198 and will
be fixed separately; the incorrect name issue will be investigated later
2019-03-12 18:49:41 +01:00
Svyatoslav Kuzmich
beb5f73a2b Remove duplicate tests from JS compiler test set. Merge chages to common compiler tests 2019-02-25 15:09:27 +03:00
Svyatoslav Kuzmich
aa811dcfb3 [JS IR BE] Add KJS_WITH_FULL_RUNTIME directive to compiler tests 2019-01-24 16:14:40 +03:00
Ilya Gorbunov
56672c2564 Ensure stable sorting in MutableList.sort/sortWith
MutableList.sortWith now works correctly in JS_IR backend too

#KT-12473
2019-01-17 18:38:23 +03:00
Mikhael Bogdanov
9a059809bf Add test for Obsolete issues
#KT-15956 Obsolete
 #KT-15751 Obsolete
 #KT-16417 Obsolete
 #KT-21787 Obsolete
2019-01-08 13:52:47 +01:00
Mikhael Bogdanov
3ef06c1e44 Specify JVM target backend for test with 'import java...' 2018-12-21 16:09:06 +01:00
Roman Artemev
7f215d3f52 Update tests 2018-11-01 16:51:38 +03:00
Roman Artemev
080e1ad5b5 [JS IR BE]
* Fix type parameters for callable references
 * Visit IrCallableReference tree as well
2018-10-25 15:49:22 +03:00
Roman Artemev
fb499def59 Update tests 2018-10-25 15:49:21 +03:00
Roman Artemev
1338d6d66f Update tests 2018-10-19 14:07:20 +03:00
Alexander Udalov
51979b9ffa Convert FunctionBase to Kotlin, add type parameter to Lambda
This will make it possible to avoid raw types when inheriting from both
FunctionBase and Function<R>. This change adds a generic type parameter
to FunctionBase and Lambda which is not source-breaking under our policy
because both FunctionBase and Lambda are internal classes (located in
package kotlin.jvm.internal)
2018-08-30 14:52:33 +03:00
Pavel Punegov
2ff6047845 Update ignore tag for Native backend 2018-08-28 13:48:43 +03:00
Mikhael Bogdanov
bbc5fa4705 Perform InnerClassLowerings after CallableReferenceLowering 2018-08-09 14:22:51 +03:00
Mikhael Bogdanov
357359b1dd Unmute ir-tests after CR support 2018-08-09 14:22:50 +03:00
Roman Artemev
c62e4b4fcf [JS IR BE] Support coroutines
* Move FinallyBlockLowering to common part
* Fix catching of dynamic exception
* Fix bridges for suspend functions
* Disable explicit cast to Unit
* Run lowering per module
* Update some test data
2018-08-08 18:33:39 +03:00
Alexander Udalov
0c8b231fde Add tests on coercion to Unit for callable references
#KT-11723
2018-08-01 16:26:07 +02:00
Svyatoslav Kuzmich
625983b28a [JS IR BE] Enum class lowering 2018-07-23 15:08:18 +03:00
Svyatoslav Kuzmich
83f8cfaa66 [JS IR BE] hashCode, toString, number conversion support 2018-07-03 19:51:58 +03:00
Mikhael Bogdanov
e149cbe852 Mute failed jvm ir tests 2018-06-28 12:26:41 +02:00
Roman Artemev
6ac4fd2e5f [JS IR BE] Update test data 2018-06-14 19:54:30 +03:00
Anton Bannykh
96355e2732 JS IR: mute codegen box tests automatically 2018-06-09 19:15:38 +03:00
Mikhail Zarechenskiy
e7449a3584 Fix referencing inner class constructor on an outer class instance
#KT-12796 Fixed
2017-09-05 14:41:44 +03:00
Alexander Udalov
93d5f6e635 Fix NPE on equals/hashCode of local function references
Anonymous classes for local function references implement their
getOwner() as "return null" currently (KT-14291). To avoid NPE in this
case, we now consider two local functions the same if their name and
signature are equal. This is incorrect in general, but unlikely to cause
major problems and is going to be fixed by KT-14291 eventually anyway

 #KT-17055
2017-04-03 18:05:04 +03:00
Yan Zhulanow
c50881fd02 Refactoring: Extract light analysis tests from box tests 2017-03-21 20:49:34 +03:00
Ilya Matveev
a5e4e0284e Mute some box tests for native backend
This patch mutes the following test categories:
   * Tests with java dependencies (System class,
     java stdlib, jvm-oriented annotations etc).
   * Coroutines tests.
   * Reflection tests.
   * Tests with an inheritance from the standard
     collections.
2017-03-10 19:59:37 +03:00
Alexander Udalov
46bd64f59a Rename FunctionImpl -> FunctionBase, restore abstract class FunctionImpl
This fixes the IncompatibleClassChangeError which happens when kotlin-reflect
1.0.x and kotlin-stdlib 1.1.x are in the classpath

 #KT-16358 In Progress
2017-02-15 20:43:25 +03:00
Alexey Andreev
7a0f75f164 JS: refactor generation of callable references to functions 2017-01-24 20:09:29 +03:00
Mikhail Zarechenskiy
2cac6a9e7d Improve inference on generics for callable references
#KT-10711 Fixed
 #KT-12802 Fixed
 #KT-12964 Fixed
 #KT-15439 Fixed

Analyze callable references in `dependent` mode, then complete them with
respect to expected types
2017-01-24 02:15:26 +03:00
Ilya Gorbunov
62fe89b536 Make several tests running on JS backend. 2016-11-21 18:20:33 +03:00
Zalim Bashorov
596f3364c6 Automatically mute failed tests 2016-11-09 21:41:12 +03:00
Alexander Udalov
06a67e6602 Merge boxWithStdlib testData into box, delete BoxWithStdlib test 2016-03-09 10:25:38 +03:00
Alexander Udalov
2564a2f91f Do not include kotlin-reflect at runtime by default in codegen tests
Change some tests to either include reflection or to avoid using it
2016-03-09 10:25:38 +03:00
Alexander Udalov
20e36438e2 Move some tests from boxWithStdlib/ to box/
Move those tests which do not require neither stdlib nor reflect
2016-03-09 10:25:38 +03:00