Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-8471] Code completion: Assertion failed: (value != OpenExistentials.end() && "didn't see this OVE in a containing OpenExistentialExpr?") #50992

Closed
nathawes opened this issue Aug 6, 2018 · 2 comments
Assignees
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

Comments

@nathawes
Copy link
Collaborator

nathawes commented Aug 6, 2018

Previous ID SR-8471
Radar rdar://problem/43057058
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: 5969878142f6052c5f878f5a4769406b

Issue Description:

public func headers() -> [AnyHashable: String]? { fatalError() }
public var httpAdditionalHeaders: [AnyHashable : Any]?

if let userAgentHeaders = headers() {
  httpAdditionalHeaders = userAgentHeaders #^COMPLETE^#
}

{code:title=$ swift-ide-test -code-completion -code-completion-token=COMPLETE -source-filename /tmp/test.swift}
found code completion token COMPLETE at offset 202
found code completion token COMPLETE at offset 202
Assertion failed: (value != OpenExistentials.end() && "didn't see this OVE in a containing OpenExistentialExpr?"), function walkToExprPre, file /Users/nathanhawes/workspace/open-swift-source-compat-suite-master/swift/lib/Sema/CSGen.cpp, line 3179.
0 swift-ide-test 0x0000000108d5f8b8 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1 swift-ide-test 0x0000000108d5e826 llvm::sys::RunSignalHandlers() + 198
2 swift-ide-test 0x0000000108d5fed2 SignalHandler(int) + 258
3 libsystem_platform.dylib 0x00007fff7dd65f5a _sigtramp + 26
4 libsystem_platform.dylib 0x00007fb60381ba00 _sigtramp + 2242599616
5 libsystem_c.dylib 0x00007fff7db0f1ae abort + 127
6 libsystem_c.dylib 0x00007fff7dad71ac basename_r + 0
7 swift-ide-test 0x0000000105a4b290 (anonymous namespace)::SanitizeExpr::walkToExprPre(swift::Expr*) + 528
8 swift-ide-test 0x0000000105da6c28 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Expr*) + 4296
9 swift-ide-test 0x0000000105da5be6 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Expr*) + 134
10 swift-ide-test 0x0000000105da5be6 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Expr*) + 134
11 swift-ide-test 0x0000000105da7d7f (anonymous namespace)::Traversal::visitApplyExpr(swift::ApplyExpr*) + 207
12 swift-ide-test 0x0000000105da5504 swift::Expr::walk(swift::ASTWalker&) + 84
13 swift-ide-test 0x0000000105a43011 swift::constraints::ConstraintSystem::generateConstraints(swift::Expr*) + 145
14 swift-ide-test 0x0000000105a7cae7 swift::constraints::ConstraintSystem::solveImpl(swift::Expr*&, swift::Type, swift::ExprTypeCheckListener*, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 471
15 swift-ide-test 0x0000000105a7c68f swift::constraints::ConstraintSystem::solve(swift::Expr*&, swift::Type, swift::ExprTypeCheckListener*, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) + 31
16 swift-ide-test 0x0000000105b168ea swift::TypeChecker::getTypeOfExpressionWithoutApplying(swift::Expr*&, swift::DeclContext*, swift::ConcreteDeclRef&, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*) + 234
17 swift-ide-test 0x0000000105bc5d48 getTypeOfCompletionContextExpr(swift::TypeChecker&, swift::DeclContext*, swift::CompletionTypeCheckKind, swift::Expr*&, swift::ConcreteDeclRef&) + 168
18 swift-ide-test 0x0000000105bc57f4 swift::getTypeOfCompletionContextExpr(swift::ASTContext&, swift::DeclContext*, swift::CompletionTypeCheckKind, swift::Expr*&, swift::ConcreteDeclRef&) + 84
19 swift-ide-test 0x00000001057efdde (anonymous namespace)::CodeCompletionCallbacksImpl::doneParsing() + 16702
20 swift-ide-test 0x0000000105ce3ff9 swift::performDelayedParsing(swift::DeclContext*, swift::PersistentParserState&, swift::CodeCompletionCallbacksFactory*) + 377
21 swift-ide-test 0x00000001057d3fd9 swift::CompilerInstance::parseAndCheckTypesUpTo(swift::CompilerInstance::ImplicitImports const&, swift::SourceFile::ASTStage_t) + 1081
22 swift-ide-test 0x00000001057d3269 swift::CompilerInstance::performSemaUpTo(swift::SourceFile::ASTStage_t) + 505
23 swift-ide-test 0x0000000105758212 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

  1. While type-checking expression at [/tmp/test2.swift:5:27 - line:5:27] RangeText="u"
    Abort trap: 6
@nathawes
Copy link
Collaborator Author

nathawes commented Aug 6, 2018

@swift-ci create

@rintaro
Copy link
Mannequin

rintaro mannequin commented Aug 11, 2018

#18625

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added crash Bug: A crash, i.e., an abnormal termination of software compiler The Swift compiler in itself labels Dec 12, 2022
@AnthonyLatsis AnthonyLatsis added the source tooling Area: IDE support, SourceKit, and other source tooling label Feb 6, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants