Commit Graph

27 Commits

Author SHA1 Message Date
Mikhail Glukhikh 6f0eeecc64 [FIR2IR] Fix generation of type arguments of delegated constructor calls 2020-06-09 11:40:26 +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
Jinseong Jeon a084c5bf7d FIR2IR: populate overriddenSymbols for overriding properties 2020-04-30 12:25:48 +03:00
Jinseong Jeon 57fe01c375 FIR2IR: populate overriddenSymbols for overriding functions
#KT-38416 Fixed
2020-04-27 11:50:24 +03:00
Mikhail Glukhikh 00fedbf6b3 [FIR2IR] Distinguish 'parent' & 'thisReceiver' for fake overrides 2020-04-09 15:22:56 +03:00
Mikhail Glukhikh 5c758af0a6 [FIR] Use ScopeSession from resolve transformer in FIR2IR 2020-04-09 15:22:55 +03:00
Mikhail Glukhikh 096dc25701 FIR: change callableId of fake overrides to derived class owner 2020-02-28 15:29:02 +03:00
Mikhail Glukhikh db7401d8eb FIR2IR: set GET_PROPERTY origin for property reads 2020-02-28 15:29:01 +03:00
Mikhail Glukhikh 3a3d6e740c FIR2IR: correctly set type parameters of property accessors
In particular, we generate different type parameters for
getters & setters here.
2020-02-28 15:29:01 +03:00
Mikhail Glukhikh d1fac6dce1 FIR2IR: declare receivers for all accessors of extension properties
Before this commit, extension receivers were declared only for
properties with container source, which is strange & inconsistent.
Now we declare accessor extension receiver iff corresponding property
has extension receiver.
2020-02-25 12:13:42 +03:00
Mikhail Glukhikh 67668d798b FIR2IR: update test data 2020-02-11 23:22:55 +03:00
Juan Chen 8e35545e10 FIR2IR: provide type arguments for class 'this' receiver 2020-02-11 22:50:06 +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
simon.ogorodnik 5e426fdc71 [FIR] Optimization & checking fix: remove usage of dispatchReceiverValue 2019-12-27 13:45:59 +03:00
Denis Zharkov b8984d154b FIR: Do not copy type parameters from class to constructors
Use the same instances from class declaration instead

Otherwise, primary constructor value parameter types when used
in the class body are considered as different from types
based on the class type parameters

See the test genericConstructors.kt, before this commit
"id" call was reported in inapplicable
2019-12-05 13:08:51 +03:00
Dmitry Petrov cb1b9c2ccf IR testData: IrSimpleFunction.isOperator 2019-11-29 13:53:05 +03:00
Mark Punzalan 5afab1ac2b [FIR] FIR2IR: Populate calls with type arguments and function type
parameters with bounds/supertypes.
2019-11-25 09:37:47 +03:00
Dmitry Petrov 82c527c2cc IR: IrProperty.isFakeOverride 2019-11-01 14:55:10 +03:00
Dmitry Petrov 2682057767 IR tests: update testData for IrSimpleFunction.isFakeOverride 2019-11-01 14:55:09 +03:00
Mikhail Glukhikh 5386cfe254 FIR2IR: support fake overridden properties 2019-09-05 16:26:14 +03:00
Mikhail Glukhikh bd5e1aeef5 FIR2IR: change backing field visibility to private 2019-08-30 11:47:32 +03:00
Mikhail Glukhikh 0d5cfa97a5 FIR2IR: read & set dispatch & extension receivers
NB: this commit includes receiver-based assertions yet failing for some tests
2019-08-30 11:47:31 +03:00
Dmitry Petrov bdec8b04e8 Minor: trim in RenderIrElementVisitor 2019-07-31 10:37:35 +03:00
Steven Schäfer 90c3269502 Fix type parameters in WrappedClassConstructorDescriptor
IrConstructorCall gets type parameters from the class in addition to the
constructor declaration. This behavior is already implemented for
ClassConstructorDescriptorImpl, but was not implemented for
WrappedClassConstructorDescriptor, leading to missing type arguments for calls
to constructors generated in a lowering pass.
2019-05-16 20:26:18 +02:00
Mikhail Glukhikh 5262f0a53f Fir2Ir: apply major text data update after a bunch of resolve changes 2019-04-30 18:45:57 +03:00
Dmitry Petrov b78d1bb2b9 IrConstructorCall support in JVM_IR, JS_IR, and FIR2IR 2019-04-26 17:43:25 +03:00
Mikhail Glukhikh 881073b1c9 Add basic FIR -> IR converter with a set of text tests
Tests duplicate IrTextTestCaseGenerated
#KT-24065 Fixed
2019-04-05 16:18:58 +03:00