Commit Graph

14 Commits

Author SHA1 Message Date
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
Mikhail Glukhikh bc47a30dd3 [FIR] Handle 'EnhancedNullability' more properly
This commit includes three changes:
1. 'EnhancedNullability' is no more set for declaration types
2. It is no more used for conversion types in translator
3. Translator inserts implicit not-null cast only when enhanced type is cast to not-null type.
2020-11-10 21:07:27 +03:00
Jinseong Jeon 46cc01602e FIR2IR: add implicit NOT_NULL cast if needed 2020-10-22 10:51:20 +03:00
Mikhail Glukhikh a7da0d5080 [FIR] Approximate exotic return types for public declarations 2020-09-03 14:24:31 +03:00
Mikhail Glukhikh a545ec41a0 FIR serializer: consider exotic types as errors (breaks 4 BB tests) 2020-04-28 07:35:09 +03:00
Dmitry Petrov 4cf8203ce7 PSI2IR: Unify behavior for lambda return values with old back-end
See KT-35849.

1. When expected lambda return type is a type parameter, don't generate
introduce implicit casts (even if the corresponding type parameter has
an upper bound that would otherwise require such cast).

2. Do not generate implicit null check for lambda return value of
@EnhancedNullability type.
2020-01-10 15:23:33 +03:00
Steven Schäfer 929fb5c82b Mute FIR tests containing broken function calls 2020-01-08 13:20:00 +01:00
Dmitry Petrov 89e1941dfd Update testData for argument nullability assertion tests 2019-12-06 11:03:06 +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
Mark Punzalan 9df2f69f09 [FIR] Disable failing blackbox codegen tests for FIR. 2019-11-19 11:00:09 +03:00
Mikhael Bogdanov a4206a543a Skip test on JDK 6 2018-10-22 16:32:55 +02:00
Mikhael Bogdanov e149cbe852 Mute failed jvm ir tests 2018-06-28 12:26:41 +02:00
Dmitry Petrov 42945d33ee Use !LANGUAGE directive in tests for enhanced nullability 2017-10-25 12:30:32 +03:00
Dmitry Petrov 706a3698ec Add box tests for new nullability assertions 2017-10-25 12:30:32 +03:00