Commit Graph

8 Commits

Author SHA1 Message Date
pyos
9182f2c796 IR: don't attempt to move defaults to actual in another module
May happen when a function in an `expect` class is aliased through an
`actual typealias`; the matching declaration is filtered out in
`ExpectedActualResolver.findActualForExpected` as it has no source.
2019-11-18 18:41:21 +01:00
Alexander Udalov
c67517cb2b JVM IR: use fast class reading mode in boxAgainstJava tests
annotationsViaActualTypeAliasFromBinary.kt is ignored because
ExpectActualRemover can't find actual for the expected constructor of
Anno now, because `ExpectedActualResolver.findActualForExpected`
incorrectly filters out actual declarations without any source file, and
Java classes loaded in the fast mode don't have any source files.

This will need to be fixed separately, probably by making
ExpectedActualResolver look for the actual class of an expected class
member first (with source file-based filtering), and then
unconditionally locating the corresponding member there
2019-06-11 15:26:07 +02:00
Steven Schäfer
3f4c5c8d53 Resolve type aliases when looking for default arguments to actual methods.
Change-Id: I059093c1af32fcd7a2de36c25160c352d6f03a3c
2019-03-14 14:59:34 +01:00
Mikhael Bogdanov
dd59deb977 Mute failed test 2019-03-12 13:33:35 +01:00
Alexander Udalov
c357967c2c JVM IR: generate Kotlin metadata
Introduce MetadataSource as a way to store the original descriptor for
any element (before any lowerings) and maintain it until the end of the
codegen where it's used in generating the metadata. Note that JVM
signatures written to the metadata are formed from the _resulting_
generated elements, not by mapping the original descriptors.

Some corner cases are not supported yet, namely properties declared in
companion objects, synthetic methods for property annotations,
JvmPackageName, etc.

 #KT-29119 Fixed
2019-02-19 16:37:47 +01:00
Alexander Udalov
5c807266f6 JVM IR: fix origin of file class in FileClassLowering
IrDeclarationOrigin.FILE_CLASS is used in CallableReferenceLowering to
generate correct declaration owner.

Many reflection tests start to fail with this commit because they are
now treating callable references to top level declarations as Kotlin
symbols and fail because there's no JVM signature for them; this is
fixed in subsequent commits (previously, they worked because without
Kotlin metadata, these files were treated as Java classes)
2019-02-07 21:23:02 +01:00
Georgy Bronnikov
c3352d5fdb Unmute several tests, mute one 2019-01-17 23:46:26 +03:00
Alexander Udalov
8ab9226805 Fix loading default Java annotation values in actual typealias from binary classes
#KT-22704 Fixed
2018-12-28 13:02:15 +01:00