Commit Graph

167 Commits

Author SHA1 Message Date
Mikhael Bogdanov c6b4bae81f Move 'bytecodeText' java 8 tests to common 2018-10-23 16:27:50 +02:00
Mikhael Bogdanov 4284c19a16 Move 'writeFlags' java 8 tests to common 2018-10-23 16:27:50 +02:00
Mikhael Bogdanov edc648813d Regenerate box tests 2018-10-22 16:32:52 +02:00
Denis Zharkov 3bdfd811e8 Add some new String methods in JDK 11 to built-ins mapping blacklist
These three methods are conflicting with existing extensions,
thus the behavior might be changed when switching to JDK 11

Probably, it's worth revisiting our strategy here,
e.g. by blacklisting all new methods in

 #KT-24974 Fixed
2018-08-31 10:33:09 +03:00
Mikhael Bogdanov ca5b19d0c6 Merge Java 8 write signature tests in common ones 2018-08-27 15:55:03 +02:00
Alexander Udalov 1c2a9e4b21 Map annotation target TYPE -> TYPE_USE if JVM target >= 1.8
And TYPE_PARAMETER -> TYPE_PARAMETER similarly

 #KT-23857 Fixed
2018-08-21 12:38:05 +02:00
Alexander Udalov 5da8ce844a Minor, move ContentRoot and KotlinSourceRoot to module 'cli'
Also move CONTENT_ROOTS from JVMConfigurationKeys to
CLIConfigurationKeys since it's used on all platforms, not just JVM
2018-08-07 13:38:30 +02:00
Alexander Udalov 1464a4ac58 Load Java parameter names correctly in BinaryJavaMethod
PSI-based implementation (accessible via
`-Xuse-old-class-files-reading`) loads parameter names from the
"MethodParameters" attribute if it's present, so our own implementation
should as well.

This metadata doesn't seem supported in the java.lang.model.element API
though, so SymbolBasedValueParameter (which is used in `-Xuse-javac`)
will continue to have incorrect behavior for now

 #KT-25193 Fixed
2018-07-18 18:15:09 +02:00
Alexander Udalov 873e1b01d6 Merge and improve tests on Java parameter metadata in reflection 2018-07-18 18:15:08 +02:00
Alexander Udalov 959c2f4843 Get rid of split packages in descriptors, descriptors.jvm, deserialization
Also move some other files to related packages and reformat moved files
2018-07-06 14:08:35 +02:00
Roman Artemev c887b88ed9 Fix coroutine test generator 2018-07-02 15:35:02 +03:00
Alexander Udalov e689733f69 Revert "Map Kotlin TYPE target to Java TYPE_USE in bytecode"
This reverts commit d122406dca.

See KT-23857

 #KT-24952 Fixed
2018-06-19 12:08:18 +02:00
Mikhael Bogdanov a0060dd25b Generate synthetic method for @JvmDefault properties in DefaultImpls 2018-06-08 10:08:23 +02:00
Mikhael Bogdanov ad717d5335 Support properties in compatibility mode 2018-05-29 15:08:07 +02:00
Mikhael Bogdanov 689a492b9a Minor. Fix test data 2018-05-29 12:47:07 +02:00
Mikhael Bogdanov 60f2dbeb8a Support property accessor in compatibility mode 2018-05-29 09:29:48 +02:00
Mikhael Bogdanov 340920fe38 Support compatibility mode for @JvmDefault 2018-05-28 22:15:45 +02:00
Alexander Udalov d122406dca Map Kotlin TYPE target to Java TYPE_USE in bytecode
And TYPE_PARAMETER -> TYPE_PARAMETER similarly

 #KT-23857 Fixed
2018-05-24 14:41:22 +02:00
Ilmir Usmanov f60787d57c Move coroutines to kotlin.coroutines package: tests
Introduce COMMON_COROUTINES_TEST directive.
Every test with this directive is run twice: one time with
language version 1.2 and kotlin.coroutines.experimental package
and the other time with language version 1.3 and kotlin.coroutines
package. Each run is a separate method: with suffixes _1_2 and _1_3
respectively.
However, since codegen of release coroutines is not supported in JS
backend, we generate only one method: with suffix _1_2.
 #KT-23362
2018-04-23 21:51:59 +03:00
Zalim Bashorov ab03ab84bb Regenerate tests 2018-04-19 13:17:27 +03:00
Zalim Bashorov 4227d8e73a Remove accidentally left test classes: BytecodeTextTestGenerated and JsTypedArraysBoxTestGenerated 2018-04-19 13:17:22 +03:00
Mikhael Bogdanov 2a8041e77e Check method abstractness during bridge generation per method not interface 2018-04-03 19:18:14 +02:00
Mikhael Bogdanov f290b325ee Remove @JvmDefault members from delegation 2018-04-03 19:18:14 +02:00
Mikhael Bogdanov d84a15c0f6 Support inline for private @JvmDefault members 2018-04-03 19:18:13 +02:00
Mikhael Bogdanov 308283e52e Support synthetic accessors for @JvmDefault members 2018-04-03 19:18:12 +02:00
Mikhael Bogdanov fe45eb2a81 Initial support of @JvmDefault 2018-04-03 19:18:09 +02:00
Zalim Bashorov 9970dd051f Fix copyright's start year in generated tests 2018-03-14 15:04:58 +03:00
Mikaël Peltier e1f44d6237 Move tests to the right place 2018-02-09 09:10:53 +03:00
Mikaël Peltier 9274241c0e KT-22714 Avoid to generate unecessary checkcast
- StackValue already avoid to generate checkcast from a type or an
array to java.lang.Object. Add a new case to avoid to generate a
checkcast from an array to an array of java.lang.Object when arrays
have the same dimensions.

