Commit Graph

59 Commits

Author SHA1 Message Date
simon.ogorodnik 99b2a4745a [FIR2IR] Fix superQualifier in case of composed super type ref 2020-05-29 21:10:56 +03:00
Denis Zharkov 5bb0085f7e FIR: Fix test data after adba0a03a6 2020-05-27 10:29:46 +03:00
Juan Chen adba0a03a6 [FIR] Create builtin primitive array types for properties
If the primary constructor has a vararg parameter, the corresponding
property has an array type. This commit creates the builtin array
types for such properties if the vararg element type is primitive,
e.g., CharArray instead of Array.
2020-05-26 14:08:47 +03:00
Mikhail Glukhikh e7e80be34a [FIR2IR] Populate overridden symbols even for !isOverride
Before this commit we considered !isOverride as a sign that
function / field / accessor has no overridden symbols.
However, it's false for deserialized, because isOverride
is always false there.

This commit fixes 68 BB tests but breaks 25 BB tests (not yet muted)
2020-05-14 13:40:36 +03:00
Mikhail Glukhikh 38fc4d0f1f FIR: set & use dispatch receiver for q. access with super reference 2020-05-07 12:02:57 +03:00
Jinseong Jeon 7b01cf7b04 FIR: handle labeled super reference properly 2020-05-07 12:02:56 +03:00
Jinseong Jeon ef09850df8 FIR2IR: set superQualifierSymbol for super call 2020-04-27 11:50:26 +03:00
Juan Chen e954aea4cc [FIR2IR] Support argument reordering of constructor calls 2020-04-13 17:09:04 +03:00
Mikhail Glukhikh 5c758af0a6 [FIR] Use ScopeSession from resolve transformer in FIR2IR 2020-04-09 15:22:55 +03:00
Mikhail Glukhikh 697006d782 [FIR2IR] Re-use receiver application logic in callable ref conversion 2020-03-30 16:23:10 +03:00
Jinseong Jeon de0c9a5c73 FIR: use dispatch receiver of the enclosing function if any. 2020-03-25 08:27:21 +03:00
Mikhail Glukhikh 03143bc788 [FIR2IR] Implement mapping of FIR & IR built-in class members 2020-03-24 12:15:18 +03:00
Mikhail Glukhikh cfa626ad77 FIR2IR: introduce conversion scope, remove dispatch receiver for lambdas 2020-03-04 16:55:31 +03:00
Alexander Udalov 15ff74209c JVM IR: do not resolve fake override in InterfaceSuperCallsLowering
This leads to problems after 4dd794c2d2, because the immediate super
function's DefaultImpls and the implementation's DefaultImpls have
differing type parameters.

Looks like resolveFakeOverride was used here (maybe unintentionally) as
a workaround to the problem caused by the incorrect origin check in
isDefinitelyNotDefaultImplsMethod.
2020-02-10 16:08:10 +01:00
Mikhail Glukhikh b09b2673bf FIR2IR: handle non-ambiguous super references properly 2020-02-05 11:19:20 +03:00
Mikhail Glukhikh 71b0840ef9 [FIR] Implement super resolve as a particular tower resolver case 2020-02-05 11:19:19 +03:00
Juan Chen 188abc243a [FIR] add vararg arguments support, improve vararg parameters support 2020-01-31 16:41:25 +03:00
pyos 498b41b148 JVM_IR: do not do invokeinterface on Object methods
This works on HotSpot, but might confuse other VMs.
2019-12-11 15:09:37 +01:00
Mark Punzalan 9df2f69f09 [FIR] Disable failing blackbox codegen tests for FIR. 2019-11-19 11:00:09 +03:00
Ting-Yuan Huang 1c3b895fc0 Generate accessors for super calls if necessary
Current implementation of calls with super qualifier relies on
invokespecial, which has some more constraints than regular virtual
invocations. When those constraints aren't met, accessors are needed.
2019-05-10 08:57:37 +02:00
Dmitry Petrov 8be7f7f1f7 IR: Make sure that symbols refer to original descriptors only
If a descriptor is a WrappedDeclarationDescriptor, it SHOULD NOT be
substituted.
2019-03-29 16:00:56 +03:00
Alexander Udalov 8b395589be JVM IR: fix incorrect IR types in inner and enum class lowerings
In InnerClassesLowering, the type of the "outer$0" expression should be
the outer class, not the inner class. In EnumClassLowering, the type of
the enum entry is the type of its class or the type of the enum class,
but not the type of initialierExpression which is always Unit
2019-02-07 21:25:59 +01:00
Mikhael Bogdanov 6aaa601239 Add tests for obsolete issues
#KT-21085 Obsolete
 #KT-13846 Obsolete
