Commit Graph

8 Commits

Author SHA1 Message Date
Brian Norman b2230327df [FIR] Refactor upper bound validation with better source element info
Attach source information to each argument of the type before expanding
to preserve information during validation. This allows errors to be
reported on the original argument during nested type alias expansion.

^KT-50798 Fixed
^KT-50703 Fixed
2023-05-25 11:24:17 +00:00
Mikhail Glukhikh fb9b1ad0dc K1: implement warning for upper bound violated in type alias constructors
Partially implements KT-47473
2022-09-15 08:51:46 +00:00
Denis.Zharkov b193e708d3 FIR: Refactor checkUpperBoundViolated
There just should be a different facades for cases
A<T1, T2> and foo<T1, T2>()

Test data has changed for type alias constructors since previously,
it was working by mistake because of assumption that type alias arguments
are linearly mapped to the type parameters of the corresponding constructors

^KT-50703 Open
2022-01-11 16:27:03 +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
Victor Petukhov 731e3ebae1 Rename LV ImprovementsAroundTypeEnhancement into TypeEnhancementImprovementsInStrictMode 2021-03-26 11:03:49 +03:00
Victor Petukhov 0d40022d6d Add reporting of the warnings based on Java annotations for expanded type aliases
Before that, such warnings weren't reported as the corresponding errors were reported during type inference (only original types took part there)
2021-02-15 12:13:55 +03:00
Victor Petukhov d783d99443 Use upper bound checker for typealias expansion 2021-02-15 12:13:53 +03:00
Victor Petukhov edb8007d52 Add test for errors reporting of UPPER_BOUND_VIOLATED 2021-02-15 12:13:52 +03:00