Adding a package to two targets in one projects results in an error

I see this in XCode Version 11.7 (11E801a). I have 2 dynamic frameworks in 1 executable that are referencing the same swift package with DISABLE_DIAMOND_PROBLEM_DIAGNOSTIC on and the type check does not work in runtime. let say we have class A in the package and one framework returns func getA() -> A?. Another framework checks if let a = a as? A and the check fails.
But may be for 2 different executables it is not the case.

1 Like