Commit Graph

2797 Commits

Author SHA1 Message Date
Jinseong Jeon 9f1ecadd65 IR: more consolidation of synthetic member generation for data class. 2020-04-17 12:38:38 +03:00
Dmitriy Novozhilov 7f02d57d88 [FIR] Correctly detect super type in delegated constructor call 2020-04-17 12:37:29 +03:00
Georgy Bronnikov 41a28bde5c JVM_IR: repair synthetic accessors to fields 2020-04-16 15:08:11 +03:00
Igor Chevdar 6d86d6ccdc [box-tests] Turned on some tests on fun interfaces for JS & Native 2020-04-16 16:01:17 +05:00
Mikhail Zarechenskiy 4ffcbc0c2f [NI] Properly support UnsafeVariance annotation
#KT-38134 Fixed
 #KT-34433 Fixed
 #KT-31823 Fixed
2020-04-16 13:55:47 +03:00
Dmitry Petrov e2ee3d1d18 Unmute passing tests 2020-04-16 09:07:35 +03:00
Steven Schäfer 74791495d7 JVM IR: Box inline classes in covariant overrides (KT-30419) 2020-04-16 09:07:35 +03:00
Anton Bannykh 81798282b9 JS: support explicit SAM constructor invocation 2020-04-15 17:13:21 +03:00
Mikhail Bogdanov 1de0fbfc3a Add delegation tests for new default modes 2020-04-15 15:25:03 +02:00
Mikhail Bogdanov dda2f53993 Support JVM 8 target on Android 2020-04-15 15:25:02 +02:00
Steven Schäfer fc7d667282 Psi2Ir: Bind unbound type parameters 2020-04-15 15:32:53 +03:00
Mikhail Bogdanov 10b9ff1066 Minor. Rollback test data change
There is inconsistent behaviour between JS and JVM in case of package presence
2020-04-15 11:04:01 +02:00
Juan Chen a1e0e8b0e7 [FIR] Handle receiver types of extension methods when computing maximally specific types.
Test case (from testPrimitiveReceiver):

fun Short.foo() = 3
fun Int.foo() = 4

1::foo
2020-04-15 11:16:33 +03:00
Dmitriy Novozhilov f7dc06a772 [FIR] Approximate integer constants in lhs of callable reference 2020-04-15 11:13:01 +03:00
Mikhail Bogdanov dec93c8b49 Add ANDROID target 2020-04-14 13:53:22 +02:00
Mikhail Bogdanov b0e72f90f1 Android tests: add reflect flavor 2020-04-14 13:53:22 +02:00
Jinseong Jeon 08b91da6db FIR: fix body generation for data class's copy method 2020-04-14 11:51:30 +03:00
Mark Punzalan d4cbfcb79e [FIR] Promote numeric types during comparisons
Added support for comparing platform types. Extracted logic to convert
operator expressions to OperatorExpressionGenerator.
2020-04-14 11:51:30 +03:00
Roman Artemev 766b8bf74b [KLIB MPP] Mute broken test
- To fix this test `ExpectActualTable` has to be refactored from usage
 of descriptors to IdSignature since Wrapped and Deserialized descriptors
 for the same declaration are not equal to each other.
