[SR-11705] -enable-library-evolution breaks cross-module @objc-inference #54113
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
library evolution
Feature: library evolution (umbrella feature for features that facilitate resilient libraries)
type checker
Area → compiler: Semantic analysis
Environment
Xcode Version 11.0 (11A420a), reproduced also in Xcode Version 11.2 (11B52)
Additional Detail from JIRA
md5: c130445f1aeb4e4b2ce2c25c157c1dff
Issue Description:
Starting with a disclaimer that I'm absolutely not sure if this is somehow intended behaviour, but I very much think it's not at this point.
The problem is that I'm having a UIView-Subclass in let's call it `UITools`. As it's descending from UIView, no `@objc` is needed and I can use it as the type for an `@IBOutlet` freely in any dependant app or framework target – this works both with and without `-enable-library-evolution`. The problem arises only when I'm subclassing something that has been defined in `UITools` from within a dependant target, example below:
In UITools:
In App:
Now, recompiling `UITools` without `-enable-library-evolution` fixes the compilation problem, so it seems to be that compiling frameworks for distribution actually breaks the @objc-inference in dependant projects.
Note: For that specific example, a deployment target below iOS 13 must be used to illustrate the problematic behaviour.
The text was updated successfully, but these errors were encountered: