Commit Graph

95 Commits

Author SHA1 Message Date
Mikhael Bogdanov afc149d460 JvmDefault. Allow non default inheritance with special flag
#KT-47000
2021-11-01 13:30:57 +01:00
pyos 1c3a20fab9 JVM_IR: generate $suspendImpl in interfaces as public
The visibility was the cause of KT-44533; not generating `$suspendImpl`
at all makes `super` calls impossible.

^KT-49106 Fixed
2021-10-06 15:03:51 +02:00
Mikhael Bogdanov 72ab6d5e7e Add test for obsolete (fixed in IR) KT-42967
#KT-42967 Fixed
2021-09-21 12:41:07 +02:00
Alexander Udalov 0c3f2eefe0 Migrate bytecodeListing tests to new test infrastructure 2021-04-23 17:58:16 +02:00
Denis.Zharkov 5cbfb172a4 Ignore new FIR box test on android 2021-04-01 14:52:05 +03:00
Denis.Zharkov d685e2aac7 FIR2IR: Fix inheritance case from built-in interface with default methods 2021-04-01 12:11:37 +03:00
Mikhael Bogdanov 66a29c70bf Use compatibility accessors only in compatibility stubs 2021-03-10 09:09:10 +00:00
Mikhael Bogdanov efceb89b98 Don't generate private members in compatibility mode in DefaultImpls 2021-03-10 09:09:09 +00:00
Mikhael Bogdanov f648d86d2b Generate stubs for private function with default arguments as public in interfaces 2021-03-10 09:09:08 +00:00
Mikhael Bogdanov 77559e8299 Temporary mute reflection test on Android 2021-03-01 18:05:27 +01:00
Mikhael Bogdanov 49aa36b70d Generate local delegated properties in interface in jvm-default all modes 2021-03-01 16:20:20 +01:00
Mikhael Bogdanov c25a694b6b Generate private suspend functions as private (not synthetic package-private)
#KT-26592 Fixed
2021-03-01 16:20:19 +01:00
Mikhael Bogdanov ad8eddac99 Add test for private suspend and JVM defaults 2021-03-01 16:20:19 +01:00
Alexander Udalov acd8c4503b Do not generate $suspendImpl for JvmDefault functions in interfaces
#KT-44533 Fixed
2021-02-03 21:37:58 +01:00
Dmitriy Novozhilov 64a300bfcd [TD] Update testdata according to previous commit 2021-02-02 17:53:52 +03:00
Mikhael Bogdanov b16b1b3b78 Test for obsolete KT-26360
#KT-26360
2021-01-28 18:01:21 +01:00
Dmitriy Novozhilov 6a7cd0c811 [Test] Add ability to specify applicability of diagnostic to module or file 2021-01-22 13:51:19 +03:00
Alexander Udalov 7b5544ebd3 Use -source/target 1.6 for Java sources in codegen tests
In cases when the test has the JVM_TARGET directive, use that one for
Java compilation as well.

Otherwise, for box tests, the corresponding test in `JvmTarget6OnJvm6`
(module `:compiler:tests-different-jdk`) will fail. However, it affects
all codegen tests, so fix a bunch of them which use Java 8+ features to
explicitly compile with JVM target 1.8. In particular, this obsoletes
the SKIP_JDK6 directive in those tests because "JVM_TARGET: 1.8" also
skips it for JDK 6.

The check for IS_SOURCE_6_STILL_SUPPORTED is needed in order to still be
able to run tests in the project while only having a single JDK > 11
installed, and having all of the env vars JDK_16, JDK_17, JDK_18
pointing to that JDK.
2020-11-18 18:43:43 +01:00
Denis Zharkov c6f46598ca Set TARGET_BACKEND to JVM for failing irrelevant tests 2020-11-16 22:20:44 +03:00
Denis Zharkov 4c9a4548f2 FIR: Fix overrides binding for Java inheritor
`overriddenMembers` contract requires original (non-enhanced) function
See other usages

Ignored tests have been working accidentally

^KT-43289 Open
2020-11-16 15:50:39 +03:00
Alexander Udalov 116606ecd2 JVM IR: fix class kind of created java.lang.Deprecated symbol
If it isn't ANNOTATION_CLASS, the newly added code in
`FunctionCodegen.isDeprecatedHidden` (0e91d3fcb0) ends up transforming
IR annotation constructor calls to annotation descriptors, and an
assertion fails in `IrBasedDeclarationDescriptor.toAnnotationDescriptor`
which checks that the class has kind ANNOTATION_CLASS.

