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
Delayed categories only existed to keep
ClangImporter/objc_redeclared_properties passing. But this test
appears to exhibit incorrect behavior as written.
The clang importer implements limited behavior for overwriting
variable declarations. If that overwrite occurs somewhere else in the
class hierarchy, the declaration is rewritten as a Swift override. The
remaining case is categories, which enable all sorts of awful
redeclaration behaviors. When a bridging header declares a category
that tries to stomp the API surface of another category, we need to
import that category first, and we would import that category first - by
accident. Re-entrancy does have its upsides.
In order to keep the tests passing post re-entrant lookup, we stubbed in a hack that delayed
categories in the bridging header so they were installed last, which
meant the variable merging logic would mostly decline to import those
properties. But the rest of the world expects the opposite: Bridging
header contents are more sacred than the rest of the SDK and must be
installed *first* in order for a number of nightmarish header hacks to
go through.
Unwind the old, incorrect emergent behavior and re-establish the
correct behavior as the way the world ought to work.
Resolves rdar://58493356, rdar://58493357, rdar://58493362, rdar://58493370
0 commit comments