Compile Time vs. Run Time Type Checking in Swift
Benjamin Encz: The dynamic type check in the above example actually works correctly. The body of the if let block is only executed for types that conform to our two expected protocols. However, we cannot convey this to the compiler. The compiler expects a concrete type (one that has a fully specified type at compile … Continue reading Compile Time vs. Run Time Type Checking in Swift
Copy and paste this URL into your WordPress site to embed
Copy and paste this code into your site to embed