Switch array default construction to its canonical type sugar form

of T[]() instead of Array<T>().

I didn't do this in the guts of Array.swift because the abstraction
is harmful in the implementation of Array itself.

NFC.



Swift SVN r17683
This commit is contained in:
Chris Lattner
2014-05-08 05:13:08 +00:00
parent 05e9efb093
commit e489a7024a

View File

@@ -643,10 +643,9 @@ Type ConstraintSystem::openType(
bool ConstraintSystem::isArrayType(Type t) {
// ArraySliceType<T> now desugars to Array<T>.
if (dyn_cast<ArraySliceType>(t.getPointer())) {
// ArraySliceType<T> desugars to Array<T>.
if (dyn_cast<ArraySliceType>(t.getPointer()))
return true;
}
if (auto boundStruct = dyn_cast<BoundGenericStructType>(t.getPointer())) {
if (!boundStruct->getParent() &&
boundStruct->getGenericArgs().size() == 1 &&