Commit Graph

2 Commits

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