2019-02-07 11:39:48 +01:00
Roman Artemev f3758771c9 Update tests 2019-01-25 17:17:16 +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
Svyatoslav Kuzmich 4c38d55f21 [JS IR BE] Unmute tests 2018-10-15 00:03:45 +03:00
Anton Bannykh 2e709a81fa [JS IR BE] Arrays, varargs 2018-09-18 14:36:20 +03:00
Georgy Bronnikov 433afcd669 JVM_IR. Mute failing tests 2018-09-14 03:12:23 +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 06b16a6459 Unmute ir-tests after prev commit 2018-08-09 14:22:46 +03:00
Mikhael Bogdanov 6c41f078a6 Mute jvm ir box tests 2018-08-02 13:19:28 +02: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 96355e2732 JS IR: mute codegen box tests automatically 2018-06-09 19:15:38 +03:00
Mikhael Bogdanov 2fa4c28e0f Properly reorder arguments in anonymous object super class constructor
#KT-18356 Fixed
2017-09-07 15:18:05 +02:00
Dmitry Petrov b81ca31aae Record resolved delegation call for primary ctor if single result
Do the same thing as for secondary constructor (looks like it was a
workaround for R&I bug that was used only for secondary constructors
for some reason).

 #KT-17464 Fixed Target versions 1.1.5
2017-07-27 09:24:48 +03:00
Ilya Matveev eda43c8b45 Mute tests with standard collection extensions in native 2017-03-10 19:59:37 +03:00
Ilya Gorbunov 38840bb529 Do not reference java.util in tests that run on JS backend. 2016-11-21 18:20:33 +03:00
Michael Bogdanov 5bd045c79c Fix for KT-14243: Wrong invocation descriptor on calling implicitly generated implementation in class
#KT-14243 Fixed
2016-10-10 14:17:50 +03:00
Alexey Andreev 3e11209d8a KT-11030 Borrow test for local classes from JVM backend 2016-04-20 17:49:03 +03:00
Alexey Andreev a4db14eff5 [KT-4124] Add tests for qualified labeled super access to functions and properties 2016-02-20 15:19:31 +03:00
Alexey Andreev 9238afc439 [KT-4124] Fix some tests from common testData 2016-02-20 15:19:29 +03:00
Alexey Andreev c705fafc95 [KT-4124] Add support for super<T>@Outer.functionName() case 2016-02-20 15:19:25 +03:00
Denis Zharkov f0e3fd617d Adjust testData to CharSequence.length transformation 2015-10-14 20:39:35 +03:00
Dmitry Petrov 7e9e427d4c Java 8 rules for method overrides:
- report errors on implementing methods of Any in interfaces
- update testData

~~~

Java 8 override restrictions: interface can't implement a method of 'Any'
- update compiler sources
2015-10-12 14:12:31 +03:00
Mikhail Glukhikh 2fee9d362c Local interfaces are forbidden now 2015-10-09 21:06:33 +03:00
Dmitry Petrov b59bf6227f unqualified super: should be able to invoke methods of Any without extra hassle
when Any is an implicit immediate superclass
2015-08-12 12:14:14 +03:00
dnpetrov 046189087a KT-5963 Call to super shouldn't require type specification if there is no conflict
Implemented unqualified 'super' type resolution (in BasicExpressionTypingVisitor).

No overload resolution of any kind is involved.
Corresponding supertype is determined by the expected member name only:
- 'super.foo(...)' - function or property (of possibly callable type) 'foo'
- 'super.x' - property 'x'
Supertype should provide a non-abstract implementation of such member.
As a fall-back solution for diagnostics purposes, consider supertypes with abstract implementation of such member.

Diagnostics:
- AMBIGUOUS_SUPER on 'super', if multiple possible supertypes are available;
- ABSTRACT_SUPER_CALL on selector expression, if the only available implementation is abstract.

#KT-5963 Fixed
2015-06-18 14:16:34 +03:00