Commit Graph

130 Commits

Author SHA1 Message Date
Victor Petukhov 43e9c1223a Take into account possible passed old captured type in isCapturedTypeFromSubtyping check
^KT-48590 Fixed
2021-10-26 19:37:55 +03:00
Dmitry Petrov 3d64c91375 PSI2IR KT-49053 skip fake overrides with unresolved types in signature 2021-10-06 16:23:08 +03:00
Svyatoslav Kuzmich c88cde2f8b [Wasm] DONT_TARGET_WASM_BACKEND => IGNORE_BACKEND in testdata 2021-10-02 06:14:35 +00:00
Svyatoslav Kuzmich ab9a23cbfa [Wasm][Stdlib] Reuse K/N collections and StringBuilder 2021-10-01 17:18:49 +03:00
pyos 8ff79e002e FIR: load parents of Java inner classes first, as before 2021-09-14 19:00:44 +03:00
Denis.Zharkov c23de2dae8 FIR: Unignore test on StrictJavaNullabilityAssertions
^KT-48302 Fixed
2021-08-31 15:41:18 +03:00
Mikhail Glukhikh bbb76aae3f Provide more precise check for ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTED
#KT-47542 Fixed
2021-08-24 12:32:30 +03:00
Denis.Zharkov a8077aebb0 FIR: Ignore suspicious test on StrictJavaNullabilityAssertions
^KT-48302 Open
2021-08-17 21:38:01 +03:00
Mikhael Bogdanov 235359e028 Ignore tests cause of KT-47542
#KT-47542
2021-07-29 19:45:54 +02:00
Mikhael Bogdanov 7cbd6908f9 Update test affected by ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated feature 2021-07-29 19:45:53 +02:00
Denis.Zharkov 4892ad42b9 FIR: Do not mark not found classes' based types from Java as error
The same happens in FE1.0
2021-06-24 12:17:45 +03:00
Mark Punzalan 21a3a14289 FIR: Use intersection of all upper bounds for parameterized types in
ConeKotlinType.canBeNull.

^KT-45903 In progress
2021-04-14 19:17:10 +03:00
Denis.Zharkov 1f074326bf FIR: Fix Java scope in case of accessor with getter signature from supertype
^KT-45584 Fixed
2021-03-31 15:57:02 +03:00
Dmitriy Novozhilov e00e726bcb [FIR] Add test for KT-45584 2021-03-24 12:56:17 +03:00
Dmitriy Novozhilov f4afc2ef44 [FIR] Map dispatch receiver type of function in JvmMappedScope 2021-03-24 12:56:16 +03:00
Vasily Levchenko 0324ee508e [testData][compiler] disable tests KT4282{4,5} for native backend 2021-02-24 11:07:16 +01:00
Pavel Punegov 4643f12a5f Ignore JVM test in Native backend 2021-02-21 11:11:46 +03:00
Mikhail Glukhikh 94e613dd01 FIR: support custom annotation-based type attributes 2021-01-23 10:56:42 +03:00
Dmitriy Novozhilov 6a7cd0c811 [Test] Add ability to specify applicability of diagnostic to module or file 2021-01-22 13:51:19 +03:00
Denis.Zharkov 5f0d00a83f FIR: Use proper tower data contexts for postponed callable references
E.g., it should contain local scopes of containing lambdas
2021-01-21 18:53:03 +03:00
Denis.Zharkov acbf382d04 FIR: Add test on ambiguous vararg
Fix is in the two previous commits
2020-12-28 13:19:23 +03:00
Dmitry Petrov 4e261cc358 JVM_IR KT-24258 fix NPE message for delegated properties 2020-12-23 21:50:10 +03:00
Dmitry Petrov 443cd0fc2c Tests for issues fixed in JVM_IR 2020-12-22 16:07:06 +03:00
Jinseong Jeon f7ade2b0b8 FIR2IR: introduce implicit casts for extension receivers 2020-12-15 11:52:49 +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
Jinseong Jeon 4cb32cd38a FIR2IR: add implicit NOT_NULL cast for @FlexibleNullability type 2020-11-18 13:06:48 +03:00
Mikhail Glukhikh f2f00a4654 Fix BB test to work on JDK 6 2020-11-11 12:00:18 +03: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
Mikhail Glukhikh f8e03786c0 Mute not relevant JS/WASM back ends for new BB tests 2020-11-10 21:07:09 +03:00
Juan Chen 9486f58fb1 [FIR] fix subtyping for definitely notnull types.
The current implementation doesn't consider Foo a subtype of Captured<in
Foo>!!, since AbstractTypeCheckerContext::checkSubtypeForSpecialCases
does not handle DefinitelyNotNullType cases. This PR adds handling of
DefinitelyNotNullType by looking at its original type.

