[SR-8470] Code completion: Assertion failed: (hasInterfaceType() && "No interface type was set") #50991
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
code completion
Area → source tooling: code completion
compiler
The Swift compiler in itself
crash
Bug: A crash, i.e., an abnormal termination of software
source tooling
Area: IDE support, SourceKit, and other source tooling
Additional Detail from JIRA
md5: d2b70dc0da8a178f71cec32fb0b4b047
Issue Description:
{code:title=$ swift-ide-test -code-completion -code-completion-token=COMPLETE -source-filename /tmp/test.swift}
found code completion token COMPLETE at offset 102
found code completion token COMPLETE at offset 102
Assertion failed: (hasInterfaceType() && "No interface type was set"), function getInterfaceType, file /Users/nathanhawes/workspace/open-swift-source-compat-suite-master/swift/lib/AST/Decl.cpp, line 2137.
0 swift-ide-test 0x0000000105d738b8 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1 swift-ide-test 0x0000000105d72826 llvm::sys::RunSignalHandlers() + 198
2 swift-ide-test 0x0000000105d73ed2 SignalHandler(int) + 258
3 libsystem_platform.dylib 0x00007fff7dd65f5a _sigtramp + 26
4 libsystem_platform.dylib 0x00007fc261097910 _sigtramp + 3811776976
5 libsystem_c.dylib 0x00007fff7db0f1ae abort + 127
6 libsystem_c.dylib 0x00007fff7dad71ac basename_r + 0
7 swift-ide-test 0x0000000102de13a2 swift::ValueDecl::getInterfaceType() const + 50
8 swift-ide-test 0x00000001027fe840 calculateTypeRelationForDecl(swift::Decl const*, swift::Type, bool, bool) + 496
9 swift-ide-test 0x00000001027fc572 swift::ide::CodeCompletionResultBuilder::takeResult() + 1298
10 swift-ide-test 0x0000000102814dbd (anonymous namespace)::CompletionLookup::addVarDeclRef(swift::VarDecl const*, swift::DeclVisibilityKind) + 1341
11 swift-ide-test 0x0000000102811c99 (anonymous namespace)::CompletionLookup::FilteredDeclConsumer::foundDecl(swift::ValueDecl*, swift::DeclVisibilityKind) + 73
12 swift-ide-test 0x0000000102e61ce1 swift::lookupVisibleDecls(swift::VisibleDeclConsumer&, swift::DeclContext const*, swift::LazyResolver*, bool, swift::SourceLoc) + 433
13 swift-ide-test 0x00000001028074e1 (anonymous namespace)::CompletionLookup::getValueCompletionsInDeclContext(swift::SourceLoc, std::__1::function<bool (swift::ValueDecl*, swift::DeclVisibilityKind)>, bool, bool, bool) + 305
14 swift-ide-test 0x0000000102802478 (anonymous namespace)::CodeCompletionCallbacksImpl::doneParsing() + 10200
15 swift-ide-test 0x0000000102cfee50 (anonymous namespace)::ParseDelayedFunctionBodies::walkToDeclPre(swift::Decl*) + 304
16 swift-ide-test 0x0000000102db9abb (anonymous namespace)::Traversal::doIt(swift::Decl*) + 171
17 swift-ide-test 0x0000000102db99fb swift::Decl::walk(swift::ASTWalker&) + 27
18 swift-ide-test 0x0000000102e7229a swift::SourceFile::walk(swift::ASTWalker&) + 170
19 swift-ide-test 0x0000000102e70baf swift::ModuleDecl::walk(swift::ASTWalker&) + 95
20 swift-ide-test 0x0000000102cf7f57 swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 215
21 swift-ide-test 0x00000001027e7fd9 swift::CompilerInstance::parseAndCheckTypesUpTo(swift::CompilerInstance::ImplicitImports const&, swift::SourceFile::ASTStage_t) + 1081
22 swift-ide-test 0x00000001027e7269 swift::CompilerInstance::performSemaUpTo(swift::SourceFile::ASTStage_t) + 505
23 swift-ide-test 0x000000010276c212 main + 27554
24 libdyld.dylib 0x00007fff7da63015 start + 1
25 libdyld.dylib 0x0000000000000005 start + 2186924017
Stack dump:
0. Program arguments: ../open-swift-source-compat-suite-master/build/compat_macos/swift-macosx-x86_64/bin/swift-ide-test -code-completion -code-completion-token=COMPLETE -source-filename /tmp/test2.swift
Abort trap: 6
The text was updated successfully, but these errors were encountered: