Commit Graph

10 Commits

Author SHA1 Message Date
Anastasia.Nekrasova 93ebd83ecd [K2] Disappeared OPT_IN_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_OPT_IN (4)
Added checking usages of markers as qualifiers in properties and function calls.

^KT-59998
2023-11-07 13:12:46 +00:00
Anastasia.Nekrasova 72d69e16c4 [K2] Disappeared OPT_IN_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_OPT_IN (3)
Added checking usages of markers as qualifiers in imports.

^KT-59998
2023-11-07 13:12:46 +00:00
Anastasia.Nekrasova 97f09acc92 [K2] Disappeared OPT_IN_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_OPT_IN (2)
Added checking usages of markers as qualifiers.

KT-59998
2023-11-07 13:12:46 +00:00
Mikhail Glukhikh fc6403679a Rename !USE_EXPERIMENTAL test directive to !OPT_IN 2021-09-10 16:29:16 +03:00
Mikhail Glukhikh 3febabe977 Use OPT_IN instead of EXPERIMENTAL in diagnostic names 2021-09-10 16:29:13 +03:00
Mikhail Glukhikh d8d38862d9 Introduce EXPERIMENTAL_ANNOTATION_WITH_WRONG_RETENTION diagnostic
#KT-22941 Fixed
2021-06-08 11:37:27 +03:00
Alexander Udalov f954a6c812 Support custom message in RequiresOptIn
#KT-34648 Fixed
2020-01-14 21:04:43 +01:00
Alexander Udalov 7742a3b697 Rename UseExperimental->OptIn, Experimental->RequiresOptIn in compiler tests 2020-01-14 21:04:42 +01:00
Alexander Udalov 143c3ccb95 Disallow usages of experimental markers as qualifiers
Only allow explicit imports of markers, but not of nested classes
declared in them
2018-05-07 11:37:31 +02:00
Alexander Udalov 9995438b37 Forbid non-intended usages of Experimental and markers
Experimental and UseExperimental can only be used as annotations or
qualifiers (to allow "Experimental.Level.*"); experimental markers can
only be used as annotations or qualifiers, or as left-hand side of a
::class literal in arguments to UseExperimental/WasExperimental.

This is needed because we're not yet sure of the design of this feature
and would like to retain the possibility to drop these declarations
(Experimental, UseExperimental) altogether. If they were going to be
used as types, it would be problematic because we can't simply delete
something from stdlib, should deprecate it first. With this change,
these declarations can only be used if the user has opted into using the
experimental API somehow (for example, with
`-Xuse-experimental=kotlin.Experimental`), so we won't stop conforming
to our deprecation policy if we decide to remove these declarations in
the future
2018-05-07 11:37:31 +02:00