Ban the "new" syntax for creating an array <rdar://problem/16951969>.

We haven't been advertising this syntax much, and it's closure form
was completely broken anyway, so don't jump through hoops to provide
great Fix-Its here. 


Swift SVN r19277
This commit is contained in:
Doug Gregor
2014-06-26 23:51:47 +00:00
parent e47a4e2e5a
commit f0159f40a1
23 changed files with 37 additions and 301 deletions

View File

@@ -83,7 +83,7 @@
return .None
}
var length = _strlen(self)
var result = new CChar[length + 1]
var result = [CChar](count: length + 1, repeatedValue: 0)
for var i = 0; i < length; ++i {
// FIXME: this will not compile on platforms where 'CChar' is unsigned.
result[i] = _bytesPtr[i].asSigned()