mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user