Commit Graph

63 Commits

Author SHA1 Message Date
Juan Chen
4c04ad2371 FIR: Add bindings for dispatch receiver parameters
Before this commit, such descriptors have null owners, which causes problems when the getter of the owner property is called.
2019-12-27 10:13:44 +03:00
Igor Chevdar
9e17140daf [JS_IR] Turned on passing JS_IR tests 2019-12-24 15:54:45 +03:00
Anton Bannykh
9a971172c9 JS: fix object expression constructor delegation to secondary constructors with default arguments (KT-30517 fixed) 2019-12-15 15:21:23 +03:00
pyos
57760e5873 FIR: set anonymous initializers' parents 2019-11-21 15:53:52 +03:00
Mark Punzalan
9df2f69f09 [FIR] Disable failing blackbox codegen tests for FIR. 2019-11-19 11:00:09 +03:00
Igor Chevdar
f413da3e58 Turned off test for native
It fixes current JVM BE behavior but seems like this should've been a FE error.
2019-10-28 12:38:19 +03:00
Mads Ager
4b77db8979 Fix test to actually fail if expected exception is not thrown. 2019-10-21 15:05:32 +02:00
Georgy Bronnikov
1abdcf3f57 JVM_IR: support function references with default parameters 2019-10-11 13:30:30 +03:00
Mads Ager
92cf521e11 [IR] Deal with forward references in default argument lambdas.
Rely on the frontend weeding out cases that are not supported.

In psi2ir, introduce all the parameters before processing default
values.

Change the DefaultArgumentStubGenerator to generate code that
matches the behavior of the current backend.
2019-10-10 09:00:51 +02:00
Georgy Bronnikov
ce6e2621cf Unmute working tests 2019-08-04 01:35:05 +03:00
Ting-Yuan Huang
74e8c7c1c5 JVM_IR: generate default constructor
Quoted from https://kotlinlang.org/docs/reference/classes.html

"On the JVM, if all of the parameters of the primary constructor have
 default values, the compiler will generate an additional parameterless
 constructor which will use the default values. This makes it easier to
 use Kotlin with libraries such as Jackson or JPA that create class
 instances through parameterless constructors."
2019-05-30 18:53:27 +02:00
Ting-Yuan Huang
0aee2d0568 Fix signature generation for calls to enum and inner class constructors
The synthesized arguments caused the size of default value mask off by
one when it is close to the boundary of Int.SIZE, which in turn
resulted in wrong signature at call sites.
2019-05-23 12:29:57 +02:00
Igor Chevdar
c257af31f4 Added test 2019-01-31 18:19:41 +03:00
Svyatoslav Kuzmich
c92a6f9ca2 [JS IR BE] Unmute inlineClasses tests 2019-01-16 12:11:28 +03:00
Alexander Udalov
a9afee77d7 Add tests for obsolete codegen issues
#KT-8203 Obsolete
 #KT-15950 Obsolete
2019-01-08 20:43:46 +01:00
Mikhael Bogdanov
02d9c526e2 Proper resort variables on inlining lowered ir closures
Original problem is that lowered ir closures doesn't meet inliner expectations
 about captured variable position in inlining method.
 E.g.: Call 'foo(valueParam) { capturedParam }' to
  inline function 'foo' with declaration

      inline fun foo(valueParam: Foo, inlineParamWithCaptured: Bar.() ->) ....

 is reorganized through inlining to equivalent call foo(valueParam, capturedParam1, cp2 ...).
 But lowered closure for lambda parameter has totally different parameters order:

     fun loweredLambda$x(extensionReceiver, captured1, cp2..., valueParam1, vp2...)

 So before inlining lowered closure should be transformed to

     fun loweredLambda$x(extensionReceiver, valueParam1, vp2..., captured1, cp2..)

 #KT-28547 Fixed
2019-01-03 07:57:36 +01:00
Anton Bannykh
3a105debb3 [JS IR BE] fix default arguments lowering 2018-10-18 14:25:48 +03:00
Zalim Bashorov
8966e220f0 Update tests 2018-08-17 21:44:08 +03:00
Svyatoslav Kuzmich
392ad521fd [JS IR BE] Reflection support 2018-08-15 13:35:14 +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
Mikhael Bogdanov
2884d728fd Mute/unmute jvm_ir tests 2018-08-01 12:29:24 +02:00
Anton Bannykh
ac1a97ad83 JS IR: unmute tests 2018-07-11 14:49:36 +03:00
Svyatoslav Kuzmich
77ad97a39e [JS IR BE] Bridges construction 2018-07-10 14:11:09 +03:00
Anton Bannykh
07b3b66fd9 JS IR: unmute tests 2018-07-10 13:34:19 +03:00
Mikhael Bogdanov
e149cbe852 Mute failed jvm ir tests 2018-06-28 12:26:41 +02:00
Svyatoslav Scherbina
ba3411e7d7 JS IR: unmute tests 2018-06-22 13:36:47 +03:00
Anton Bannykh
6edf138460 JS IR: muted newly failing tests 2018-06-21 13:27:17 +03:00
Anton Bannykh
04a2ffc0c1 JS IR: unmute tests 2018-06-21 13:27:17 +03:00
Anton Bannykh
9039b75c25 JS IR: unmute tests 2018-06-21 13:27:17 +03:00
Anton Bannykh
96355e2732 JS IR: mute codegen box tests automatically 2018-06-09 19:15:38 +03:00
Anton Bannykh
03e46ce0ca JS: more default arguments fixes (KT-24413, KT-21968 fixed)
MPP-related:
* inherited from interfaces
* inherited body from interface
* default arguments in an interface, implemented by a class delegate
* super call of a method with default argument

Also:
* inheritance from an interface and another interface descendant (KT-21968)
* inheritance through an intermediate interface
2018-05-28 15:27:21 +03:00
Igor Chevdar
a2897a29b5 Added tests on default arguments of fake overridden functions 2018-02-19 18:39:08 +03:00
Alexey Andreev
43c6f8b9b1 JS: fix copying fun with default args from interface to abstract class
See KT-20451
2017-09-29 14:32:47 +03:00
Alexey Andreev
383e273fed In LightAnalysisModeTestGenerated skip tests ignored in JVM
When a test is marked as ignored in JVM BE (i.e. IGNORE_BACKEND: JVM)
it's ignored in LightAnalysisModeTestGenerated. This means that
this tests is expected to fail. However, often tests that fail
in JVM blackbox tests, don't fail in LAMTG, therefore it's reasonable
to skip these tests in LAMTG at all.
2017-05-29 15:30:27 +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
Mikhail Zarechenskiy
d7093db5c5 Allow to use emptyArray in annotation as argument
#KT-14236 Fixed
2017-02-07 14:07:20 +03:00
Alexey Andreev
e6b78f68cd JS: support case when class inherits method from superclass and both implements same method (but with optional parameter) from superinterface. 2017-01-12 18:12:36 +03:00
Alexander Udalov
b4051c4577 Do not generate unnecessary super-call checks for functions with defaults
Such check should only be generated for a function in an open class

 #KT-11962 Fixed
2016-12-27 16:22:12 +03:00
Zalim Bashorov
596f3364c6 Automatically mute failed tests 2016-11-09 21:41:12 +03:00
Michael Bogdanov
eaf9c2e8b0 Fix for KT-13890: IllegalAccessError when invoking protected method with default arguments
#KT-13890 Fixed
2016-10-26 12:13:20 +03:00
Alexander Udalov
16a0ddd2fb Merge boxMultiFile testData into box, delete BoxMultiFile test 2016-03-09 10:25:38 +03:00
Alexander Udalov
06a67e6602 Merge boxWithStdlib testData into box, delete BoxWithStdlib test 2016-03-09 10:25:38 +03:00
Yan Zhulanow
3fa506fd45 "Inapplicable operator modifier" and "Inapplicable infix modifier" are now errors 2016-01-26 17:21:44 +03:00
Denis Zharkov
ede4b61980 Add tests for obsolete issue
#KT-7412 Obsolete
2016-01-20 14:27:53 +03:00
Yan Zhulanow
9d1af5a17e Fix tests: "infix modifier required" and "operator modifier required" errors 2015-11-27 15:51:11 +03:00
Michael Bogdanov
7e8e4e9e1b Fix for KT-2789: NoSuchMethodError when calling trait function with default arguments that returns generic type, KT-9428 Abstract method with one parameter and one default parameter produces NoSuchMethodError, KT-9924 NoSuchMethod when replacing generic with specific type
#KT-2789 Fixed
 #KT-9428 Fixed
 #KT-9924 Fixed
2015-11-13 10:14:01 +03:00
Michael Bogdanov
0fcaaa80df Fix for KT-9140: Default parameters are passed as nulls when using indexing [ ] invocation
#KT-9140 Fixed
2015-11-06 11:46:11 +03:00
Dmitry Jemerov
4ca434da54 remove support for 'trait' keyword 2015-09-22 15:00:24 +02:00
Denis Zharkov
bae3320d52 Get rid of deprecated annotations in testData 2015-09-18 10:14:32 +03:00