Specifically, this failed in the JVM IR bootstrap on
`CallResolutionInterceptorExtension.interceptCandidates` from module
'frontend'.
2020-11-11 12:53:32 +01:00
Mikhail Glukhikh d3e85dbce0 [FIR] Implement replacing Object with type parameters for specials builtins
#KT-42601 Fixed
2020-10-23 08:12:15 +03:00
Mikhael Bogdanov b6dc99b98e Skip java defaults in EXPLICIT_OVERRIDE_REQUIRED_IN_MIXED_MODE check
#KT-42674 Fixed
2020-10-15 16:26:00 +02:00
Mikhail Glukhikh ec93e5886a [FIR2IR] Fix generation of accessors' extension receiver (f/o case) 2020-09-11 11:43:00 +03:00
Mikhail Glukhikh 53ad502d2a [FIR2IR] Generate fake overrides earlier and bind them later
Before this commit, we generated fake overrides at last FIR2IR stage,
after having all functions and classes built. This could lead to a
situation when fake override was called before it was generated.
This commit fixes this situation.
2020-08-25 10:00:26 +03:00
Mikhael Bogdanov 607f99ed3c Don't generate implicit overrides delegating to Java defaults
#KT-40920 Fixed
2020-08-10 20:03:23 +02:00
Mikhail Glukhikh f1356a809e Fir2IrLazySimpleFunction: generate overridden symbols via FirTypeScope 2020-08-05 12:11:33 +03:00
Dmitry Petrov 980b91d082 JVM: generate 'Deprecated' on method as runtime-visible annotation
We generate @java.lang.Deprecated annotation on methods of $DefaultImpls
classes in compatibility mode. This annotation has RUNTIME retention and
should be visible.

Also, get rid of representing annotations as Class'es (yes we know that
these annotations are in compiler CLASSPATH, but we should not rely on
such classes and associated information).
2020-07-28 18:19:20 +03:00
Steven Schäfer 9d63412b3e JVM IR: Produce correct generic signatures for special bridge methods 2020-07-27 17:02:24 +02:00
Mikhail Glukhikh c4d41f48a3 [IR] Allow Fir2Ir symbols in function factory 2020-06-29 16:08:12 +03:00
Mikhail Glukhikh 90f9b9c1c9 [FIR2IR] Unmute 6 fixed BB tests 2020-06-29 16:08:09 +03:00
Mikhail Glukhikh 0622be14a5 [FIR2IR] Introduce creation of Fir2Ir lazy classes 2020-06-23 19:06:07 +03:00
Mikhail Bogdanov 9c0b96af71 Report error on missed specialization in compatibility mode
#KT-39603 Fixed
2020-06-19 11:57:36 +02:00
Jinseong Jeon ab2a2b3a87 FIR2IR: eager conversion of annotations in Library class and members 2020-06-11 10:57:51 +03:00
Alexander Udalov fc1217ba07 Generate delegates to DefaultImpls in fun interface wrappers
#KT-37436 Fixed
2020-06-09 11:44:31 +02:00
simon.ogorodnik 99b2a4745a [FIR2IR] Fix superQualifier in case of composed super type ref 2020-05-29 21:10:56 +03:00
Mikhail Glukhikh cdac6157a9 [FIR2IR] Force loading Java SAM from external classes 2020-05-14 14:07:40 +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 30e5748fec FIR: set proper visibility of property accessors. 2020-05-12 19:47:37 +03:00
Jinseong Jeon eac9af521e [FIR2IR] differentiate external Java stub origin from external stub 2020-05-08 17:45:39 +03:00
Mikhail Glukhikh f3e2dbf360 [FIR2IR] Add conversion of function annotations 2020-05-08 17:30:19 +03:00
Jinseong Jeon ef09850df8 FIR2IR: set superQualifierSymbol for super call 2020-04-27 11:50:26 +03:00
Jinseong Jeon 57fe01c375 FIR2IR: populate overriddenSymbols for overriding functions
#KT-38416 Fixed
2020-04-27 11:50:24 +03:00
Mikhail Bogdanov 1de0fbfc3a Add delegation tests for new default modes 2020-04-15 15:25:03 +02:00
Mikhail Bogdanov dda2f53993 Support JVM 8 target on Android 2020-04-15 15:25:02 +02:00
Mikhail Glukhikh e1c78b31a6 [FIR2IR] Convert explicit receiver in advance 2020-04-10 14:49:27 +03:00
Mikhail Glukhikh c597e3e87f Unmute additional FIR black box tests after rebasing 2020-04-09 15:22:57 +03:00
Mikhail Glukhikh a93c7a39e0 [FIR] Provide object [dispatch] && callable reference receivers properly 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 Bogdanov 6e1af0caee Minor. Update test data 2020-04-09 07:49:30 +02:00