[swift-evolution] Tuple subtype problem
Cao Jiannan
frogcjn at 163.com
Tue Feb 16 00:47:54 CST 2016
Another problem about sub-typing system in Swift is tuple.
Why tuple does not support sub-typing feature?
for example:
class A{
}
class B:A {
}
let tupleB:(B,B) = (B(),B())
let tupleA:(A,A) = tupleB
This should be allowed in Swift. But a compiler typing-check error.
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160216/bf874be6/attachment.html>
More information about the swift-evolution
mailing list