^KT-42824 Fixed
2020-11-10 21:07:09 +03:00
Juan Chen eb804709da [FIR] fix subtyping for nullable captured types.
The issue is the type checker doesn't consider P? a subtype of
CapturedType<in P>?, whereas P a subtype of CapturedType<in P>?. In
AbstractTypeCheckerContext::checkSubtypeForSpecialCases, it checks if
P? is a subtype of the lower type of the captured type, which is
P, and returns false.

This fix uses nullable version of the lower type when the captured
type is marked nullable. To check if P? is a subtype of Captured<in
P>?, we check the LHS, P?, against the nullable lower type of RHS,
P?.

^KT-42825 Fixed
2020-11-10 21:07:09 +03:00
Dmitry Petrov 785466acee Minor: add '// JVM_TARGET: 1.8' 2020-11-10 06:48:07 +03:00
Svyatoslav Kuzmich fdd7fa5aea [Wasm] Mute codegen box tests 2020-11-09 16:04:43 +03:00
Dmitry Petrov b9c6267a63 KT-43217 Encode @EnhancedNullability types in IdSignature 2020-11-09 15:20:46 +03:00
Steven Schäfer bd4e2a283c JVM IR: Don't generate null checks on value parameters of private operator functions
The null check on the extension receiver of private operator functions
is a special case and doesn't extend to value parameters.
2020-11-03 21:44:25 +01:00
Jinseong Jeon 46cc01602e FIR2IR: add implicit NOT_NULL cast if needed 2020-10-22 10:51:20 +03:00
Dmitry Petrov 0b34526321 JVM_IR remove lambda hack required for odd JVM+OI behavior in KT-35849 2020-10-21 13:47:01 +03:00
Dmitry Petrov 3979cde738 Add box and PSI2IR tests for special cases listed in KT-35849 2020-10-20 19:31:40 +03:00
Mikhail Glukhikh b64b32e06b FIR: keep captured types in substitution scope 2020-09-23 09:00:57 +03:00
Mikhail Glukhikh e1b4108e4a [FIR2IR] Mute some tests due to captured type problems 2020-09-14 18:08:30 +03:00
Steven Schäfer 44ffb1fb3e Psi2Ir: Fix SAM conversion with new inference 2020-09-08 11:14:14 +03:00
Mikhail Glukhikh a7da0d5080 [FIR] Approximate exotic return types for public declarations 2020-09-03 14:24:31 +03:00
Mikhail Glukhikh 23e83e8933 FirClassSubstitutionScope: don't recreate type parameters for unbound f/o 2020-09-03 14:24:30 +03:00
Mikhail Glukhikh 85c1505689 [FIR2IR] Copy type parameters for trivial fake overrides 2020-08-20 16:04:02 +03:00
Dmitriy Novozhilov 29849b1330 [FIR] Resolve rhs of += in dependent context 2020-07-08 12:13:31 +03:00
Dmitriy Novozhilov 624b9306f0 [FIR] Resolve LHS of type operator call in independent context
#KT-39046 Fixed
2020-07-02 15:10:51 +03:00
Mikhail Glukhikh c4d41f48a3 [IR] Allow Fir2Ir symbols in function factory 2020-06-29 16:08:12 +03:00
Mikhail Glukhikh d08f91bf35 [FIR2IR] Introduce & use lazy function for external class functions 2020-06-23 19:06:08 +03:00
Mikhail Zarechenskiy a067d138e9 Enable test for new inference after df1595e4
Follow up KT-37149
2020-06-18 12:41:27 +03:00
Georgy Bronnikov c015463926 IR: remove field fake overrides 2020-06-17 20:02:26 +03:00