Commit Graph

30 Commits

Author SHA1 Message Date
Dmitriy Novozhilov cc4f72e032 [FIR] Capture type from type parameter upper bound when needed 2020-09-29 10:17:43 +03:00
Jinseong Jeon ab2a2b3a87 FIR2IR: eager conversion of annotations in Library class and members 2020-06-11 10:57:51 +03:00
Jinseong Jeon 89c87f941f FIR: consider the absence of type arguments when constructing GetClassCall type 2020-06-05 17:00:17 +03:00
Mikhail Glukhikh 0ce47f2f12 [FIR TEST] Mute 2 BB tests broken by 0d6e3093 2020-06-04 16:34:39 +03:00
Vitaly fe047f9b47 [JS BE] mutes tests for JS_IR_ES6, which muted for JS_IR 2020-05-27 00:32:56 +03:00
Jinseong Jeon 3e6b38a921 [FIR] Fix type reference for 1st arg of GetClassCall 2020-04-02 12:42:50 +03:00
Mikhail Glukhikh 8231377f6b FIR2IR: convert qualifiers inside getClass properly 2020-03-11 16:01:57 +03:00
Juan Chen 4f6fe1d0ca [FIR]: fix translation of top-level property accesses like array.indices
This commit addresses the following issues:

* accessors didn't take into account their property's receiver type,
which caused NoSuchMethod due to signature mismatch. Now the property's
receiver type is passed to Fir2Ir translation of accessors.

* property's parent was not class, e.g., kotlin.collections.indices.
Now the symbol table collects WrappedPropertyDescriptorWithContainerSource
besides WrappedFunctionDescriptorWithContainerSource, so that
facade classes for such properties can be generated before codegen.

* accessor's parent was not class. Now the containerSource of
the property descriptor is passed to accessor descriptor.
2020-02-25 12:13:42 +03:00
Juan Chen 573188bdc4 [FIR2IR]: fix translation of this references in instance methods
Currently FirThisReceiverExpression of instance methods are translated
to references of the class' thisReceiver,
not the method's dispatch receiver,
which causes problems with IrFrameMap::typeOf,
as the class' thisReceiver is not in the typeMap.

This commit translates non-qualified "this" references of
instance methods to references of the methods' dispatch receiver.
2020-01-10 10:43:07 +03:00
Mark Punzalan 9df2f69f09 [FIR] Disable failing blackbox codegen tests for FIR. 2019-11-19 11:00:09 +03:00
Alexander Udalov f38e4d618e Support Array::class literal, forbid Array<X>::class on non-JVM
#KT-31230 Fixed
2019-07-16 15:57:26 +02:00
Mikhael Bogdanov 1217d3591b Specify JVM target backend for test with '::class.java' usage 2018-12-21 16:09:04 +01:00
Roman Artemev 0e7520fde3 [JS IR BE] Fix GetClass on primitive type 2018-11-01 16:51:44 +03:00
Anton Bannykh 2e709a81fa [JS IR BE] Arrays, varargs 2018-09-18 14:36:20 +03:00
Pavel Punegov 2ff6047845 Update ignore tag for Native backend 2018-08-28 13:48:43 +03:00
Svyatoslav Kuzmich 392ad521fd [JS IR BE] Reflection support 2018-08-15 13:35:14 +03:00
Mikhael Bogdanov 357359b1dd Unmute ir-tests after CR support 2018-08-09 14:22:50 +03:00
Mikhael Bogdanov e149cbe852 Mute failed jvm ir tests 2018-06-28 12:26:41 +02:00
Anton Bannykh 96355e2732 JS IR: mute codegen box tests automatically 2018-06-09 19:15:38 +03:00
Alexander Udalov 3a807cb39b Support Void.TYPE as underlying Class object for KClass
#KT-20875 Fixed
2017-12-18 11:57:05 +01:00
Ilya Matveev 29e5ad5abe Mute tests with '::class' in native backend 2017-03-10 19:59:37 +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
Alexey Andreev ef38761dc2 JS: unmute now passing tests and mute test that passed by accident. 2017-03-07 10:46:09 +03:00
Alexander Udalov ba84338862 Support smart cast for nullability in LHS of class literal
#KT-16291 Fixed
2017-02-15 20:43:25 +03:00
Zalim Bashorov 596f3364c6 Automatically mute failed tests 2016-11-09 21:41:12 +03:00
Alexander Udalov 22f8e7db3b Use independent context to type-check LHS of '::'
#KT-13110 Fixed
2016-09-15 16:45:48 +03:00
Alexander Udalov 5b1ee13db8 Make KClasses for primitives equal to KClasses for wrapper types
Both primitive int and wrapper type java.lang.Integer are represented by the
single type kotlin.Int in Kotlin, so inequality between the corresponding
KClasses was confusing here. To keep the old behavior, one may call 'k1.java ==
k2.java' instead of `k1 == k2`

 #KT-13462 Fixed
2016-08-15 19:41:47 +03:00
Alexander Udalov 0ea885ce58 Move tests on KClass.java* to box/classLiteral/java
Also replace WITH_REFLECT to WITH_RUNTIME to test that these cases correctly
work without reflection in the classpath
2016-07-26 13:48:19 +03:00
Alexander Udalov 70e01fac18 Fix class literals of objects in super constructor calls
In an expression such as "Obj::class" where Obj is an object, it's fine to
consider Obj either an expression or a type and generate either
Obj.INSTANCE.getClass() or Obj.class correspondingly. However,
the former fails in the object's super constructor call because the INSTANCE
field is not yet initialized. Thus, we force generation of Obj.class in case
when Obj is an object.

Note that this has been reproduced in our project, see
KotlinMetadataVersionIndex
2016-07-26 13:47:34 +03:00
Alexander Udalov 495ed13fce Implement codegen for bound class reference expressions
- Inline the usage of ExpressionCodegen#generateClassLiteralReference into
  ClosureCodegen, simplify
- Support DoubleColonLHS.Expression in generateClassLiteralReference
- Substantially simplify KClass.java intrinsic by reusing
  generateClassLiteralReference

 #KT-13075 Fixed
 #KT-12995 In Progress
2016-07-26 13:47:33 +03:00