Commit Graph

4 Commits

Author SHA1 Message Date
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