Commit Graph

4 Commits

Author SHA1 Message Date
Pavel Yaskevich
6925940b37 [Sema] Improve diagnostic when @usableFromInline is applied to a declaration without a name (i.e. accessor/init) 2024-07-11 17:12:57 -07:00
Ellie Shin
ef321c9fd2 Allow @usableFromInline and @inlinable to package decls
Add tests for packgae inline
Add more package acl tests

Resolves rdar://104617133
2023-03-16 11:21:11 -07:00
Jordan Rose
3114ed17e1 Allow '@usableFromInline' on 'dynamic' decls
It actually /does/ make sense to enforce the usable-from-inline rules
on dynamic declarations, but that would break source compatibility at
this point. Just allow '@usableFromInline' to be written on 'dynamic'
declarations, so that it'll be compatible with Swift 5.
2018-10-05 12:20:47 -07:00
Slava Pestov
0a60619b70 Sema: Declaration signatures should respect @usableFromInline
Previously we made sure that inlinable function bodies only
reference @usableFromInline or public declarations, but we
also have to make sure that @usableFromInline declarations
only reference other declarations that are at least as
visible.

Otherwise, you could, for example, define a @usableFromInline
typealias which referenced an internal type, and then
reference the typealias from a @usableFromInline function body.
2018-06-26 00:31:32 -07:00