Kirill Rakhman
eae72eac54
[FIR] Fix substitution of Java arrays enhanced for warning
...
... w.r.t the variance of their type arguments.
Because `Object[]` is represented as `Array<Any>..Array<out Any>?`,
when we substitute, we can't just take the upper bound because it
changes the variance of the type agument.
Instead, we construct a flexible type and use both bounds, like with
collections with flexible mutability.
#KT-65246 Fixed
2024-02-15 10:48:56 +00:00
Kirill Rakhman
9e72482f09
[FIR] Fix infinite loop in attribute substitution
...
#KT-65318 Fixed
2024-01-31 08:55:22 +00:00
Kirill Rakhman
31256e259e
[FIR] Fix lower bound of flexible type variable not becoming DNN in warning-severity case
...
The bug was introduced as part of the implementation for Java
nullability warnings.
#KT-58933 Fixed
2023-11-24 11:00:10 +00:00
Mikhail Glukhikh
1eacd5efc2
K1/K2: support org.jspecify.annotations.NonNull in Java interop
...
#KT-62352 Fixed
2023-11-16 11:13:44 +00:00
Kirill Rakhman
a63ec9efdc
[FIR] Implement warnings for java nullability upper bound violation
2023-11-15 08:43:55 +00:00
Kirill Rakhman
2df1e9dde6
[FIR] Implement warnings for java nullability type mismatch on override
...
#KT-56989
2023-11-15 08:43:55 +00:00
Kirill Rakhman
a6fdeeb7df
[FIR] Implement warnings for java nullability type mismatch
...
#KT-56989
2023-11-15 08:43:55 +00:00
Denis.Zharkov
c3ac2e44a0
Adjust test data for enabling ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated
...
^KT-55388 Fixed
2023-05-15 10:43:19 +00:00
Kevin Bourrillion
2694bdeb92
Change to use new JSpecify package location.
2022-12-27 11:10:59 +00:00
Denis.Zharkov
cd0d6d2773
Adjust test data for postponing ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated
...
^KT-55357 Related
^KT-36770 Related
2022-12-12 11:39:04 +00:00
Ilya Chernikov
bb996c1b27
Switch kotlin version to 1.8
...
with appropriate fixes in testdata, tests and other
places.
2022-06-29 10:20:30 +02:00
Vladimir Dolzhenko
918a91dbdf
Escape special names with backticks in test data
...
#KT-51248
2022-02-10 21:20:47 +00:00
Victor Petukhov
e0a4704c21
Revert "Make freshly substituted type variables def not nullable if they come from not null type parameter"
...
This reverts commit 41936a790b37bef45d7e7dad851856ea1750ef01.
2021-10-26 19:37:58 +03:00
Victor Petukhov
836c6b280d
Make freshly substituted type variables def not nullable if they come from not null type parameter
...
^KT-48778 Fixed
2021-10-26 19:37:57 +03:00
Victor Petukhov
b957831683
Use WarningAwareUpperBoundChecker independently
...
^KT-47920 Fixed
^KT-48290 Fixed
2021-09-30 20:08:58 +03:00
Denis.Zharkov
f7ef551f99
Report warnings on overrides with wrong types nullability
...
^KT-48899 Fixed
2021-09-30 14:36:26 +03:00
pyos
94402ba488
FE: prefer enhancements for errors over enhancements for warnings
2021-09-08 16:54:17 +03:00
pyos
8f699248f1
FE: force flexibility on unannotated ?
...
TODO: unify this code with FIR
#KT-48515 Fixed
2021-09-08 16:54:17 +03:00
pyos
afa1d18cc2
FE: in NullMarked scope, enhance T! to at least T
...
#KT-44436 Fixed
2021-09-08 16:54:17 +03:00
pyos
9bb7a29baa
FIR: disregard enhancements for warnings
...
Warnings are not implemented yet, so don't produce errors either.
2021-09-06 13:11:16 +03:00
pyos
2847de10ac
FIR: enhance Java super types
2021-09-06 13:11:09 +03:00
pyos
03304bce96
FIR: enhance Java type parameter bounds
...
This also fixes handling of self-recursive types.
TODO: fix jspecify/{strict,warn}Mode/Captured.fir.kt
2021-09-06 13:11:08 +03:00
pyos
e2a48d3945
FIR: use frontend-independent Java type qualifier computation
2021-09-06 13:11:07 +03:00
pyos
5704dffdbe
FIR: attach annotations to Java-converted cone types
2021-09-06 13:11:03 +03:00
pyos
5355d04553
FIR: enhance in/out-variant type arguments
2021-09-06 13:11:03 +03:00
pyos
8e122397b0
FIR: fix type index computation during enhancement
...
1. in/out type parameters count;
2. star projections take up 1 space in the tree.
2021-09-06 13:11:02 +03:00
Denis.Zharkov
4a9d4ed9fe
Enable ProhibitUsingNullableTypeParameterAgainstNotNullAnnotated since 1.7
...
^KT-36770 Fixed
2021-08-31 15:41:17 +03:00
pyos
47d0211370
FE: do not enhance ? in jspecify NullMarked scope
...
No clue whether this should be done for `@TypeQualifierDefault` since it
appears to have no specification whatsoever.
#KT-48262 Fixed
2021-08-18 16:41:00 +03:00
pyos
33251f6d50
Generate foreign annotation test data for FIR
2021-08-10 13:19:23 +03:00
pyos
e2e0358505
Remove "FIR" foreign annotation tests
...
They do not actually use FIR.
2021-08-10 13:19:21 +03:00
Victor Petukhov
3eaa452f9e
Take into account SimpleTypeWithEnhancement and subtyping related places
...
^KT-47854 Fixed
2021-08-04 17:36:50 +03:00
Mikhael Bogdanov
cdbd0eb932
Reopen KT-47920 test and add missed .txt files
...
#KT-47920 Open
2021-07-29 19:52:59 +02:00
Victor Petukhov
f84adcb378
[FE 1.0] Fix some foreign annotation tests
2021-07-29 19:45:56 +02:00
pyos
c401582770
FE: do not wrap types with enhancements if they're the same
2021-07-29 14:52:51 +03:00
Victor Petukhov
5684b6977a
Do preparation of enhancement as well (for types with enhancement), during subtype checks
...
^KT-47899 Fixed
2021-07-29 14:23:56 +03:00
Victor Petukhov
f9cb0d61a8
Don't apply Java defaulting nullability annotations rules to unbounded wildcards
...
^KT-47396 Fixed
2021-07-29 14:23:53 +03:00
Victor Petukhov
99491014e4
Prefer flexible nullability by Java annotations to nullable one if the corresponding type parameter has nullable bound
...
^KT-47422 Fixed
2021-07-29 14:23:52 +03:00
Victor Petukhov
6cfb1f40d6
Specify jspecify mode explicitly for warnings in tests
2021-07-06 09:54:32 +03:00
Victor Petukhov
b78c645fb0
Report warnings by enhanced base types
2021-05-18 17:52:39 +03:00
Victor Petukhov
fd6475c804
Update tests
2021-05-18 17:52:19 +03:00
Victor Petukhov
8602d1fcf0
Merge foreign annotation tests for sources and binaries into single directory
2021-05-18 17:52:16 +03:00
Victor Petukhov
df2c95e444
[Jspecify] Use bounds of type parameters for warnings reporting as well
2021-05-18 17:52:14 +03:00
Victor Petukhov
0c4cba549d
[Jspecify] Use arguments of enhancement of type instead of arguments of base type during getting enhancement of type deeply
2021-05-18 17:52:12 +03:00
Victor Petukhov
21dada4d2d
[Jspecify] Use enhancement of type with enhancement if possible during substitution
2021-05-18 17:52:10 +03:00
Victor Petukhov
12f6146bdf
[Jspecify] Substitute enhancement of type instead of type itself directly
2021-05-18 17:52:09 +03:00
Victor Petukhov
2479655708
[Jspecify] Do preserving flexibility when adding equality constraints by taking into account type with enhancement
2021-05-18 17:52:07 +03:00
Victor Petukhov
937e82db46
[Jspecify] Report warnings on violated bounds of method type parameters
2021-05-18 17:52:06 +03:00
Victor Petukhov
e93133a28f
Implement jspecify marks processing in the tests properly, by adding specific handler and cleanuper
2021-04-30 14:43:27 +03:00
Victor Petukhov
6f9694174f
Move foreign annotation tests into diagnostics folder
2021-04-30 14:43:25 +03:00