2020-04-14 11:12:08 +03:00
simon.ogorodnik 356e42196c [FIR2IR] Fix inner class constructor receiver parameter type 2020-04-13 20:26:19 +03:00
simon.ogorodnik 0e21ac8ed2 [FIR] Apply BAD testData changes after type parameters support 2020-04-13 20:26:18 +03:00
simon.ogorodnik 132c8ee210 [FIR] Apply GOOD testData changes after type parameters support 2020-04-13 20:26:18 +03:00
Jinseong Jeon c370b86141 IR: consolidate generation of synthetic members for data class 2020-04-13 17:30:05 +03:00
Mikhail Glukhikh 1500131eb0 [FIR2IR] Re-use applyCallArguments for IrDelegatedConstructorCall 2020-04-13 17:09:05 +03:00
Juan Chen e954aea4cc [FIR2IR] Support argument reordering of constructor calls 2020-04-13 17:09:04 +03:00
Juan Chen bae41ddf6d [FIR2IR] Introduce IrBlock for reordering arguments if needed 2020-04-13 17:09:03 +03:00
Georgy Bronnikov 9ccda31189 IR: deal with conflicting variances in computeSubstitutedSyntheticAccessor 2020-04-13 14:34:57 +03:00
Mikhail Glukhikh e1c78b31a6 [FIR2IR] Convert explicit receiver in advance 2020-04-10 14:49:27 +03:00
Dmitry Petrov f42d9eefa1 KT-30330 Support KotlinNothingValueException in JVM 2020-04-10 08:47:03 +03:00
Alexander Udalov e533545c29 Minor, ignore codegen test for JDK 6 2020-04-09 16:50:13 +02:00
Mikhail Glukhikh c597e3e87f Unmute additional FIR black box tests after rebasing 2020-04-09 15:22:57 +03:00
Mikhail Glukhikh cd5a4900e6 [FIR] Support dispatch & extension receiver in component calls 2020-04-09 15:22:56 +03:00
Mikhail Glukhikh a93c7a39e0 [FIR] Provide object [dispatch] && callable reference receivers properly 2020-04-09 15:22:56 +03:00
Mikhail Glukhikh 14731527ed [FIR] Don't store class functions in local scope 2020-04-09 15:22:55 +03:00
Mikhail Glukhikh 19d0d42b9e Mute three failing FIR black box tests 2020-04-09 15:22:55 +03:00
Mikhail Glukhikh 5c758af0a6 [FIR] Use ScopeSession from resolve transformer in FIR2IR 2020-04-09 15:22:55 +03:00
Ilmir Usmanov f775ac8825 Move legacy assert tests to launcher
since they are broken on JDK 11: they change Field.modifiers, which is prohibited
since JDK 9, because this private field is not exported.
Thus, we need to split the test into two: one with assertions enabled and the other
one with them disabled. Also, we need to run them in separate processes, for them
not to interfere each other.
 #KT-27176 Fixed
2020-04-09 14:10:31 +02:00
Alexander Udalov 7652117e3d Minor, ignore test on adapted function references for Android 2020-04-09 12:50:21 +02:00
Alexander Udalov 683489687e Fix NPE in KCallable.isAccessible for interfaces loaded by boot class loader
Class.getClassLoader returns null for classes loaded by the system class
loader (the one used to start the application). In this case we need to
use ClassLoader.getSystemClassLoader. We already have an extension
`safeClassLoader` specifically for this purpose in reflection.jvm, but
forgot to use it in d59f2bcc80.

 #KT-37707 Fixed
2020-04-09 12:35:28 +02:00
Mikhail Zarechenskiy a7b959b88b Fix delegated property resolve with intermediate ID provideDelegate
#KT-37406 Fixed
2020-04-09 13:34:29 +03:00
Mikhail Bogdanov 6e1af0caee Minor. Update test data 2020-04-09 07:49:30 +02:00
Mikhail Bogdanov b787c8c011 Support jvm default methods in IR
Fix several bugs around DefaultImpls
2020-04-09 07:37:32 +02:00
Mikhail Bogdanov a3f930d2e4 Support bridges in interfaces for default methods 2020-04-09 07:37:32 +02:00
Mikhail Bogdanov 93b915c77a Support accessors for private methods for default methods 2020-04-09 07:37:31 +02:00
Mikhael Bogdanov 0c0bd67a6b Add new tests 2020-04-09 07:37:30 +02:00
Alexander Udalov 9f758b4f25 Support toString for AdaptedFunctionReference subclasses
Also make it serializable like other lambdas, suspend lambdas and normal
callable references.
2020-04-08 19:16:38 +02:00
Alexander Udalov fa879e667f Add some tests on adapted references with varargs and reflection
Also rename "varargAndDefaults" test directory to "adaptedReferences"
2020-04-08 19:15:40 +02:00
Alexander Udalov 0681231e99 Introduce AdaptedFunctionReference runtime class
It's used as a superclass for anonymous classes for adapted function
references. Its main feature is that it _doesn't_ inherit from KFunction
(as opposed to FunctionReference), as per the decision to postpone
reflection support for adapted function references in KT-36024.

 #KT-36024 Fixed
2020-04-08 19:15:38 +02:00
Dmitry Petrov d1c5a42124 KT-36024 Generate adapted callable references as lambdas
Make sure both JVM and JVM_IR use the same information to determine
whether a callable reference requires argument adaptation.
2020-04-08 19:02:33 +02:00
Dmitry Petrov ddf7f53118 Add more tests on inline class boxing in covariant overrides 2020-04-08 19:56:26 +03:00