Commit Graph

1442 Commits

Author SHA1 Message Date
Max Moiseev
1fae0d1325 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-03-08 12:48:48 -08:00
Mike Ferris
c237762923 Merge pull request #1578 from mike-ferris-apple/master
<rdar://problem/24814424> Add unit tests for the error handling suppo…
2016-03-08 11:14:13 -08:00
Mike Ferris
7fb274a643 <rdar://problem/24814424> Add unit tests for the error handling support in the XCTest swift overlay 2016-03-08 08:35:24 -08:00
practicalswift
a183c5fc9d [swiftc] Add test case for crash triggered in swift::constraints::ConstraintGraphNode::getMemberType(swift::Identifier, std::function<swift::TypeVariableType* ()>)
Stack trace:

```
6  swift           0x0000000000f56566 swift::constraints::ConstraintGraphNode::getMemberType(swift::Identifier, std::function<swift::TypeVariableType* ()>) + 182
7  swift           0x0000000000f5712a swift::constraints::ConstraintGraph::getMemberType(swift::TypeVariableType*, swift::Identifier, std::function<swift::TypeVariableType* ()>) + 154
9  swift           0x000000000109068d swift::Type::transform(std::function<swift::Type (swift::Type)> const&) const + 45
10 swift           0x0000000000ec5ae6 swift::constraints::ConstraintSystem::openGeneric(swift::DeclContext*, llvm::ArrayRef<swift::GenericTypeParamType*>, llvm::ArrayRef<swift::Requirement>, bool, unsigned int, swift::constraints::ConstraintLocatorBuilder, llvm::DenseMap<swift::CanType, swift::TypeVariableType*, llvm::DenseMapInfo<swift::CanType>, llvm::detail::DenseMapPair<swift::CanType, swift::TypeVariableType*> >&) + 1110
12 swift           0x000000000109068d swift::Type::transform(std::function<swift::Type (swift::Type)> const&) const + 45
13 swift           0x0000000000ec64fa swift::constraints::ConstraintSystem::getTypeOfMemberReference(swift::Type, swift::ValueDecl*, bool, bool, swift::constraints::ConstraintLocatorBuilder, swift::DeclRefExpr const*, llvm::DenseMap<swift::CanType, swift::TypeVariableType*, llvm::DenseMapInfo<swift::CanType>, llvm::detail::DenseMapPair<swift::CanType, swift::TypeVariableType*> >*) + 778
18 swift           0x0000000000e869a0 swift::TypeChecker::inferDefaultWitnesses(swift::ProtocolDecl*) + 288
19 swift           0x0000000000e67048 swift::finishTypeChecking(swift::SourceFile&) + 536
20 swift           0x0000000000cb63aa swift::CompilerInstance::performSema() + 3514
22 swift           0x000000000078a58b frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2523
23 swift           0x0000000000785035 main + 2837
Stack dump:
0.	Program arguments: /usr/local/bin/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28260-swift-constraints-constraintgraphnode-getmembertype.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28260-swift-constraints-constraintgraphnode-getmembertype-a2bfc8.o
<unknown>:0: error: unable to execute command: Segmentation fault
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-03-08 11:36:24 +01:00
Max Moiseev
7fe6916bf6 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-03-07 12:10:47 -08:00
practicalswift
4c9a2d20d0 [swiftc] Add test case for crash triggered in swift::TypeChecker::validateDecl(swift::ValueDecl*, bool)
Stack trace:

```
swift: /path/to/swift/lib/Sema/TypeCheckDecl.cpp:4372: void (anonymous namespace)::DeclChecker::visitFuncDecl(swift::FuncDecl *): Assertion `!FD->getType()->hasTypeParameter()' failed.
10 swift           0x0000000000e3d6d4 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 788
12 swift           0x0000000000e3d6d4 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 788
13 swift           0x00000000010778fc swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, unsigned int, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 3612
14 swift           0x0000000001075fc0 swift::UnqualifiedLookup::UnqualifiedLookup(swift::DeclName, swift::DeclContext*, swift::LazyResolver*, bool, swift::SourceLoc, bool, bool) + 2384
15 swift           0x0000000000e7c99b swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 187
18 swift           0x0000000000ea745e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158
20 swift           0x0000000000ea8374 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164
21 swift           0x0000000000ea735a swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 42
23 swift           0x0000000000e7910c swift::TypeChecker::validateGenericFuncSignature(swift::AbstractFunctionDecl*) + 124
28 swift           0x0000000000e42f36 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
31 swift           0x0000000000ea178d swift::TypeChecker::typeCheckConstructorBodyUntil(swift::ConstructorDecl*, swift::SourceLoc) + 845
32 swift           0x0000000000ea1192 swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 34
33 swift           0x0000000000ea1d38 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 136
35 swift           0x0000000000e662f4 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1300
36 swift           0x0000000000cb5b9f swift::CompilerInstance::performSema() + 3087
38 swift           0x000000000078a49b frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2523
39 swift           0x0000000000784f45 main + 2837
Stack dump:
0.	Program arguments: /usr/local/bin/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28259-swift-typechecker-validatedecl.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28259-swift-typechecker-validatedecl-e3f732.o
1.	While type-checking 'init' at validation-test/compiler_crashers/28259-swift-typechecker-validatedecl.swift:8:11
2.	While type-checking 'S' at validation-test/compiler_crashers/28259-swift-typechecker-validatedecl.swift:8:18
3.	While resolving type d at [validation-test/compiler_crashers/28259-swift-typechecker-validatedecl.swift:8:35 - line:8:35] RangeText="d"
4.	While type-checking 'd' at validation-test/compiler_crashers/28259-swift-typechecker-validatedecl.swift:8:37
5.	While type-checking 'd' at validation-test/compiler_crashers/28259-swift-typechecker-validatedecl.swift:8:28
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-03-07 07:46:08 +01:00
practicalswift
2b4872c4d0 [swiftc] Add test case for crash triggered in swift::SpecializedProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*) const
Stack trace:

```
swift: /path/to/swift/lib/AST/Type.cpp:2126: TypeSubstitutionMap swift::GenericParamList::getSubstitutionMap(ArrayRef<swift::Substitution>) const: Assertion `Subs.empty() && "did not use all substitutions?!"' failed.
9  swift           0x000000000105a0ea swift::SpecializedProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 202
10 swift           0x0000000001059e02 swift::ProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 18
11 swift           0x000000000105a616 swift::ProtocolConformance::getTypeWitness(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 6
12 swift           0x0000000000e5949a swift::TypeChecker::lookupMemberType(swift::DeclContext*, swift::Type, swift::Identifier, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 1066
14 swift           0x0000000000e82d7e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158
16 swift           0x0000000000e83c84 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164
17 swift           0x0000000000e82c7a swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 42
18 swift           0x0000000000e1719a swift::TypeChecker::checkInheritanceClause(swift::Decl*, swift::GenericTypeResolver*) + 5274
19 swift           0x0000000000e54775 swift::TypeChecker::checkGenericParamList(swift::ArchetypeBuilder*, swift::GenericParamList*, swift::GenericSignature*, bool, swift::GenericTypeResolver*) + 357
20 swift           0x0000000000e55e97 swift::TypeChecker::validateGenericSignature(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, std::function<bool (swift::ArchetypeBuilder&)>, bool&) + 135
21 swift           0x0000000000e56244 swift::TypeChecker::validateGenericTypeSignature(swift::NominalTypeDecl*) + 116
22 swift           0x0000000000e18fe1 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 353
29 swift           0x0000000000e1e936 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
32 swift           0x0000000000e7cc4a swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 346
33 swift           0x0000000000e7caae swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 46
34 swift           0x0000000000e7d648 swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 136
36 swift           0x0000000000e41dd4 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1300
37 swift           0x0000000000cb3b5f swift::CompilerInstance::performSema() + 3087
39 swift           0x00000000007885fb frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2523
40 swift           0x00000000007830d5 main + 2773
Stack dump:
0.	Program arguments: /usr/local/bin/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28258-swift-specializedprotocolconformance-gettypewitnesssubstanddecl.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28258-swift-specializedprotocolconformance-gettypewitnesssubstanddecl-a81e65.o
1.	While type-checking '<' at validation-test/compiler_crashers/28258-swift-specializedprotocolconformance-gettypewitnesssubstanddecl.swift:8:1
2.	While type-checking 'c' at validation-test/compiler_crashers/28258-swift-specializedprotocolconformance-gettypewitnesssubstanddecl.swift:8:7
3.	While resolving type A.e at [validation-test/compiler_crashers/28258-swift-specializedprotocolconformance-gettypewitnesssubstanddecl.swift:8:72 - line:8:74] RangeText="A.e"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-03-06 22:00:43 +01:00
practicalswift
4c3bca8e04 [gardening] Fix recently introduced typo: "accidently" → "accidentally" 2016-03-05 08:47:36 +01:00
Michael Gottesman
9a5c3eabf2 Merge pull request #968 from ezephir/linux-validation-dictionary-input
[StdLib] Refactor DictionaryKeyValueTypes test input data
2016-03-04 22:54:42 -08:00
Arnold Schwaighofer
0b181a1861 Don't throw away the top bits of our hashed value for strings on 64bit platforms
SR-877
rdar://24918173
2016-03-04 14:29:02 -08:00
Max Moiseev
cf4bafe9e3 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-03-03 13:22:03 -08:00
Slava Pestov
6bf9ab19ff Add preliminary library evolution test for resiliently adding a new protocol requirement
This test ensures that the runtime correctly instantiates resilient conformances,
and that IRGen emits the correct metadata, allowing a conformance that was
compiled before a new requirement was added to present a default implementation
of this requirement.

For now, this runs with --no-backward-deployment, so we only test before/before,
before/after and after/after cases.

Getting after/before working is also an expected capability here, but requires
IRGen witness table emission to know which requirements were satisfied by
defaults, so that they can be dropped if they appear at the end of a witness
table. In turn, this requires serializing SILDefaultWitnessTables. This will
be added in a subsequent patch.

In addition to fixing the above case, I need to write additional tests and
possibly fix bugs related to more elaborate cases involving generics, as well as
default witnesses for properties and subscripts.
2016-03-03 07:37:00 -08:00
practicalswift
e33f1747a9 [Python] Improve Python consistency: "variable in function should be lowercase" (N806)
The repo contains roughly 80 Python scripts. "snake_case" naming is used for
local variables in all those scripts. This is the form recommended by the PEP 8
naming recommendations (Python Software Foundation) and typically associated
with idiomatic Python code.

However, in nine of the 80 scripts there were at least one instance of
"camelCase" naming prior to this commit.

This commit improves consistency in the Python code base by making sure that
these nine remaining files follow the variable naming convention used for
Python code in the project.

References:
* PEP 8: https://www.python.org/dev/peps/pep-0008/
* pep8-naming: https://pypi.python.org/pypi/pep8-naming
2016-03-02 18:56:47 +01:00
Max Moiseev
859db53d87 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-03-01 12:56:26 -08:00
Emanuel Zephir
a4e8ee04e0 [StdLib] Refactor DictionaryKeyValueTypes test input data
Split the input file into a pure Swift and Objective-C interop files in
anticipation of refactoring tests to remove XFAILs on Linux.
2016-02-29 22:49:35 -08:00
Michael Gottesman
e7738bbdde Merge pull request #1399 from practicalswift/idiomatic-python-part-ii
[Python] Improve Python consistency: Use function_name(…) throughout (PEP8)
2016-02-29 14:52:23 -08:00
practicalswift
3148d6e411 [swiftc] Add test case for crash triggered in swift::TypeChecker::resolveTypeWitness(swift::NormalProtocolConformance const*, swift::AssociatedTypeDecl*)
Stack trace:

```
5  swift           0x0000000000e41101 swift::TypeChecker::resolveTypeWitness(swift::NormalProtocolConformance const*, swift::AssociatedTypeDecl*) + 225
6  swift           0x00000000010341a6 swift::NormalProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 150
7  swift           0x00000000010340e8 swift::ProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 40
8  swift           0x00000000010348e6 swift::ProtocolConformance::getTypeWitness(swift::AssociatedTypeDecl*, swift::LazyResolver*) const + 6
11 swift           0x0000000000f1f058 swift::ArchetypeBuilder::addSuperclassRequirement(swift::ArchetypeBuilder::PotentialArchetype*, swift::Type, swift::RequirementSource) + 248
14 swift           0x0000000000f20d4f swift::ArchetypeBuilder::visitInherited(llvm::ArrayRef<swift::TypeLoc>, llvm::function_ref<bool (swift::Type, swift::SourceLoc)>) + 175
15 swift           0x0000000000f1eb4a swift::ArchetypeBuilder::addAbstractTypeParamRequirements(swift::AbstractTypeParamDecl*, swift::ArchetypeBuilder::PotentialArchetype*, swift::RequirementSource::Kind, llvm::SmallPtrSetImpl<swift::ProtocolDecl*>&) + 426
16 swift           0x0000000000f1eed7 swift::ArchetypeBuilder::addConformanceRequirement(swift::ArchetypeBuilder::PotentialArchetype*, swift::ProtocolDecl*, swift::RequirementSource, llvm::SmallPtrSetImpl<swift::ProtocolDecl*>&) + 471
19 swift           0x0000000000f20d4f swift::ArchetypeBuilder::visitInherited(llvm::ArrayRef<swift::TypeLoc>, llvm::function_ref<bool (swift::Type, swift::SourceLoc)>) + 175
20 swift           0x0000000000f1eb4a swift::ArchetypeBuilder::addAbstractTypeParamRequirements(swift::AbstractTypeParamDecl*, swift::ArchetypeBuilder::PotentialArchetype*, swift::RequirementSource::Kind, llvm::SmallPtrSetImpl<swift::ProtocolDecl*>&) + 426
21 swift           0x0000000000f1e97c swift::ArchetypeBuilder::addGenericParameterRequirements(swift::GenericTypeParamDecl*) + 172
22 swift           0x0000000000e34427 swift::TypeChecker::checkGenericParamList(swift::ArchetypeBuilder*, swift::GenericParamList*, swift::GenericSignature*, bool, swift::GenericTypeResolver*) + 375
23 swift           0x0000000000e35b37 swift::TypeChecker::validateGenericSignature(swift::GenericParamList*, swift::DeclContext*, swift::GenericSignature*, std::function<bool (swift::ArchetypeBuilder&)>, bool&) + 135
24 swift           0x0000000000e35ee4 swift::TypeChecker::validateGenericTypeSignature(swift::NominalTypeDecl*) + 116
25 swift           0x0000000000df9bd4 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 1300
28 swift           0x0000000000dff206 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
29 swift           0x0000000000e22092 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1026
30 swift           0x0000000000c97b9f swift::CompilerInstance::performSema() + 3167
32 swift           0x000000000077705b frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2523
33 swift           0x0000000000771b25 main + 2773
Stack dump:
0.	Program arguments: /usr/local/bin/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28257-swift-typechecker-resolvetypewitness.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28257-swift-typechecker-resolvetypewitness-eec025.o
1.	While type-checking 'A' at validation-test/compiler_crashers/28257-swift-typechecker-resolvetypewitness.swift:7:1
<unknown>:0: error: unable to execute command: Segmentation fault
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-02-29 23:48:24 +01:00
practicalswift
f6d6585ee0 [Python] Improve Python consistency: Use function_name(…) throughout (PEP8) 2016-02-29 22:49:19 +01:00
Dmitri Gribenko
56785e81a6 Merge pull request #1477 from PatrickPijnappel/patch-3
[stdlib] Rewrite UTF8._isValidUTF8()
2016-02-29 13:12:24 -08:00
Max Moiseev
e48f452a2e Merge remote-tracking branch 'origin/swift-3-api-guidelines' into swift-3-api-guidelines 2016-02-29 12:15:33 -08:00
Max Moiseev
a49dab6bf8 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-02-29 12:08:52 -08:00
Slava Pestov
6812b6926b Sema: Cleanups and minor fixes for protocol 'Self' types
We had four duplicated implementations of checking how a protocol
requirement uses 'Self', all slightly wrong or incomplete:

