You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SR-257 Resilient value type support -- umbrella bug
Issue Description:
Define this in file a.swift:
struct S {
var x: Int
}
And this in b.swift:
protocol P {
var x: Int { get }
}
extension S : P {}
When built without whole-module optimization, Sema lazily creates the accessor for S.x but SILGen never emits this.
This is an easy fix, just requires tightening up semantics of ASTContext.ExternalDefinitions and related code.
Probably also the accessor needs to be emitted with shared linkage even if the struct is public, to avoid clashes if it is re-emitted from another module. This is OK since the struct is fixed-layout.
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: a748a3ef108d58e45c52a48fb78d412a
blocks:
Issue Description:
Define this in file a.swift:
struct S {
var x: Int
}
And this in b.swift:
protocol P {
var x: Int { get }
}
extension S : P {}
When built without whole-module optimization, Sema lazily creates the accessor for S.x but SILGen never emits this.
This is an easy fix, just requires tightening up semantics of ASTContext.ExternalDefinitions and related code.
Probably also the accessor needs to be emitted with shared linkage even if the struct is public, to avoid clashes if it is re-emitted from another module. This is OK since the struct is fixed-layout.
The text was updated successfully, but these errors were encountered: