-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Description
| Previous ID | SR-8397 |
| Radar | rdar://problem/42828673 |
| Original Reporter | @nathawes |
| Type | Bug |
| Status | Resolved |
| Resolution | Done |
Additional Detail from JIRA
| Votes | 0 |
| Component/s | CodeCompletion |
| Labels | Bug, CompilerCrash |
| Assignee | @rintaro |
| Priority | Medium |
md5: 9171039a5886ba609b317beca0b0eae1
Issue Description:
public enum objc_AssociationPolicy {
case OBJC_ASSOCIATION_RETAIN_NONATOMIC
}
public func objc_setAssociatedObject(_ value: Any?, _ policy: objc_AssociationPolicy) {}
struct Foo<Outer> {
internal func setValue<Value>(_ value: Value?) {
objc_setAssociatedObject(value, .#^COMPLETE^#OBJC_ASSOCIATION_RETAIN_NONATOMIC )
}
}{code:title=$ swift-ide-test -code-completion -code-completion-token=COMPLETE -source-filename /tmp/test.swift}
found code completion token COMPLETE at offset 281
found code completion token COMPLETE at offset 281
Assertion failed: (params.empty() || ((Key.Depth == params.back()>getDepth() && Key.Index == params.back()>getIndex() + 1) || (Key.Depth > params.back()->getDepth() && Key.Index == 0))), function addGenericParameter, file /Users/nathanhawes/workspace/open-swift-source-compat-suite/swift/lib/AST/GenericSignatureBuilder.cpp, line 4133.
0 swift-ide-test 0x000000011264ba98 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1 swift-ide-test 0x000000011264aa06 llvm::sys::RunSignalHandlers() + 198
2 swift-ide-test 0x000000011264c0b2 SignalHandler(int) + 258
3 libsystem_platform.dylib 0x00007fff7dd65f5a _sigtramp + 26
4 libsystem_platform.dylib 0x00007ff4d282d800 _sigtramp + 1420589248
5 libsystem_c.dylib 0x00007fff7db0f1ae abort + 127
6 libsystem_c.dylib 0x00007fff7dad71ac basename_r + 0
7 swift-ide-test 0x000000010f6fe8d8 swift::GenericSignatureBuilder::addGenericParameter(swift::GenericTypeParamType*) + 488
8 swift-ide-test 0x000000010f76d11b substType(swift::Type, llvm::function_ref<swift::Type (swift::SubstitutableType*)>, llvm::function_ref<llvm::Optional<swift::ProtocolConformanceRef> (swift::CanType, swift::Type, swift::ProtocolDecl*)>, swift::SubstOptions) + 2123
9 swift-ide-test 0x000000010f766906 swift::Type::subst(swift::SubstitutionMap, swift::SubstOptions) const + 118
10 swift-ide-test 0x000000010f0df302 (anonymous namespace)::CompletionLookup::getTypeOfMember(swift::ValueDecl const*, llvm::Optional<swift::Type>) + 434
11 swift-ide-test 0x000000010f0dd434 (anonymous namespace)::CompletionLookup::addMethodCall(swift::FuncDecl const*, swift::DeclVisibilityKind) + 324
12 swift-ide-test 0x000000010f0da079 (anonymous namespace)::CompletionLookup::FilteredDeclConsumer::foundDecl(swift::ValueDecl*, swift::DeclVisibilityKind) + 73
13 swift-ide-test 0x000000010f7276b0 lookupVisibleMemberDecls(swift::Type, swift::VisibleDeclConsumer&, swift::DeclContext const*, (anonymous namespace)::LookupState, swift::DeclVisibilityKind, swift::LazyResolver*, swift::GenericSignatureBuilder*) + 752
14 swift-ide-test 0x000000010f727825 swift::lookupVisibleMemberDecls(swift::VisibleDeclConsumer&, swift::Type, swift::DeclContext const*, swift::LazyResolver*, bool, swift::GenericSignatureBuilder*) + 53
15 swift-ide-test 0x000000010f0d39ab (anonymous namespace)::CompletionLookup::getUnresolvedMemberCompletions(llvm::ArrayRef<swift::Type>) + 379
16 swift-ide-test 0x000000010f0e4ecd (anonymous namespace)::CompletionLookup::LookupByName::unboxType(swift::Type) + 637
17 swift-ide-test 0x000000010f726f91 swift::lookupVisibleDecls(swift::VisibleDeclConsumer&, swift::DeclContext const*, swift::LazyResolver*, bool, swift::SourceLoc) + 1121
18 swift-ide-test 0x000000010f0c9c21 (anonymous namespace)::CodeCompletionCallbacksImpl::doneParsing() + 7217
19 swift-ide-test 0x000000010f5c3130 (anonymous namespace)::ParseDelayedFunctionBodies::walkToDeclPre(swift::Decl*) + 304
20 swift-ide-test 0x000000010f67d22b (anonymous namespace)::Traversal::doIt(swift::Decl*) + 171
21 swift-ide-test 0x000000010f681f3b (anonymous namespace)::Traversal::visitNominalTypeDecl(swift::NominalTypeDecl*) + 475
22 swift-ide-test 0x000000010f67d258 (anonymous namespace)::Traversal::doIt(swift::Decl*) + 216
23 swift-ide-test 0x000000010f67d16b swift::Decl::walk(swift::ASTWalker&) + 27
24 swift-ide-test 0x000000010f73729a swift::SourceFile::walk(swift::ASTWalker&) + 170
25 swift-ide-test 0x000000010f735baf swift::ModuleDecl::walk(swift::ASTWalker&) + 95
26 swift-ide-test 0x000000010f5bc257 swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 215
27 swift-ide-test 0x000000010f0b03c9 swift::CompilerInstance::parseAndCheckTypesUpTo(swift::CompilerInstance::ImplicitImports const&, swift::SourceFile::ASTStage_t) + 1081
28 swift-ide-test 0x000000010f0af650 swift::CompilerInstance::performSemaUpTo(swift::SourceFile::ASTStage_t) + 512
29 swift-ide-test 0x000000010f0342c8 main + 29032
30 libdyld.dylib 0x00007fff7da63015 start + 1
31 libdyld.dylib 0x0000000000000005 start + 2186924017
Stack dump:
0. Program arguments: build/compat_macos/swift-macosx-x86_64/bin/swift-ide-test -code-completion -code-completion-token=COMPLETE -source-filename /tmp/test.swift
- While walking into decl 'Foo' at /tmp/test.swift:7:1
Abort trap: 6