- When deciding if the protocol type can be used as an existential.
  This one would just ignore 'Self' in the return type of a method
  completely, which was incorrect for cases where 'Self' is
  contravariant but part of the return value, for example:

  func foo() -> (Self -> ())

- When deciding if a member access can be performed on an existential
  value. This is distinct from the former, because the member may
  have been defined in a protocol extension, in which case it cannot
  be used even if the protocol type can be used as an existential.
  Unfortunately, this implementation was overly conservative, and
  would reject uses of 'Self' where Sema could in fact erase the
  existential type, for example:

  func foo() -> Self??
  func foo() -> Self.Type
  func foo() -> (Self, Self)

  This function handled function return types correctly, effectively
  plugging the leak in the previous code. It did lead to inconsistent
  behavior with protocols that had contravariant Self in requirements
  though; sometimes we would diagnose uses of the existential type,
  other times we would only complain about specific members.

- When deciding if a method in a non-final class can model a protocol
  requirement. This one was the most elaborate one, but here
  contravariance and uses of associated types are actually okay, so
  it was written to pick up covariant 'Self' only. However, it also
  did not handle metatypes and tuples.

- When opening the type of member of an existential, we would check
  if the return value was 'Self' or an optional of 'Self', but again
  this check was too conservative, so after the previous three were
  fixed, we could reference members on existentials that did not
  have a correct opened type.

