Avatar
norio_nomura 3/8/2019 12:36 PM
@swift-4.1.3 @swift-4.2.4 @swift-5.0.3 -swift-version 4.2 func foo<Value>(_ x: Any?, as type: Value.Type) -> Value? { return x as? Value } dump(foo(nil, as: Any.self)) -swift-version 5以外だと、Swift 4.1の挙動に戻るらしい… (edited)