Jinseong Jeon
44c34ab8c3
[FIR2IR] Don't create fake overrides for private property accessors
2020-04-02 12:43:06 +03:00
Jinseong Jeon
3e6b38a921
[FIR] Fix type reference for 1st arg of GetClassCall
2020-04-02 12:42:50 +03:00
Denis Zharkov
9abe669443
FIR: Fix resolution for invokes on class qualifiers
2020-04-02 12:10:50 +03:00
Mikhail Glukhikh
ffc22f4190
[FIR] Unmute two passing black box tests
2020-04-02 10:28:07 +03:00
Dmitry Petrov
24b8495e00
KT-30419 Box inline classes in return types of covariant overrides
...
Use boxed version of an inline class in return type position for
covariant and generic-specialized overrides.
Also fixes KT-35234 and KT-31585.
2020-04-01 22:59:14 +03:00
Alexander Udalov
e44f12d7b0
Minor, unmute passing FIR black box tests
2020-04-01 19:33:45 +02:00
Mathias Quintero
34a64d9171
Making var arg kParameters default to empty array no argument given
...
fixes KT-29969
2020-04-01 16:00:16 +02:00
Alexander Udalov
3269a7e693
Change behavior of equals/hashCode on adapted function references
...
Function references are now equal if they refer to the same function,
and if the parameter/return type adaptation, which happens when a
reference is used where some function type is expected, is exactly the
same. This includes the number of expected positional parameters (which
can be affected by defaults/varargs), whether the coercion of vararg
parameter to Array type happened, and whether the coercion of return
type to Unit happened.
#KT-37543 Fixed
2020-04-01 14:18:49 +02:00
Mikhail Glukhikh
630adb34db
[FIR] Don't provide receiver as value in delegated constructor call
2020-03-31 20:28:24 +03:00
Mikhail Glukhikh
a377a6fccb
[FIR2IR] Handle references to constructors separately
2020-03-31 20:27:40 +03:00
Mikhail Glukhikh
282509b0da
[FIR2IR] Provide object receivers for callable references
2020-03-31 20:27:24 +03:00
Mikhail Zarechenskiy
38a719cb22
[NI] Fix trace manipulations for builder inference and ::-expressions
...
For a class literal Type::class we are resolving Type as a constructor,
getting all diagnostics (about missing arguments, for example) and then
just not committing this trace with errors
#KT-37626 Fixed
2020-03-31 15:50:58 +03:00
Jinseong Jeon
ff104f4037
[FIR2IR] Set proper visibility of backing fields
2020-03-31 13:12:36 +03:00
Dmitry Petrov
4ade669b9b
Minor: unmute 2 tests fixed in FIR
2020-03-30 21:10:59 +03:00
Pavel Punegov
d0e28d7c8d
Ignore Java-sepcific test in Native
2020-03-30 18:31:50 +03:00
Dmitry Petrov
cec64a2ec7
KT-37861 'this' is uninitialized in constructor default parameters
2020-03-30 17:23:15 +03:00
Jinseong Jeon
078cf02c8a
FIR: Provide dispatch receiver for 'field' according to property type
2020-03-30 16:57:53 +03:00
Mikhail Glukhikh
a0978a50e8
[FIR2IR] Correct 'this' conversion when it points to non-closest class
2020-03-30 16:57:52 +03:00
Jinseong Jeon
4388b30f87
[FIR] Fix anonymous object handling as 'this' receiver
2020-03-30 16:57:52 +03:00
Mikhail Glukhikh
d1fc6ff6ee
[FIR2IR] Don't provide backing field symbols for non-Java property refs
2020-03-30 16:23:11 +03:00
Mikhail Glukhikh
d4ae992417
[FIR] Apply type arguments for callable references
2020-03-30 16:23:11 +03:00
Mikhail Glukhikh
810b607a65
[FIR2IR] Provide receivers also for property callable references
2020-03-30 16:23:10 +03:00
Mikhail Glukhikh
697006d782
[FIR2IR] Re-use receiver application logic in callable ref conversion
2020-03-30 16:23:10 +03:00
Juan Chen
d8539fdde9
[FIR2IR] Add dispatch & extension receivers to callable references
2020-03-30 16:23:10 +03:00
Igor Chevdar
90abf1fda0
[JS_IR] Don't capture the bound receiver of a CR
2020-03-28 15:26:19 +03:00
Dmitry Petrov
042424d599
KT-27524 Don't box (some) inline classes in suspend fun return
...
If an inline class is mapped to a reference type (or an array), it's Ok
to treat JVM view on a suspend function as returning a value of
corresponding inline class (although in reality it returns 'Any?'
because of COROUTINE_SUSPENDED).
2020-03-27 18:29:36 +03:00
Steven Schäfer
58685be4e2
IR: Don't use IrStringConcatenation for ordinary toString calls
...
We can only use IrStrinConcatentation to represent calls to Any?.toString
and toString calls on primitive types. Otherwise, x.toString() and "$x"
are observably different when x is a non-null type with null value
(e.g., an @NotNull value coming from Java).
2020-03-27 17:31:48 +03:00
Mikhail Glukhikh
b27152f903
Replace some FIR syntax errors with more proper diagnostics
2020-03-27 16:46:59 +03:00
Roman Artemev
6e01ec8dd3
[IR] Fix translation of synthetic generic java properties
...
- Compute substituted accessor descriptor to avoid unbound type parameters
2020-03-27 10:52:33 +03:00
Pavel Punegov
ad20deb0b3
Ignore Java-sepcific test in Native
2020-03-26 13:26:17 +03:00
Juan Chen
aba7706dec
[FIR] fix test module set up (this fixes 193 BB tests)
...
Added creation and initialization of the test module and its dependencies.
When looking at the emptyProgression test,
I found that getProgressionLastElement was not found,
which should be resolved from the dependencies.
2020-03-26 10:30:47 +03:00
Jinseong Jeon
cdf5a2a5a1
FIR: set dispatch receiver parameter for inner class's constructor.
2020-03-25 12:40:09 +03:00
Jinseong Jeon
acbe3126b1
FIR: consider all functions in scope when computing dispatch receiver parameter.
2020-03-25 09:20:07 +03:00
Jinseong Jeon
de0c9a5c73
FIR: use dispatch receiver of the enclosing function if any.
2020-03-25 08:27:21 +03:00
simon.ogorodnik
59393e06f0
[FIR-test] Mute tests with bad test-data
2020-03-24 18:58:19 +03:00
simon.ogorodnik
f83c20065d
[FIR-test] Unmute passing tests, mostly fir2ir
2020-03-24 18:58:19 +03:00
simon.ogorodnik
0acca52001
[FIR-Test] Unmute blackbox test
2020-03-24 18:58:18 +03:00
Mikhail Glukhikh
03143bc788
[FIR2IR] Implement mapping of FIR & IR built-in class members
2020-03-24 12:15:18 +03:00
Dmitry Petrov
afacb4b4b2
KT-37604 Use proper type when generating constructor call
2020-03-24 11:31:47 +03:00
Mikhail Glukhikh
a4c7619c89
[FIR2IR] Introduce & use FirBuiltInsPackageFragment
...
Without this commit, JVM name mapping logic in BE does not work for FIR,
because FIR cannot use old BuiltInsPackageFragmentImpl descriptor.
In this commit we add our own implementation thus fixing
a pack of FIR black box tests.
2020-03-24 10:37:53 +03:00
Mikhail Zarechenskiy
191fb02bf6
[NI] Consider intersection type with number type as Nothing
...
Currently, only for "in": In<in Int & A> == In<in Nothing> == In<*>
#KT-37302 Fixed
2020-03-23 16:39:21 +03:00
Mikhail Glukhikh
ca22e05acd
[FIR2IR] Support safe calls
2020-03-23 15:13:50 +03:00
Jinseong Jeon
e46a4246d2
FIR: regard property accessor without body as FirDefaultPropertyAccessor
2020-03-23 15:12:54 +03:00
pyos
ac6036f366
JVM_IR: move state machine generation to ClassCodegen
2020-03-23 12:23:17 +01:00
Georgy Bronnikov
4742057b51
IR: generate lambdas in place in Psi2Ir
...
even when arguments are to be rearranged.
Lambdas have no side effects, and storing them in temporary variables
prevents processing in the backend
(such as inserting continuation parameter in AddContinuationLowering).
2020-03-23 11:09:30 +03:00
Dmitriy Novozhilov
6ce8d661ad
[FIR] Add nullability to ILT. #KT-37639 Fixed
2020-03-20 23:11:28 +03:00
Dmitriy Novozhilov
5f9f01fe4e
[FIR] Implement new completion mode calculator
...
Note that `testDelegates` now fails due to KT-37638 and
`testSimpleIn` fails due to problems with type parameters
of inner classes
2020-03-20 23:11:28 +03:00
Mikhail Glukhikh
9836520287
[FIR2IR] Generate synthetic bodies for Enum.values() and valueOf()
2020-03-20 11:55:34 +03:00
Mikhail Glukhikh
94fe79578e
[FIR2IR] Generate unconditional branch in exhaustive whens
2020-03-20 11:55:34 +03:00
Mikhail Bogdanov
bc214868ef
Minor. Clean tests
2020-03-19 16:45:10 +01:00