More array casting work:

- Continue adding support for checked downcasts of array types (rdar://problem/16535104)
- Fix non-bridged array conversions post-r17868
- Fix rdar://problem/16773693
- Add tests for NSArray coercions to and from Array<T>

Swift SVN r17957
This commit is contained in:
Joe Pamer
2014-05-12 20:49:42 +00:00
parent 9598880928
commit 1e5b9116d4
21 changed files with 175 additions and 26 deletions

View File

@@ -0,0 +1,24 @@
// RUN: %swift %s -verify
class V {}
class U : V {}
class T : U {}
var v = V()
var u = U()
var t = T()
var va = [v]
var ua = [u]
var ta = [t]
va = ta
var va2: (V[])? = va as V[]
var v2: V = va2![0]
var ua2: (U[])? = va as U[]
var u2: U = ua2![0]
var ta2: (T[])? = va as T[]
var t2: T = ta2![0]