-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itself
Description
| Previous ID | SR-7471 |
| Radar | rdar://problem/39532028 |
| Original Reporter | @phausler |
| Type | Bug |
| Status | Resolved |
| Resolution | Done |
Additional Detail from JIRA
| Votes | 0 |
| Component/s | Compiler |
| Labels | Bug |
| Assignee | @slavapestov |
| Priority | Medium |
md5: 54ba0b5368cafb49e35e02f8c2858087
Issue Description:
internal final class _Bar {
func foo() {
}
@usableFromInline
func fooCalledFromInline() {
}
}
public struct Bar {
@usableFromInline
internal var bar = _Bar()
public func foo() {
bar.foo()
}
@inlinable
public func inlineFoo() {
bar.fooCalledFromInline()
}
}
inlineFoo reports an error (which seems incorrect)
/tmp/inlines/inlines/main.swift:31:13: error: instance method 'fooCalledFromInline()' is internal and cannot be referenced from an '@inlinable' function
bar.fooCalledFromInline()
^
/tmp/inlines/inlines/main.swift:17:10: note: instance method 'fooCalledFromInline()' is not '@usableFromInline' or public
func fooCalledFromInline() {
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itself