Introduce annotation InlineExposed to indicate internal members effectively public due to usage in inlined functions.

Currently, doesn't affect anything.

Make collectionSizeOrDefault and collectionSizeOrNull internal, but expose them via inlining together with mapCapacity.

Make Regex(Pattern) constructor exposed by inlined Pattern.toRegex
This commit is contained in:
Ilya Gorbunov
2016-01-30 07:21:06 +03:00
parent dacf25fdec
commit dccae6c3ff
17 changed files with 145 additions and 62 deletions
@@ -58,3 +58,10 @@ internal annotation class OnlyInputTypes
@Target(AnnotationTarget.FUNCTION)
@Retention(AnnotationRetention.BINARY)
internal annotation class InlineOnly
/**
* Specifies that this part of internal API is effectively public exposed by using in public inline function
*/
@Target(AnnotationTarget.CLASS, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY)
@Retention(AnnotationRetention.BINARY)
internal annotation class InlineExposed