Commit Graph

7762 Commits

Author SHA1 Message Date
Dmitri Gribenko
27feeeda04 Merge pull request #446 from dayitv89/gds-FixTypos_BridgeOC
Fix Typos
2015-12-12 01:40:16 -08:00
GauravDS
14bfc33b82 Fix typos
colection => collection
2015-12-12 13:47:54 +05:30
GauravDS
161332cb5e fix typos nul => null 2015-12-12 13:22:51 +05:30
GauravDS
5ee32e43f4 Fix Typos
conditionall => conditionally 
alaways => always
2015-12-12 13:10:54 +05:30
Niels Andriesse
c3703f91cc Change guard statement to if statement 2015-12-12 18:02:14 +11:00
Niels Andriesse
12b85a1cf8 Change .None to nil 2015-12-12 17:45:22 +11:00
Niels Andriesse
d30db93977 Update next() function for removal of ++ operator 2015-12-12 17:43:12 +11:00
Niels Andriesse
f0241a2393 Fix documentation 2015-12-12 17:01:46 +11:00
Niels Andriesse
dc0612ccd4 Replace successor() by _successorInPlace() 2015-12-12 13:26:13 +11:00
Niels Andriesse
264fe32545 Remove .None and .Some usage 2015-12-12 13:24:37 +11:00
Arnold Schwaighofer
8f225da5ca Also use array semantics for the array element get function on non-objc systems
... and we hoist uniqueness checks for array on linux.

rdar://23865507
2015-12-11 17:15:15 -08:00
Niels Andriesse
635ffdc656 Fix ambiguous expression type 2015-12-12 12:00:05 +11:00
Niels Andriesse
6147e259a1 Update next() function for removal of ++ operator 2015-12-12 11:40:56 +11: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
Niels Andriesse
cb408d38f3 Fix indentation 2015-12-11 17:56:40 +11:00
Chris Willmore
c99c02b5a6 Transform EditorPlaceholderExpr into trap if executed in playground
mode (take 2)

Allow untyped placeholder to take arbitrary type, but default to Void.
Add _undefined<T>() function, which is like fatalError() but has
arbitrary return type. In playground mode, merely warn about outstanding
placeholders instead of erroring out, and transform placeholders into
calls to _undefined(). This way, code with outstanding placeholders will
only crash when it attempts to evaluate such placeholders.

When generating constraints for an iterated sequence of type T, emit

    T convertible to $T1
    $T1 conforms to SequenceType

instead of

    T convertible to SequenceType

This ensures that an untyped placeholder in for-each sequence position
doesn't get inferred to have type SequenceType. (The conversion is still
necessary because the sequence may have IUO type.) The new constraint
system precipitates changes in CSSimplify and CSDiag, and ends up fixing
18741539 along the way.

(NOTE: There is a small regression in diagnosis of issues like the
following:

    class C {}
    class D: C {}
    func f(a: [C]!) { for _: D in a {} }

It complains that [C]! doesn't conform to SequenceType when it should be
complaining that C is not convertible to D.)

<rdar://problem/21167372>