Now, these have been combined into one check. To fix some crashes,
Sema's implementation of erasing existentials now relies on
coerceToType() instead of hand-rolling a few coercions of its own,
and wrapping the rest in CovariantFunctionConversionExpr, which
didn't make much sense if the result was not a function type.

SILGen still does not support function type conversions where an
existential return value is being erased; these would silently
miscompile before, but crash with an assertion now, because they
are correctly modeled as a FunctionConversionExpr, and not
CovariantFunctionConversionExpr.
2016-02-28 23:52:35 -08:00
Chris Lattner
0aebc5da16 My diagnstics change agitated a validation test, grr. 2016-02-28 21:09:27 -08:00
Patrick Pijnappel
902443e526 [stdlib] Fix _isValidUTF8 tests 2016-02-29 08:05:41 +11:00
Patrick Pijnappel
e02d7e7350 [stdlib] Add tests for _isValidUTF8()
Replaces the tests for the removed _numTrailingBytes()
2016-02-28 22:18:21 +11:00
Xi Ge
615d4cb756 [test] Remove 'not' because code completion prints result. 2016-02-27 22:52:31 -08:00
Chris Lattner
0a8db5daf6 Fix <rdar://problem/23899799> Simple closure expression crashed SourceKit
which is a straight-forward logic bug that the static analyzer would have caught.
2016-02-27 22:41:00 -08:00
Xi Ge
380bc11c0e [test] Mark an IDE crash as fixed. 2016-02-27 22:01:20 -08:00
Xi Ge
b109145dfc [TypeChecker] Add null check to fix a crash. 2016-02-27 21:38:55 -08:00
Daniel Duan
4b3ad79c5d [typechecker] add a crasher 2016-02-27 19:23:18 -08:00
Daniel Duan
2bc78b8c09 [stdlib] update for 'inout' adjustment (SE-0031) 2016-02-26 12:02:29 -08:00
Dmitri Gribenko
a77104d459 Update tests after transcode() API changes 2016-02-25 20:31:23 -08:00
Dmitri Gribenko
836e7785f9 stdlib: UTF16.measure() => .transcodedLength() 2016-02-25 15:06:00 -08:00
Jordan Rose
b319e3da32 stdlib: Adjust to insert(contentsOf:at:) and append(contentsOf:)
instead of insertContents(of:at:) and appendContents(of:),
originally insertContentsOf(_:at:) and appendContentsOf(_:)
per internal discussion.
2016-02-25 12:50:39 -08:00
Jordan Rose
e4e9c71d8f StdlibUnittest: Rename enum cases and static vars to match API guidelines. 2016-02-24 18:23:59 -08:00
Jordan Rose
f922084180 stdlib: Rename miscellaneous enum cases and static vars. 2016-02-24 17:46:14 -08:00
Jordan Rose
e45dfe09c6 stdlib: Rename 'Native'/'Cocoa' representations inside Dictionary/Set.
...and then because of a compiler bug (SR-806), rename the helper
properties to 'asNative' and 'asCocoa'.