Fix of https://youtrack.jetbrains.com/issue/KT-22714
2018-02-09 09:10:53 +03:00
Denis Zharkov 88a23c73c7 Ignore @Nullable annotation for vararg parameter
See the comment in code for clarification

 #KT-19786 Fixed
2018-02-08 13:36:10 +03:00
Mikhael Bogdanov ad48099ca6 Move java 8 tests to java8 folder 2018-02-06 10:32:14 +01:00
Dmitry Jemerov e80dae1802 Update copyright in generated tests 2018-01-10 11:55:28 +01:00
Mikhael Bogdanov c9d0ab38cf Generate proper java parameter names for DefaultImpls
#KT-21919 Fixed
2017-12-22 10:02:04 +01:00
Mikhael Bogdanov a547019ed0 Switch DEFAULT_METHOD_CALL_FROM_JAVA6_TARGET according to LL 2017-11-17 13:48:44 +01:00
Alexander Udalov d26486b7df Move JvmRuntimeDescriptorLoaderTest to core/descriptors.runtime/tests
This allows to get rid of the dependency on descriptors.runtime from
compiler/IDE tests which is problematic: classes there clash with the
classes in kotlin-reflect, which reference declarations in shadowed
packages
2017-11-10 18:58:31 +01:00
Alexander Udalov 3ead2e9cd4 Use KotlinCoreEnvironment.createForTests in test code
createForProduction creates and caches JavaCoreApplicationEnvironment
instance, which can alter behavior of subsequent tests
2017-11-03 14:03:02 +01:00
Alexander Udalov dddd1cdba5 Use JUnit 3 + KtUsefulTestCase instead of JUnit 4 in compiler tests
This is needed because KtUsefulTestCase performs useful cleanup at the
end of the test (namely, resets ApplicationManager#ourApplication to
null)
2017-11-03 14:03:02 +01:00
Alexander Udalov b43b470b8f Move Java 8 tests generator to tests-java8, run it in "Generate Compiler Tests" 2017-11-02 17:13:05 +01:00
Denis Zharkov da52716bfd Fix wrong nullability enhancement for annotated java.lang.Object type
Effectively, this commit drops cached value for j.l.Object type
This cache was introduced when types were immutable, but they
became mutable after starting reading top-level TYPE_USE annotations,
that lead to changing shared JAVA_LANG_OBJECT_CLASSIFIER_TYPE instance

 #KT-20826 Fixed
2017-10-20 09:43:38 +03:00
Denis Zharkov 13bf35f48e Make TYPE_USE default qualifiers overriding all other applicabilities
If there is default qualifier with TYPE_USE closer than one with METHOD
then its nullability should be considered even when enhancing return type

 #KT-20016 Fixed
2017-09-29 10:01:04 +03:00
Denis Zharkov d6ee774243 Load some of the TYPE_USE annotations in fast class reading mode
Only top-level types on fields, methods' return types and
value parameters are supported to catch-up how class-files are loaded
in IntelliJ (see IDEA-153093)

NB: this commit also affects
ForeignJava8AnnotationsNoAnnotationInClasspathWithFastClassReadingTestGenerated
that were failing before

 #KT-20016 Fixed
2017-09-26 16:40:47 +03:00
Denis Zharkov fd9025a4fb Add Java8 foreign-annotations tests without jsr305.jar in the classpath
Some of them are expected to fail since neither IntelliJ class reading
nor our fast class reading can read annotations on type arguments
2017-09-26 16:40:47 +03:00
Denis Zharkov 71f85812d6 Improve support for TYPE_USE default qualifiers
- Apply default qualifiers to type arguments if they contain TYPE_USE
in applicability list
- Read TYPE_USE placed default qualifier annotations

 #KT-19592 Fixed
 #KT-20016 In Progress
2017-09-26 16:40:47 +03:00
Denis Zharkov 02d3d9785c Move JSR-305 tests to one directory and strip common name prefix 2017-09-26 16:40:47 +03:00
baratynskiy 67fdd9f76e javac-wrapper: fixes after rebase and review 2017-08-29 18:01:36 +03:00
baratynskiy 01883a41cb javac-wrapper: refactoring, fixes and tests 2017-08-29 18:01:36 +03:00
Alexander Udalov 770441c212 Merge "diagnostic with Java 8" tests with general diagnostic tests 2017-08-17 13:15:18 +03:00
Alexander Udalov 7601666ec0 Minor, remove unused AbstractDiagnosticsWithFullJdkTest 2017-08-17 12:35:55 +03:00
Denis Zharkov e26c210d69 Support TypeQualifierDefault from JSR 305 for nullability qualifiers
#KT-10942 Fixed
2017-07-03 17:55:37 +03:00
Mikhael Bogdanov 69457ef3f1 Generate optimized hashCode for primitive type with jvmTarget 1.8+
#KT-7571 Fixed
2017-06-28 13:44:07 +02:00