(Originally Swift SVN r31481)
2015-12-10 22:05:16 -08:00
Maxim Moiseev
b702b1a903 more number type renames 2015-12-10 17:08:41 -08:00
Maxim Moiseev
c35b0058fc SignedNumberType => SignedNumber 2015-12-10 17:07:10 -08:00
Maxim Moiseev
50fba4b770 floating point types renamed 2015-12-10 17:05:11 -08:00
Maxim Moiseev
1b6244f3ee integer types renamed 2015-12-10 17:03:40 -08:00
Maxim Moiseev
6b7fc91beb LazySequenceType => LazySequenceProtocol 2015-12-10 17:00:08 -08:00
Maxim Moiseev
f6d3e90aa8 IndexBoxType => IndexBoxProtocol 2015-12-10 16:59:50 -08:00
Niels Andriesse
c4623d1ae5 Fix documentation 2015-12-11 11:30:04 +11:00
Patrick Pijnappel
431b8204c8 [stdlib] Reworded comment 2015-12-11 11:06:21 +11:00
Maxim Moiseev
0c4c56cd5f BitwiseOperationsType => BitwiseOperations 2015-12-10 14:59:40 -08:00
Maxim Moiseev
3bff3ba106 SetAlgebraType => SetAlgebra 2015-12-10 14:58:51 -08:00
Maxim Moiseev
0e0191380a OptionSetType => OptionSet 2015-12-10 14:58:24 -08:00
Maxim Moiseev
2c95bb6d51 BooleanType => Boolean 2015-12-10 14:56:32 -08:00
Dmitri Gribenko
507b68315e Comment improvements in Array 2015-12-10 14:54:12 -08:00
Dmitri Gribenko
b57d135d2e Fix coding style 2015-12-10 14:54:04 -08:00
Dmitri Gribenko
782ea19d75 Name tuple elements in Dictionary.Element
FIXME: write tests for this API change, I'm sure there aren't any tests
that depend on this API detail now.
2015-12-10 14:53:48 -08:00
Dmitri Gribenko
cd57407c7c Dictionary: non-API improvements 2015-12-10 14:53:15 -08:00
Dmitri Gribenko
589ec99a8a Set: non-API improvements 2015-12-10 14:52:43 -08:00
Dmitri Gribenko
0c3765b980 Comment fix 2015-12-10 14:52:31 -08:00
Dmitri Gribenko
3c29d4a8a7 Coding style fix 2015-12-10 14:52:24 -08:00
Dmitri Gribenko
f14b1482c6 public typealias UTF8Chunk => internal typealias _UTF8Chunk 2015-12-10 14:52:13 -08:00
Dmitri Gribenko
0bce0b6af2 Make String.{utf8,utf16} read-write properties
FIXME: These are new API.  Write tests before taking this commit to the
master branch.
2015-12-10 14:50:33 -08:00
Dmitri Gribenko
78930e7fac Remove MutableSliceable 2015-12-10 14:50:12 -08:00
Dmitri Gribenko
4c093cf4a0 stdlib: fix indentation 2015-12-10 14:24:28 -07:00
Dmitri Gribenko
a5d48add78 Merge pull request #400 from dduan/hashed_collection_equality_by_address
compare Set and Dictionary by address for equality
2015-12-10 13:20:40 -08:00
Daniel Duan
9c28ff0207 compare Set and Dictionary by address for equality
as noted in the comment, the native storage version of Set and Dictionary can
be considered equal if their Owner object have the same address. This should
speed up == by quite a bit in those cases.

use === for equality of HashedCollection owner
2015-12-10 12:45:12 -08:00
Dmitri Gribenko
81431b6b2d Merge pull request #360 from PatrickPijnappel/patch-1
String(_, radix:): fix documentation
2015-12-10 12:44:18 -08:00
Max Moiseev
d610fa0d1c Merge remote-tracking branch 'origin' into swift-3-api-guidelines 2015-12-10 10:29:52 -08:00
Ge Sen
7ac02d54ba Erase redundant whitespaces. 2015-12-10 13:35:06 +08:00
Dmitri Gribenko
280feafd10 public struct RawByte => internal struct _RawByte 2015-12-09 17:19:27 -08:00
Dmitri Gribenko
bec37b1d0b Make String.characters a read-write property
FIXME: This is a new API.  Write tests before taking this commit to the
master branch.
2015-12-09 17:19:10 -08:00
Dmitri Gribenko
f3ecc3cdc5 transcode(..., stopOnError:) => transcode(..., stoppingOnError:) 2015-12-09 17:18:55 -08:00
Dmitri Gribenko
e5dba78263 Improve comments in String.swift 2015-12-09 17:18:46 -08:00
Dmitri Gribenko
9ca2775aa1 String.appendContentsOf() => .append()
We don't want to imply that String argument is a collection of anything.
2015-12-09 17:18:33 -08:00