None of this is API, so there is no migration information.
2016-02-24 17:46:12 -08:00
Jordan Rose
979e4a8e34 stdlib: Rename {Float,Double.CGFloat}.NaN to 'nan'
This follows the API guidelines and is consistent with the printed form.
'quietNaN' does not change, though.
2016-02-24 17:46:12 -08:00
Dmitri Gribenko
f3389273ba stdlib: String indices: samePositionIn(_:) => samePosition(in:) 2016-02-24 16:29:27 -08:00
Chris Willmore
2ddb6106e4 stdlib: Audit API for Swift 3 preposition, first-arg label rules
This commit is the result of auditing the following files:

* StringBuffer.swift
* StringCharacterView.swift
* StringCore.swift
* StringInterpolation.swift.gyb
* StringLegacy.swift
2016-02-24 16:11:20 -08:00
Max Moiseev
bb3eaaf308 Merging in latest master 2016-02-24 15:10:25 -08:00
Max Moiseev
0490e86d01 [stdlib] strideTo/strideThrough => stride(to:...)/stride(through:...) 2016-02-24 09:56:10 -08:00
Dmitri Gribenko
d7e82519f5 stdlib: add argument labels to sort() implementation details 2016-02-24 08:52:18 -08:00
Dmitri Gribenko
391d1c34c2 Adjust SceneKit test for String API changes 2016-02-24 01:31:31 -08:00
Dmitri Gribenko
e18d70a913 Merge pull request #1415 from Jnosh/array-types-validation-tests
Run collection unit tests on array types
2016-02-23 20:47:44 -08:00
Dmitri Gribenko
097085e16f stdlib: Sequence.lexicographicalCompare(_:) => .lexicographicallyPrecedes(_:) 2016-02-23 18:12:09 -08:00
Dmitri Gribenko
e81f99d7ea stdlib: Sequence.startsWith() => .starts(with:) 2016-02-23 18:12:09 -08:00
Janosch Hildebrand
3c4bb1d657 [stdlib] Replace uses of ++ in validation tests 2016-02-24 01:59:18 +01:00
Jordan Rose
0205191e32 stdlib: SequenceType._initializeTo(_:) becomes _copyContents(initializing:) 2016-02-23 16:58:49 -08:00
Jordan Rose
40d5e349bb stdlib: insertContentsOf(_:at:) becomes insertContents(of:at:) 2016-02-23 16:58:49 -08:00