Dmitri Gribenko
339c7a99dc
Remove no-argument initializers from unsafe pointer types
...
The preferred way to create a nil pointer is to use the 'nil' literal.
Affected types:
AutoreleasingUnsafeMutablePointer
OpaquePointer
UnsafeMutablePointer
UnsafePointer
2015-12-16 14:59:50 -08:00
Maxim Moiseev
62c85d379d
OutputStreamType => OutputStream
2015-12-16 14:45:38 -08:00
Doug Gregor
2f5f94a12c
Merge remote-tracking branch 'origin/swift-3-api-guidelines' into swift-3-omit-needless-words
2015-12-15 17:11:37 -08:00
Daniel Duan
ebb0c3a204
replaced single-line ++/-- with +=/-=
2015-12-15 09:05:37 -08:00
Max Moiseev
786e1ea2b1
Merge remote-tracking branch 'origin' into swift-3-api-guidelines
2015-12-11 15:19:02 -08:00
Doug Gregor
06c5e9cd5b
Enable "omit needless words" by default.
...
Most of this is in updating the standard library, SDK overlays, and
piles of test cases to use the new names. No surprises here, although
this shows us some potential heuristic tweaks.
There is one substantive compiler change that needs to be factored out
involving synthesizing calls to copyWithZone()/copy(zone:). Aside from
that, there are four failing tests:
Swift :: ClangModules/objc_parse.swift
Swift :: Interpreter/SDK/Foundation_test.swift
Swift :: Interpreter/SDK/archiving_generic_swift_class.swift
Swift :: Interpreter/SDK/objc_currying.swift
due to two independent remaining compiler bugs:
* We're not getting partial ordering between NSCoder's
encode(AnyObject, forKey: String) and NSKeyedArchiver's version of
that method, and
* Dynamic lookup (into AnyObject) doesn't know how to find the new
names. We need the Swift name lookup tables enabled to address this.
2015-12-11 14:46:50 -08:00
Erik Eckstein
5de8fbb705
Revert "Compile StdlibUnittest with -sil-serialize-all."
...
Some tests are failing in check-swift-all-optimize.
rdar://problem/18917405
This reverts commit 79517a8edf .
2015-12-11 08:05:21 -08:00
Maxim Moiseev
1b6244f3ee
integer types renamed
2015-12-10 17:03:40 -08:00
Maxim Moiseev
2c95bb6d51
BooleanType => Boolean
2015-12-10 14:56:32 -08:00
Dmitri Gribenko
b7f3d54f4d
removeAll(keepCapacity:) => removeAll(keepingCapacity:)
2015-12-09 17:18:08 -08:00
Dmitri Gribenko
f846ef6fd1
RangeReplaceableCollection.removeRange() => .removeSubrange()
2015-12-09 17:17:51 -08:00
Dmitri Gribenko
727f011314
RangeReplaceableCollection.insert(_:atIndex:) => .insert(_:at:)
2015-12-09 17:17:41 -08:00
Dmitri Gribenko
9a9ff305f1
RangeReplaceableCollection.replaceRange() => .replaceSubrange()
2015-12-09 17:17:34 -08:00
Dmitri Gribenko
ab0a2a6044
Rename 'subrange' to 'bounds' in non-API arguments
2015-12-09 17:17:20 -08:00
Maxim Moiseev
844b81c46b
SequenceType => Sequence
2015-12-09 17:16:56 -08:00
Maxim Moiseev
c678a839dc
IndexType => Index
2015-12-09 17:16:42 -08:00
Maxim Moiseev
6f4335ddc6
_ReverseCollectionType => _ReverseCollection
2015-12-09 17:16:31 -08:00
Maxim Moiseev
9ead96d232
renaming test files (less Type)
2015-12-09 17:15:41 -08:00
Dmitri Gribenko
5a07f89297
Remove 'generator' from names of test functions and local variables
2015-12-09 17:15:11 -08:00
Dmitri Gribenko
4b1be0e78f
removeAtIndex() => removeAt()
2015-12-09 17:15:01 -08:00
Dmitri Gribenko
df17ddbc9b
init(count: Int, repeatedValue: Element) => init(repeating:count:)
...
Affected types: _ArrayType, Array, ArraySlice, ContiguousArray, Repeat,
String (initializers from Character and UnicodeScalar)
2015-12-09 17:14:37 -08:00
Dmitri Gribenko
d72b5ab575
func SequenceType.enumerate() => var SequenceType.enumerated
2015-12-09 17:13:21 -08:00
Maxim Moiseev
09a6913622
RangeReplaceableCollectionType => RangeReplaceableCollection
2015-12-09 17:13:08 -08:00
Maxim Moiseev
7e2466c14e
CollectionType => Collection
2015-12-09 17:12:48 -08:00
Dmitri Gribenko
feacbc4433
Rename ErrorType to ErrorProtocol
2015-12-09 17:12:19 -08:00
Dmitri Gribenko
1c0047829a
Rename SequenceType.generate() to SequenceType.iterator()
2015-12-09 17:11:17 -08:00
Dmitri Gribenko
2cf172160c
Rename SequenceType.Generator associated type to SequenceType.Iterator
2015-12-09 17:11:05 -08:00
Dmitri Gribenko
31598d41bf
Rename GeneratorType to IteratorProtocol
2015-12-07 17:08:32 -08:00
Maxim Moiseev
7372e9e045
COpaquePointer => OpaquePointer
2015-12-07 16:52:45 -08:00
yyx290799684
36798c4be1
Update README.txt
2015-12-05 15:27:18 +08:00
Erik Eckstein
79517a8edf
Re-apply "Compile StdlibUnittest with -sil-serialize-all."
...
Should now be ok with the workaround in the AtomicInt.swift test
2015-12-04 12:58:38 -08:00
John Andrews
c7710b75b7
Fix typo in SwiftPrivate.swift, "hexidecimal" -> "hexadecimal"
2015-12-03 18:01:23 -08:00
to4iki
6e22607a6f
Fix typo
...
hexidecimal > hexadecimal
2015-12-04 10:22:32 +09:00
Erik Eckstein
e15132a6f7
Revert "Compile StdlibUnittest with -sil-serialize-all."
...
This reverts commit adc92bab45 .
It caused a fail of stdlib/AtomicInt.swift on linux.
2015-11-30 16:53:08 -07:00
Erik Eckstein
adc92bab45
Compile StdlibUnittest with -sil-serialize-all.
2015-11-30 13:11:00 -08:00
Joe Groff
fbd2e4d872
Rename @asmname to @_silgen_name.
...
This reflects the fact that the attribute's only for compiler-internal use, and isn't really equivalent to C's asm attribute, since it doesn't change the calling convention to be C-compatible.
2015-11-17 14:13:48 -08:00
Mishal Awadah
a77183c068
[stdlib] Removing unused library.
...
Fixes rdar://problem/23495046
2015-11-13 10:39:34 -08:00
Michael Gottesman
99bd7754a5
Fix typo in StdlibUnittest.swift.gyb.
2015-11-11 16:07:42 -08:00
David Farler
8f2fbdc93a
Make function parameters and refutable patterns always immutable
...
All refutable patterns and function parameters marked with 'var'
is now an error.
- Using explicit 'let' keyword on function parameters causes a warning.
- Don't suggest making function parameters mutable
- Remove uses in the standard library
- Update tests
rdar://problem/23378003
2015-11-09 16:56:13 -08:00
David Farler
a759ca9141
Disallow 'var' bindings in case patterns
...
Make the following illegal:
switch thing {
case .A(var x):
modify(x0
}
And provide a replacement 'var' -> 'let' fix-it.
rdar://problem/23172698
Swift SVN r32883
2015-10-25 18:53:02 +00:00
David Farler
3434f9642b
Disallow 'var' pattern bindings in if, while, and guard statements
...
Make the following patterns illegal:
if var x = ... {
...
}
guard var x = ... else {
...
}
while var x = ... {
...
}
And provide a replacement fixit 'var' -> 'let'.
rdar://problem/23172698
Swift SVN r32855
2015-10-24 01:46:30 +00:00
Dmitri Hrybenko
6536edd68c
stdlib: fix coding style
...
Swift SVN r32425
2015-10-03 21:13:15 +00:00
Dmitri Hrybenko
779e506a09
StdlibUnittest: rename isSequenceType to expectSequenceType for uniformity
...
Swift SVN r32296
2015-09-29 03:07:26 +00:00
Dmitri Hrybenko
b41986e95c
StdlibUnittest: make isSequenceType and expectCollectionType more strict
...
These constraints should be on the SequenceType and CollectionType
protocols, but we can't express them in the language today.
Swift SVN r32295
2015-09-29 03:07:25 +00:00
Dmitri Hrybenko
7afb88f2aa
StdlibUnittest: put complex generic constraints in the same order everywhere
...
Swift SVN r32294
2015-09-29 03:07:24 +00:00
Dmitri Hrybenko
153d95efc6
SwiftShims: don't redeclare libc functions
...
Clang importer thinks that SwiftShims is the primary module where they
live, and this confuses code completion.
rdar://22488333
Swift SVN r32218
2015-09-25 03:33:50 +00:00
Dmitri Hrybenko
9da0b57178
stdlib: Add an initializer to RangeReplaceableCollectionType from SequenceType
...
rdar://19815116
Swift SVN r32213
2015-09-24 23:20:13 +00:00
Dmitri Hrybenko
1c0bb69a32
stdlib: add removeFirst() and removeLast() functions to slices
...
It is an oversight that we didn't add these when we were converting to
protocol extensions.
Swift SVN r32144
2015-09-22 02:50:33 +00:00
Dmitri Hrybenko
d695f35b3c
StdlibUnittest: rename SpliceTest to InsertContentsOfTest
...
Swift SVN r32138
2015-09-22 00:23:13 +00:00
Dmitri Hrybenko
db77b54b3c
StdlibUnittest: if the stacktrace is empty, don't print "stacktrace:"
...
Swift SVN r32057
2015-09-18 01:30:15 +00:00