practicalswift
4ad5ed4ada
[crashers] License: Apache License v2.0 with Runtime Library Exception
2016-03-11 22:35:33 +01:00
Slava Pestov
55519871e0
validation-tests: Don't use AnyObject dispatch in Dictionary.swift
...
Fixes <rdar://problem/25023473>.
2016-03-11 13:25:54 -08:00
Dmitri Gribenko
d268da0628
New indexing model: avoid allocations in fatalError() when the string buffer is already in UTF-8
2016-03-11 13:08:01 -08:00
practicalswift
fd215f8d68
[swiftc] Add test case for crash triggered in swift::TypeChecker::applyUnboundGenericArguments(swift::UnboundGenericType*, swift::SourceLoc, swift::DeclContext*, llvm::MutableArrayRef<swift::TypeLoc>, bool, swift::GenericTypeResolver*)
...
Stack trace:
```
swift: /path/to/swift/include/swift/AST/Decl.h:2439: swift::Type swift::TypeAliasDecl::getUnderlyingType() const: Assertion `!UnderlyingTy.getType().isNull() && "getting invalid underlying type"' failed.
8 swift 0x0000000000ea84f9 swift::TypeChecker::applyUnboundGenericArguments(swift::UnboundGenericType*, swift::SourceLoc, swift::DeclContext*, llvm::MutableArrayRef<swift::TypeLoc>, bool, swift::GenericTypeResolver*) + 1321
9 swift 0x0000000000ea7e7f swift::TypeChecker::applyGenericArguments(swift::Type, swift::SourceLoc, swift::DeclContext*, swift::GenericIdentTypeRepr*, bool, swift::GenericTypeResolver*) + 431
13 swift 0x0000000000ea864e swift::TypeChecker::resolveIdentifierType(swift::DeclContext*, swift::IdentTypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, bool, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 158
15 swift 0x0000000000ea9564 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164
16 swift 0x0000000000ea854a swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 42
17 swift 0x0000000000f6086f swift::IterativeTypeChecker::processResolveInheritedClauseEntry(std::pair<llvm::PointerUnion<swift::TypeDecl*, swift::ExtensionDecl*>, unsigned int>, llvm::function_ref<bool (swift::TypeCheckRequest)>) + 159
18 swift 0x0000000000f3f22d swift::IterativeTypeChecker::satisfy(swift::TypeCheckRequest) + 493
19 swift 0x0000000000f3f3b9 swift::IterativeTypeChecker::satisfy(swift::TypeCheckRequest) + 889
20 swift 0x0000000000e3af40 swift::TypeChecker::resolveRawType(swift::EnumDecl*) + 64
21 swift 0x00000000010848bf swift::NominalTypeDecl::prepareConformanceTable() const + 351
22 swift 0x0000000001084b7f swift::NominalTypeDecl::getImplicitProtocols(llvm::SmallVectorImpl<swift::ProtocolDecl*>&) + 15
23 swift 0x0000000000e3b52c swift::TypeChecker::checkInheritanceClause(swift::Decl*, swift::GenericTypeResolver*) + 1180
24 swift 0x0000000000e3e47f swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 527
29 swift 0x0000000000e43ed6 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
33 swift 0x0000000000ea3736 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) + 134
34 swift 0x0000000000e671bd swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1149
35 swift 0x0000000000cb9d8f swift::CompilerInstance::performSema() + 3087
37 swift 0x000000000078ab9b frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2523
38 swift 0x0000000000785645 main + 2837
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28262-swift-typechecker-applyunboundgenericarguments.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28262-swift-typechecker-applyunboundgenericarguments-a3dcd2.o
1. While type-checking 'S' at validation-test/compiler_crashers/28262-swift-typechecker-applyunboundgenericarguments.swift:8:4
2. While resolving type d<T> at [validation-test/compiler_crashers/28262-swift-typechecker-applyunboundgenericarguments.swift:8:20 - line:8:23] RangeText="d<T>"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-03-11 21:02:21 +01:00
practicalswift
87cda49520
[swiftc] Add test case for crash triggered in swift::TypeChecker::validateDecl(swift::ValueDecl*, bool)
...
Stack trace:
```
swift: /path/to/swift/lib/Sema/TypeCheckDecl.cpp:6379: void swift::TypeChecker::validateDecl(swift::ValueDecl *, bool): Assertion `gp->getOuterParameters() == proto->getDeclContext()->getGenericParamsOfContext()' failed.
8 swift 0x0000000000e417fe swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 7134
9 swift 0x000000000107b82c swift::DeclContext::lookupQualified(swift::Type, swift::DeclName, unsigned int, swift::LazyResolver*, llvm::SmallVectorImpl<swift::ValueDecl*>&) const + 3612
10 swift 0x0000000001079ef0 swift::UnqualifiedLookup::UnqualifiedLookup(swift::DeclName, swift::DeclContext*, swift::LazyResolver*, bool, swift::SourceLoc, bool, bool) + 2384
11 swift 0x0000000000e7f38b swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 187
14 swift 0x0000000000eaa10e 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 0x0000000000eab024 swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 164
17 swift 0x0000000000eaa00a swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 42
18 swift 0x0000000000f623af swift::IterativeTypeChecker::processResolveInheritedClauseEntry(std::pair<llvm::PointerUnion<swift::TypeDecl*, swift::ExtensionDecl*>, unsigned int>, llvm::function_ref<bool (swift::TypeCheckRequest)>) + 159
19 swift 0x0000000000f40d3d swift::IterativeTypeChecker::satisfy(swift::TypeCheckRequest) + 493
20 swift 0x0000000000e3c9f9 swift::TypeChecker::resolveInheritanceClause(llvm::PointerUnion<swift::TypeDecl*, swift::ExtensionDecl*>) + 137
21 swift 0x0000000000e4015b swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 1339
22 swift 0x0000000000e3fcf1 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 209
25 swift 0x0000000001073202 swift::namelookup::lookupInModule(swift::ModuleDecl*, llvm::ArrayRef<std::pair<swift::Identifier, swift::SourceLoc> >, swift::DeclName, llvm::SmallVectorImpl<swift::ValueDecl*>&, swift::NLKind, swift::namelookup::ResolutionKind, swift::LazyResolver*, swift::DeclContext const*, llvm::ArrayRef<std::pair<llvm::ArrayRef<std::pair<swift::Identifier, swift::SourceLoc> >, swift::ModuleDecl*> >) + 1122
26 swift 0x000000000107a52a swift::UnqualifiedLookup::UnqualifiedLookup(swift::DeclName, swift::DeclContext*, swift::LazyResolver*, bool, swift::SourceLoc, bool, bool) + 3978
27 swift 0x0000000000e7f38b swift::TypeChecker::lookupUnqualified(swift::DeclContext*, swift::DeclName, swift::SourceLoc, swift::OptionSet<swift::NameLookupFlags, unsigned int>) + 187
30 swift 0x0000000000e88c60 swift::TypeChecker::inferDefaultWitnesses(swift::ProtocolDecl*) + 288
31 swift 0x0000000000e69318 swift::finishTypeChecking(swift::SourceFile&) + 536
32 swift 0x0000000000cbb88a swift::CompilerInstance::performSema() + 3514
34 swift 0x000000000078ad8b frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2523
35 swift 0x0000000000785835 main + 2837
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28263-swift-typechecker-validatedecl.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28263-swift-typechecker-validatedecl-5db636.o
1. While resolving type c at [validation-test/compiler_crashers/28263-swift-typechecker-validatedecl.swift:14:13 - line:14:13] RangeText="c"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-03-11 20:59:45 +01:00
Slava Pestov
c846ca3939
Add library evolution tests for constructor, computed property, subscript default implementations
2016-03-11 11:27:06 -08:00
practicalswift
6cde815034
Merge pull request #1623 from practicalswift/make-slicetests-output-identical-to-pre-cleanup-outputs
...
[Python] Make slice tests output identical to pre-cleanup outputs
2016-03-11 16:05:37 +01:00
Ben Langmuir
5ca1c72381
Revert "Add library evolution tests for constructor, computed property, subscript default implementations"
...
This reverts commit a504d57e85 .
2016-03-10 11:37:52 -08:00
practicalswift
7b1fd47f93
[Python] Make slice tests output identical to pre-cleanup outputs
...
In order to avoid introducing unnecessary diffs.
2016-03-10 19:48:12 +01:00
practicalswift
4d727a2f50
[swiftc] Add test case for crash triggered in swift::IterativeTypeChecker::satisfy(swift::TypeCheckRequest)
...
Stack trace:
```
swift: /path/to/swift/lib/Sema/IterativeTypeChecker.cpp:103: void swift::IterativeTypeChecker::satisfy(swift::TypeCheckRequest): Assertion `isSatisfied(request)' failed.
9 swift 0x0000000000f3f3b9 swift::IterativeTypeChecker::satisfy(swift::TypeCheckRequest) + 889
10 swift 0x0000000000f3f3b9 swift::IterativeTypeChecker::satisfy(swift::TypeCheckRequest) + 889
13 swift 0x0000000000e3f115 swift::TypeChecker::validateDecl(swift::ValueDecl*, bool) + 3749
16 swift 0x0000000000e43ed6 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
17 swift 0x0000000000e67142 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1026
18 swift 0x0000000000cb9d8f swift::CompilerInstance::performSema() + 3087
20 swift 0x000000000078ab9b frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2523
21 swift 0x0000000000785645 main + 2837
Stack dump:
0. Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28261-swift-iterativetypechecker-satisfy.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28261-swift-iterativetypechecker-satisfy-2b2db1.o
1. While type-checking 'F' at validation-test/compiler_crashers/28261-swift-iterativetypechecker-satisfy.swift:8:1
2. While type-checking 'F' at validation-test/compiler_crashers/28261-swift-iterativetypechecker-satisfy.swift:8:1
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-03-10 16:57:23 +01:00
practicalswift
d6a7b2f517
[Python] Remove file level Python linting bypass ("noqa")
2016-03-10 13:33:57 +01:00
practicalswift
42b7e3f8d6
Merge pull request #1598 from practicalswift/fix-80-column-violations-in-python-code
...
[Python] Fix 80 column violations
2016-03-10 10:35:25 +01:00
Slava Pestov
a504d57e85
Add library evolution tests for constructor, computed property, subscript default implementations
2016-03-09 22:55:53 -08:00
gregomni
78b7b9681d
A few final replacements of typealias with associatedtype.
...
Mismerge during my last commit made for a couple of leftovers that I didn't discover until now.
2016-03-09 20:45:46 -08:00
gregomni
78216b2990
Change all remaining tests that use typealias in a protocol to use associatedtype.
2016-03-09 18:08:52 -08:00
practicalswift
0796eaad1f
[Python] Fix 80-column violations
2016-03-09 23:52:11 +01:00
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
Patrick Pijnappel
49741cfdd9
[stdlib] Rewrite UTF8 decoding
2016-03-03 23:30:00 +11: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